summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-23 00:19:35 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-23 00:19:35 +0300
commitc6e1068e0e1cb8ff5d5982ccd1683b1900dd7114 (patch)
treeb819b0664f4e95004237d00a4ea3a16e0a4677d6 /src
parentUse callbacks on MatrixClient (diff)
downloadnheko-c6e1068e0e1cb8ff5d5982ccd1683b1900dd7114.tar.xz
Lint
Diffstat (limited to 'src')
-rw-r--r--src/ChatPage.cc3
-rw-r--r--src/EmojiItemDelegate.cc5
-rw-r--r--src/ui/ThemeManager.cc5
3 files changed, 4 insertions, 9 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc

index 65fef9de..d087c3f3 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc
@@ -32,6 +32,7 @@ #include "StateEvent.h" constexpr int MAX_INITIAL_SYNC_FAILURES = 5; +constexpr int SYNC_RETRY_TIMEOUT = 10000; namespace events = matrix::events; @@ -347,7 +348,7 @@ ChatPage::syncFailed(const QString &msg) return; qWarning() << "Sync error:" << msg; - client_->sync(); + QTimer::singleShot(SYNC_RETRY_TIMEOUT, this, [=]() { client_->sync(); }); } // TODO: Should be moved in another class that manages this global list. diff --git a/src/EmojiItemDelegate.cc b/src/EmojiItemDelegate.cc
index 9fd4600d..691bee17 100644 --- a/src/EmojiItemDelegate.cc +++ b/src/EmojiItemDelegate.cc
@@ -26,10 +26,7 @@ EmojiItemDelegate::EmojiItemDelegate(QObject *parent) data_ = new Emoji; } -EmojiItemDelegate::~EmojiItemDelegate() -{ - delete data_; -} +EmojiItemDelegate::~EmojiItemDelegate() { delete data_; } void EmojiItemDelegate::paint(QPainter *painter, diff --git a/src/ui/ThemeManager.cc b/src/ui/ThemeManager.cc
index 172ddc41..7baed1f3 100644 --- a/src/ui/ThemeManager.cc +++ b/src/ui/ThemeManager.cc
@@ -2,10 +2,7 @@ #include "ThemeManager.h" -ThemeManager::ThemeManager() -{ - setTheme(new Theme); -} +ThemeManager::ThemeManager() { setTheme(new Theme); } void ThemeManager::setTheme(Theme *theme)