summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorredsky17 <joedonofry@gmail.com>2019-06-11 23:36:46 -0400
committerredsky17 <joedonofry@gmail.com>2019-06-11 23:36:46 -0400
commit1d4966d5fd916f21bdbbad8080eec69bb2c817d6 (patch)
tree04dbeabb4007bcf5213bb65da5423370a1047eaf /src
parentFix lambda capture and lint issues (diff)
downloadnheko-1d4966d5fd916f21bdbbad8080eec69bb2c817d6.tar.xz
Add style for reply popup. Fix ALL of the linting issues
Diffstat (limited to 'src')
-rw-r--r--src/ChatPage.h4
-rw-r--r--src/TextInputWidget.cpp6
-rw-r--r--src/TextInputWidget.h4
-rw-r--r--src/popups/PopupItem.cpp2
-rw-r--r--src/popups/ReplyPopup.cpp4
-rw-r--r--src/popups/ReplyPopup.h1
-rw-r--r--src/popups/SuggestionsPopup.cpp2
-rw-r--r--src/popups/SuggestionsPopup.h1
-rw-r--r--src/timeline/TimelineView.h4
-rw-r--r--src/timeline/TimelineViewManager.cpp3
10 files changed, 15 insertions, 16 deletions
diff --git a/src/ChatPage.h b/src/ChatPage.h

index 09e7a2c6..f70f5bdd 100644 --- a/src/ChatPage.h +++ b/src/ChatPage.h
@@ -83,7 +83,9 @@ signals: void connectionLost(); void connectionRestored(); - void messageReply(const QString &username, const QString &msg, const QString &related_event); + void messageReply(const QString &username, + const QString &msg, + const QString &related_event); void notificationsRetrieved(const mtx::responses::Notifications &); diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp
index 7971ab43..dc41b4d3 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp
@@ -176,18 +176,16 @@ FilteredTextEdit::keyPressEvent(QKeyEvent *event) } if (replyPopup_.isVisible()) { - switch (event->key()) - { + switch (event->key()) { case Qt::Key_Escape: closeReply(); return; - + default: break; } } - switch (event->key()) { case Qt::Key_At: atTriggerPosition_ = textCursor().position(); diff --git a/src/TextInputWidget.h b/src/TextInputWidget.h
index 2936340b..c462de05 100644 --- a/src/TextInputWidget.h +++ b/src/TextInputWidget.h
@@ -28,10 +28,10 @@ #include <QTextEdit> #include <QWidget> -#include "popups/SuggestionsPopup.h" -#include "popups/ReplyPopup.h" #include "dialogs/PreviewUploadOverlay.h" #include "emoji/PickButton.h" +#include "popups/ReplyPopup.h" +#include "popups/SuggestionsPopup.h" namespace dialogs { class PreviewUploadOverlay; diff --git a/src/popups/PopupItem.cpp b/src/popups/PopupItem.cpp
index b10cd32e..94de3a92 100644 --- a/src/popups/PopupItem.cpp +++ b/src/popups/PopupItem.cpp
@@ -2,9 +2,9 @@ #include <QPainter> #include <QStyleOption> -#include "PopupItem.h" #include "../Utils.h" #include "../ui/Avatar.h" +#include "PopupItem.h" constexpr int PopupHMargin = 4; constexpr int PopupItemMargin = 3; diff --git a/src/popups/ReplyPopup.cpp b/src/popups/ReplyPopup.cpp
index a883739f..04c3cea5 100644 --- a/src/popups/ReplyPopup.cpp +++ b/src/popups/ReplyPopup.cpp
@@ -1,5 +1,5 @@ -#include <QPaintEvent> #include <QLabel> +#include <QPaintEvent> #include <QPainter> #include <QStyleOption> @@ -32,7 +32,7 @@ ReplyPopup::setReplyContent(const QString &user, const QString &msg, const QStri // layout position. // if (!item) { auto userItem = new UserItem(this, user); - auto *text = new QLabel(this); + auto *text = new QLabel(this); text->setText(msg); auto *event = new QLabel(this); event->setText(srcEvent); diff --git a/src/popups/ReplyPopup.h b/src/popups/ReplyPopup.h
index d8355e53..57c2bc8a 100644 --- a/src/popups/ReplyPopup.h +++ b/src/popups/ReplyPopup.h
@@ -28,5 +28,4 @@ signals: private: QVBoxLayout *layout_; - }; diff --git a/src/popups/SuggestionsPopup.cpp b/src/popups/SuggestionsPopup.cpp
index 6861a76a..ba1f77b9 100644 --- a/src/popups/SuggestionsPopup.cpp +++ b/src/popups/SuggestionsPopup.cpp
@@ -3,10 +3,10 @@ #include <QStyleOption> #include "../Config.h" -#include "SuggestionsPopup.h" #include "../Utils.h" #include "../ui/Avatar.h" #include "../ui/DropShadow.h" +#include "SuggestionsPopup.h" SuggestionsPopup::SuggestionsPopup(QWidget *parent) : QWidget(parent) diff --git a/src/popups/SuggestionsPopup.h b/src/popups/SuggestionsPopup.h
index 4fbb97b3..1ef720b2 100644 --- a/src/popups/SuggestionsPopup.h +++ b/src/popups/SuggestionsPopup.h
@@ -10,7 +10,6 @@ #include "../ChatPage.h" #include "PopupItem.h" - class SuggestionsPopup : public QWidget { Q_OBJECT diff --git a/src/timeline/TimelineView.h b/src/timeline/TimelineView.h
index 450b5dfa..db6087eb 100644 --- a/src/timeline/TimelineView.h +++ b/src/timeline/TimelineView.h
@@ -121,7 +121,9 @@ public: // Add new events at the end of the timeline. void addEvents(const mtx::responses::Timeline &timeline); - void addUserMessage(mtx::events::MessageType ty, const QString &body, const QString &related_event); + void addUserMessage(mtx::events::MessageType ty, + const QString &body, + const QString &related_event); void addUserMessage(mtx::events::MessageType ty, const QString &msg); template<class Widget, mtx::events::MessageType MsgType> diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index 10c2d747..1ce3794f 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp
@@ -79,8 +79,7 @@ TimelineViewManager::queueEmoteMessage(const QString &msg) } void -TimelineViewManager::queueReplyMessage(const QString &reply, - const QString &related_event) +TimelineViewManager::queueReplyMessage(const QString &reply, const QString &related_event) { if (active_room_.isEmpty()) return;