From 12fff7408ea7539d778a641bbf1746693d30ee2a Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 27 Oct 2020 17:45:28 +0100 Subject: Optimize build --- src/MainWindow.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/MainWindow.cpp') diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index c019b24b..37b54151 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -23,6 +23,7 @@ #include #include +#include #include "Cache.h" #include "ChatPage.h" @@ -54,8 +55,8 @@ MainWindow *MainWindow::instance_ = nullptr; MainWindow::MainWindow(const QString profile, QWidget *parent) - : QMainWindow(parent), - profile_{ profile } + : QMainWindow(parent) + , profile_{profile} { setWindowTitle(0); setObjectName("MainWindow"); @@ -104,8 +105,7 @@ MainWindow::MainWindow(const QString profile, QWidget *parent) connect(chat_page_, &ChatPage::closing, this, &MainWindow::showWelcomePage); connect( chat_page_, &ChatPage::showOverlayProgressBar, this, &MainWindow::showOverlayProgressBar); - connect( - chat_page_, &ChatPage::unreadMessages, this, &MainWindow::setWindowTitle); + connect(chat_page_, &ChatPage::unreadMessages, this, &MainWindow::setWindowTitle); connect(chat_page_, SIGNAL(unreadMessages(int)), trayIcon_, SLOT(setUnreadCount(int))); connect(chat_page_, &ChatPage::showLoginPage, this, [this](const QString &msg) { login_page_->loginError(msg); @@ -185,8 +185,7 @@ MainWindow::setWindowTitle(int notificationCount) QString name = "nheko"; if (!profile_.isEmpty()) name += " | " + profile_; - if (notificationCount > 0) - { + if (notificationCount > 0) { name.append(QString{" (%1)"}.arg(notificationCount)); } QMainWindow::setWindowTitle(name); -- cgit 1.5.1