This commit is contained in:
Konstantinos Sideris 2017-10-23 00:19:35 +03:00
parent 143ed5176a
commit c6e1068e0e
5 changed files with 9 additions and 29 deletions

View file

@ -35,10 +35,7 @@ public:
settings.setValue(path_, isNotificationsEnabled_);
};
bool isNotificationsEnabled()
{
return isNotificationsEnabled_;
};
bool isNotificationsEnabled() { return isNotificationsEnabled_; };
void toggleNotifications()
{

View file

@ -19,23 +19,11 @@ public:
void start();
void stop();
QColor color()
{
return color_;
}
void setColor(QColor color)
{
color_ = color;
}
QColor color() { return color_; }
void setColor(QColor color) { color_ = color; }
int interval()
{
return interval_;
}
void setInterval(int interval)
{
interval_ = interval;
}
int interval() { return interval_; }
void setInterval(int interval) { interval_ = interval; }
private slots:
void onTimeout();

View file

@ -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.

View file

@ -26,10 +26,7 @@ EmojiItemDelegate::EmojiItemDelegate(QObject *parent)
data_ = new Emoji;
}
EmojiItemDelegate::~EmojiItemDelegate()
{
delete data_;
}
EmojiItemDelegate::~EmojiItemDelegate() { delete data_; }
void
EmojiItemDelegate::paint(QPainter *painter,

View file

@ -2,10 +2,7 @@
#include "ThemeManager.h"
ThemeManager::ThemeManager()
{
setTheme(new Theme);
}
ThemeManager::ThemeManager() { setTheme(new Theme); }
void
ThemeManager::setTheme(Theme *theme)