From fc34f373df6b1671e8ea1f32e7c4fa423c76f1d9 Mon Sep 17 00:00:00 2001
From: Konstantinos Sideris <sideris.konstantin@gmail.com>
Date: Wed, 22 Nov 2017 21:13:22 +0200
Subject: [PATCH] Remove unnecessary comments

---
 include/EmojiCategory.h    |  2 +-
 include/LeaveRoomDialog.h  |  2 +-
 include/LoginPage.h        |  2 +-
 include/LogoutDialog.h     |  2 +-
 include/RegisterPage.h     |  2 +-
 include/UserSettingsPage.h |  2 +-
 include/WelcomePage.h      |  2 +-
 src/ChatPage.cc            |  2 +-
 src/EmojiCategory.cc       |  4 ++--
 src/JoinRoomDialog.cc      |  2 --
 src/LeaveRoomDialog.cc     |  3 +--
 src/LoginPage.cc           | 17 +----------------
 src/LogoutDialog.cc        |  2 +-
 src/RegisterPage.cc        | 19 +------------------
 src/UserInfoWidget.cc      |  2 --
 src/WelcomePage.cc         |  2 +-
 16 files changed, 15 insertions(+), 52 deletions(-)

diff --git a/include/EmojiCategory.h b/include/EmojiCategory.h
index 0eb4aeb1a..be0110f2d 100644
--- a/include/EmojiCategory.h
+++ b/include/EmojiCategory.h
@@ -38,7 +38,7 @@ signals:
         void emojiSelected(const QString &emoji);
 
 protected:
-	void paintEvent(QPaintEvent *event) override;
+        void paintEvent(QPaintEvent *event) override;
 
 private slots:
         void clickIndex(const QModelIndex &index)
diff --git a/include/LeaveRoomDialog.h b/include/LeaveRoomDialog.h
index 1a2f003c7..eab022f7e 100644
--- a/include/LeaveRoomDialog.h
+++ b/include/LeaveRoomDialog.h
@@ -11,7 +11,7 @@ public:
         explicit LeaveRoomDialog(QWidget *parent = nullptr);
 
 protected:
-	void paintEvent(QPaintEvent *event) override;
+        void paintEvent(QPaintEvent *event) override;
 
 signals:
         void closing(bool isLeaving);
diff --git a/include/LoginPage.h b/include/LoginPage.h
index b83a146b7..a49e7911d 100644
--- a/include/LoginPage.h
+++ b/include/LoginPage.h
@@ -43,7 +43,7 @@ signals:
         void backButtonClicked();
 
 protected:
-	void paintEvent(QPaintEvent *event) override;
+        void paintEvent(QPaintEvent *event) override;
 
 public slots:
         // Displays errors produced during the login.
diff --git a/include/LogoutDialog.h b/include/LogoutDialog.h
index 6b6982218..a1a5ee4f5 100644
--- a/include/LogoutDialog.h
+++ b/include/LogoutDialog.h
@@ -28,7 +28,7 @@ public:
         explicit LogoutDialog(QWidget *parent = nullptr);
 
 protected:
-	void paintEvent(QPaintEvent *event) override;
+        void paintEvent(QPaintEvent *event) override;
 
 signals:
         void closing(bool isLoggingOut);
diff --git a/include/RegisterPage.h b/include/RegisterPage.h
index 34fdf268c..26d9f2c0e 100644
--- a/include/RegisterPage.h
+++ b/include/RegisterPage.h
@@ -36,7 +36,7 @@ public:
         ~RegisterPage();
 
 protected:
-	void paintEvent(QPaintEvent *event) override;
+        void paintEvent(QPaintEvent *event) override;
 
 signals:
         void backButtonClicked();
diff --git a/include/UserSettingsPage.h b/include/UserSettingsPage.h
index 3d4d9be40..3db15eef2 100644
--- a/include/UserSettingsPage.h
+++ b/include/UserSettingsPage.h
@@ -65,7 +65,7 @@ public:
 protected:
         void showEvent(QShowEvent *event) override;
         void resizeEvent(QResizeEvent *event) override;
