diff --git a/src/providers/irc/Irc2.cpp b/src/providers/irc/Irc2.cpp index 1c5603cf3..0a8f2ed60 100644 --- a/src/providers/irc/Irc2.cpp +++ b/src/providers/irc/Irc2.cpp @@ -74,7 +74,7 @@ void IrcServerData::getPassword( QObject *receiver, std::function &&onLoaded) const { Credentials::instance().get("irc", getCredentialName(*this), receiver, - std::move(onLoaded)); + std::move(onLoaded)); } void IrcServerData::setPassword(const QString &password) @@ -133,8 +133,7 @@ Irc::Irc() if (args.caller != Irc::noEraseCredentialCaller) { - Credentials::instance().erase("irc", - getCredentialName(args.item)); + Credentials::instance().erase("irc", getCredentialName(args.item)); } }); diff --git a/src/singletons/WindowManager.cpp b/src/singletons/WindowManager.cpp index e1c6158cc..65bc8f441 100644 --- a/src/singletons/WindowManager.cpp +++ b/src/singletons/WindowManager.cpp @@ -649,8 +649,8 @@ IndirectChannel WindowManager::decodeChannel(const QJsonObject &obj) } else if (type == "irc") { - return Irc::instance().getOrAddChannel( - obj.value("server").toInt(-1), obj.value("channel").toString()); + return Irc::instance().getOrAddChannel(obj.value("server").toInt(-1), + obj.value("channel").toString()); } return Channel::getEmpty(); diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index bee9393a0..d4ad58466 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -340,20 +340,17 @@ void BaseWindow::onFocusLost() { switch (this->getActionOnFocusLoss()) { - case Delete: - { + case Delete: { this->deleteLater(); } break; - case Close: - { + case Close: { this->close(); } break; - case Hide: - { + case Hide: { this->hide(); } break; diff --git a/src/widgets/dialogs/SelectChannelDialog.cpp b/src/widgets/dialogs/SelectChannelDialog.cpp index 6870ba93f..25d61ff01 100644 --- a/src/widgets/dialogs/SelectChannelDialog.cpp +++ b/src/widgets/dialogs/SelectChannelDialog.cpp @@ -133,8 +133,8 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent) auto outerBox = obj.setLayoutType(); { - auto view = this->ui_.irc.servers = new EditableModelView( - Irc::instance().newConnectionModel(this)); + auto view = this->ui_.irc.servers = + new EditableModelView(Irc::instance().newConnectionModel(this)); view->setTitles({"host", "port", "ssl", "user", "nick", "real", "password", "login command"}); @@ -166,8 +166,7 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent) if (editor->exec() == QDialog::Accepted) { auto data = editor->data(); - auto &&conns = - Irc::instance().connections.getVector(); + auto &&conns = Irc::instance().connections.getVector(); int i = 0; for (auto &&conn : conns) { @@ -175,8 +174,7 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent) { Irc::instance().connections.removeItem( i, Irc::noEraseCredentialCaller); - Irc::instance().connections.insertItem(data, - i); + Irc::instance().connections.insertItem(data, i); } i++; } diff --git a/src/widgets/helper/TitlebarButton.cpp b/src/widgets/helper/TitlebarButton.cpp index 1ab2e0e22..d7fe28577 100644 --- a/src/widgets/helper/TitlebarButton.cpp +++ b/src/widgets/helper/TitlebarButton.cpp @@ -36,19 +36,16 @@ void TitleBarButton::paintEvent(QPaintEvent *event) switch (this->style_) { - case TitleBarButtonStyle::Minimize: - { + case TitleBarButtonStyle::Minimize: { painter.fillRect(centerX - xD / 2, xD * 3 / 2, xD, 1, color); break; } - case TitleBarButtonStyle::Maximize: - { + case TitleBarButtonStyle::Maximize: { painter.setPen(color); painter.drawRect(centerX - xD / 2, xD, xD - 1, xD - 1); break; } - case TitleBarButtonStyle::Unmaximize: - { + case TitleBarButtonStyle::Unmaximize: { int xD2 = xD * 1 / 5; int xD3 = xD * 4 / 5; @@ -58,8 +55,7 @@ void TitleBarButton::paintEvent(QPaintEvent *event) painter.drawRect(centerX - xD / 2, xD + xD2, xD3, xD3); break; } - case TitleBarButtonStyle::Close: - { + case TitleBarButtonStyle::Close: { QRect rect(centerX - xD / 2, xD, xD - 1, xD - 1); painter.setPen(QPen(color, 1)); @@ -67,8 +63,7 @@ void TitleBarButton::paintEvent(QPaintEvent *event) painter.drawLine(rect.topRight(), rect.bottomLeft()); break; } - case TitleBarButtonStyle::User: - { + case TitleBarButtonStyle::User: { color = "#999"; painter.setRenderHint(QPainter::Antialiasing); @@ -94,8 +89,7 @@ void TitleBarButton::paintEvent(QPaintEvent *event) break; } - case TitleBarButtonStyle::Settings: - { + case TitleBarButtonStyle::Settings: { color = "#999"; painter.setRenderHint(QPainter::Antialiasing); painter.setRenderHint(QPainter::HighQualityAntialiasing);