mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Lint
This commit is contained in:
parent
143ed5176a
commit
c6e1068e0e
5 changed files with 9 additions and 29 deletions
|
@ -35,10 +35,7 @@ public:
|
|||
settings.setValue(path_, isNotificationsEnabled_);
|
||||
};
|
||||
|
||||
bool isNotificationsEnabled()
|
||||
{
|
||||
return isNotificationsEnabled_;
|
||||
};
|
||||
bool isNotificationsEnabled() { return isNotificationsEnabled_; };
|
||||
|
||||
void toggleNotifications()
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -26,10 +26,7 @@ EmojiItemDelegate::EmojiItemDelegate(QObject *parent)
|
|||
data_ = new Emoji;
|
||||
}
|
||||
|
||||
EmojiItemDelegate::~EmojiItemDelegate()
|
||||
{
|
||||
delete data_;
|
||||
}
|
||||
EmojiItemDelegate::~EmojiItemDelegate() { delete data_; }
|
||||
|
||||
void
|
||||
EmojiItemDelegate::paint(QPainter *painter,
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
|
||||
#include "ThemeManager.h"
|
||||
|
||||
ThemeManager::ThemeManager()
|
||||
{
|
||||
setTheme(new Theme);
|
||||
}
|
||||
ThemeManager::ThemeManager() { setTheme(new Theme); }
|
||||
|
||||
void
|
||||
ThemeManager::setTheme(Theme *theme)
|
||||
|
|
Loading…
Reference in a new issue