-	void paintEvent(QPaintEvent *event) override;
+        void paintEvent(QPaintEvent *event) override;
 
 signals:
         void moveBack();
diff --git a/include/WelcomePage.h b/include/WelcomePage.h
index 4f6b63a67..b33ca6699 100644
--- a/include/WelcomePage.h
+++ b/include/WelcomePage.h
@@ -29,7 +29,7 @@ public:
         explicit WelcomePage(QWidget *parent = 0);
 
 protected:
-	void paintEvent(QPaintEvent *event) override;
+        void paintEvent(QPaintEvent *event) override;
 
 signals:
         // Notify that the user wants to login in.
diff --git a/src/ChatPage.cc b/src/ChatPage.cc
index acc60c03c..4dbda90de 100644
--- a/src/ChatPage.cc
+++ b/src/ChatPage.cc
@@ -545,7 +545,7 @@ ChatPage::showQuickSwitcher()
                   new OverlayModal(MainWindow::instance(), quickSwitcher_.data()),
                   [=](OverlayModal *modal) { modal->deleteLater(); });
                 quickSwitcherModal_->setDuration(0);
-                //                quickSwitcherModal_->setColor(QColor(30, 30, 30, 170));
+                quickSwitcherModal_->setColor(QColor(30, 30, 30, 170));
         }
 
         QMap<QString, QString> rooms;
diff --git a/src/EmojiCategory.cc b/src/EmojiCategory.cc
index a8851a899..98d79cc02 100644
--- a/src/EmojiCategory.cc
+++ b/src/EmojiCategory.cc
@@ -15,9 +15,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <QPainter>
 #include <QScrollBar>
 #include <QStyleOption>
-#include <QPainter>
 
 #include "Config.h"
 #include "EmojiCategory.h"
@@ -69,7 +69,7 @@ EmojiCategory::EmojiCategory(QString category, QList<Emoji> emoji, QWidget *pare
 
         category_ = new QLabel(category, this);
         category_->setFont(font);
-	category_->setStyleSheet("margin: 20px 0 20px 8px;");
+        category_->setStyleSheet("margin: 20px 0 20px 8px;");
 
         mainLayout_->addWidget(category_);
         mainLayout_->addWidget(emojiListView_);
diff --git a/src/JoinRoomDialog.cc b/src/JoinRoomDialog.cc
index d071876a1..a4d241c0a 100644
--- a/src/JoinRoomDialog.cc
+++ b/src/JoinRoomDialog.cc
@@ -10,7 +10,6 @@ JoinRoomDialog::JoinRoomDialog(QWidget *parent)
   : QFrame(parent)
 {
         setMaximumSize(400, 400);
-        setStyleSheet("background-color: #fff");
 
         auto layout = new QVBoxLayout(this);
         layout->setSpacing(30);
@@ -35,7 +34,6 @@ JoinRoomDialog::JoinRoomDialog(QWidget *parent)
 
         auto label = new QLabel(tr("Room alias to join:"), this);
         label->setFont(font);
-        label->setStyleSheet("color: #333333");
 
         roomAliasEdit_ = new QLineEdit(this);
 
diff --git a/src/LeaveRoomDialog.cc b/src/LeaveRoomDialog.cc
index a6aedbfee..b99818b90 100644
--- a/src/LeaveRoomDialog.cc
+++ b/src/LeaveRoomDialog.cc
@@ -1,6 +1,6 @@
 #include <QLabel>
-#include <QVBoxLayout>
 #include <QStyleOption>
+#include <QVBoxLayout>
 
 #include "Config.h"
 #include "FlatButton.h"
@@ -11,7 +11,6 @@ LeaveRoomDialog::LeaveRoomDialog(QWidget *parent)
   : QFrame(parent)
 {
         setMaximumSize(400, 400);
-        setStyleSheet("background-color: #fff");
 
         auto layout = new QVBoxLayout(this);
         layout->setSpacing(30);
diff --git a/src/LoginPage.cc b/src/LoginPage.cc
index c4923c7da..f24e2fde8 100644
--- a/src/LoginPage.cc
+++ b/src/LoginPage.cc
@@ -17,11 +17,11 @@
 
 #include <QStyleOption>
 
-#include "LoginPage.h"
 #include "Config.h"
 #include "FlatButton.h"
 #include "InputValidator.h"
 #include "LoadingIndicator.h"
+#include "LoginPage.h"
 #include "MatrixClient.h"
 #include "OverlayModal.h"
 #include "RaisedButton.h"
@@ -32,8 +32,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
   , inferredServerAddress_()
   , client_{client}
 {
-        //        setStyleSheet("background-color: #fff");
-
         top_layout_ = new QVBoxLayout();
 
         top_bar_layout_ = new QHBoxLayout();
@@ -42,7 +40,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
 
         back_button_ = new FlatButton(this);
         back_button_->setMinimumSize(QSize(30, 30));
-        // back_button_->setForegroundColor("#333333");
 
         top_bar_layout_->addWidget(back_button_, 0, Qt::AlignLeft | Qt::AlignVCenter);
         top_bar_layout_->addStretch(1);
@@ -77,10 +74,7 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
         form_wrapper_->addStretch(1);
 
         matrixid_input_ = new TextField(this);
-        //        matrixid_input_->setTextColor("#333333");
         matrixid_input_->setLabel(tr("Matrix ID"));
-        //        matrixid_input_->setInkColor("#555459");
-        //        matrixid_input_->setBackgroundColor("#fff");
         matrixid_input_->setPlaceholderText(tr("e.g @joe:matrix.org"));
 
         spinner_ = new LoadingIndicator(this);
@@ -97,17 +91,11 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
         matrixidLayout_->addWidget(matrixid_input_, 0, Qt::AlignVCenter);
 
         password_input_ = new TextField(this);
-        //        password_input_->setTextColor("#333333");
         password_input_->setLabel(tr("Password"));
-        //        password_input_->setInkColor("#555459");
-        //        password_input_->setBackgroundColor("#fff");
         password_input_->setEchoMode(QLineEdit::Password);
 
         serverInput_ = new TextField(this);
-        //        serverInput_->setTextColor("#333333");
         serverInput_->setLabel("Homeserver address");
-        //        serverInput_->setInkColor("#555459");
-        //        serverInput_->setBackgroundColor("#fff");
         serverInput_->setPlaceholderText("matrix.org");
         serverInput_->hide();
 
@@ -123,8 +111,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
         button_layout_->setContentsMargins(0, 0, 0, 30);
 
         login_button_ = new RaisedButton(tr("LOGIN"), this);
-        //        login_button_->setBackgroundColor(QColor("#333333"));
-        //        login_button_->setForegroundColor(QColor("white"));
         login_button_->setMinimumSize(350, 65);
         login_button_->setFontSize(20);
         login_button_->setCornerRadius(3);
@@ -138,7 +124,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
 
         error_label_ = new QLabel(this);
         error_label_->setFont(font);
-        //        error_label_->setStyleSheet("color: #E22826");
 
         top_layout_->addLayout(top_bar_layout_);
         top_layout_->addStretch(1);
diff --git a/src/LogoutDialog.cc b/src/LogoutDialog.cc
index 8be6e1665..cda520160 100644
--- a/src/LogoutDialog.cc
+++ b/src/LogoutDialog.cc
@@ -16,9 +16,9 @@
  */
 
 #include <QLabel>
-#include <QVBoxLayout>
 #include <QPaintEvent>
 #include <QStyleOption>
+#include <QVBoxLayout>
 
 #include "Config.h"
 #include "FlatButton.h"
diff --git a/src/RegisterPage.cc b/src/RegisterPage.cc
index 52a0ac021..c03fae4cd 100644
--- a/src/RegisterPage.cc
+++ b/src/RegisterPage.cc
@@ -17,21 +17,19 @@
 
 #include <QStyleOption>
 
-#include "RegisterPage.h"
 #include "Avatar.h"
 #include "Config.h"
 #include "FlatButton.h"
 #include "InputValidator.h"
 #include "MatrixClient.h"
 #include "RaisedButton.h"
+#include "RegisterPage.h"
 #include "TextField.h"
 
 RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
   : QWidget(parent)
   , client_(client)
 {
-        //        setStyleSheet("background-color: #fff");
-
         top_layout_ = new QVBoxLayout();
 
         back_layout_ = new QHBoxLayout();
@@ -75,30 +73,18 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
         form_wrapper_->addStretch(1);
 
         username_input_ = new TextField();
-        //        username_input_->setTextColor("#333333");
         username_input_->setLabel(tr("Username"));
-        //        username_input_->setInkColor("#555459");
-        //        username_input_->setBackgroundColor("#fff");
 
         password_input_ = new TextField();
-        //        password_input_->setTextColor("#333333");
         password_input_->setLabel(tr("Password"));
-        //        password_input_->setInkColor("#555459");
-        //        password_input_->setBackgroundColor("#fff");
         password_input_->setEchoMode(QLineEdit::Password);
 
         password_confirmation_ = new TextField();
-        //        password_confirmation_->setTextColor("#333333");
         password_confirmation_->setLabel(tr("Password confirmation"));
-        //        password_confirmation_->setInkColor("#555459");
-        //        password_confirmation_->setBackgroundColor("#fff");
         password_confirmation_->setEchoMode(QLineEdit::Password);
 
         server_input_ = new TextField();
-        //        server_input_->setTextColor("#333333");
         server_input_->setLabel(tr("Home Server"));
-        //        server_input_->setInkColor("#555459");
-        //        server_input_->setBackgroundColor("#fff");
 
         form_layout_->addWidget(username_input_, Qt::AlignHCenter, 0);
         form_layout_->addWidget(password_input_, Qt::AlignHCenter, 0);
@@ -114,11 +100,8 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
 
         error_label_ = new QLabel(this);
         error_label_->setFont(font);
-        //        error_label_->setStyleSheet("color: #E22826");
 
         register_button_ = new RaisedButton(tr("REGISTER"), this);
-        //        register_button_->setBackgroundColor(QColor("#333333"));
-        //        register_button_->setForegroundColor(QColor("white"));
         register_button_->setMinimumSize(350, 65);
         register_button_->setFontSize(conf::btn::fontSize);
         register_button_->setCornerRadius(conf::btn::cornerRadius);
diff --git a/src/UserInfoWidget.cc b/src/UserInfoWidget.cc
index 27d6cbbe3..3dc1bc895 100644
--- a/src/UserInfoWidget.cc
+++ b/src/UserInfoWidget.cc
@@ -46,8 +46,6 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
         userAvatar_->setObjectName("userAvatar");
         userAvatar_->setLetter(QChar('?'));
         userAvatar_->setSize(55);
-        //        userAvatar_->setBackgroundColor("#fff");
-        //        userAvatar_->setTextColor("#333333");
 
         QFont nameFont("Open Sans SemiBold");
         nameFont.setPixelSize(conf::userInfoWidget::fonts::displayName);
diff --git a/src/WelcomePage.cc b/src/WelcomePage.cc
index e1c74d3e8..30d8f692d 100644
--- a/src/WelcomePage.cc
+++ b/src/WelcomePage.cc
@@ -15,9 +15,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <QStyleOption>
 #include <QLabel>
 #include <QLayout>
+#include <QStyleOption>
 
 #include "Config.h"
 #include "RaisedButton.h"
-- 
GitLab