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_);
|
settings.setValue(path_, isNotificationsEnabled_);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool isNotificationsEnabled()
|
bool isNotificationsEnabled() { return isNotificationsEnabled_; };
|
||||||
{
|
|
||||||
return isNotificationsEnabled_;
|
|
||||||
};
|
|
||||||
|
|
||||||
void toggleNotifications()
|
void toggleNotifications()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,23 +19,11 @@ public:
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
QColor color()
|
QColor color() { return color_; }
|
||||||
{
|
void setColor(QColor color) { color_ = color; }
|
||||||
return color_;
|
|
||||||
}
|
|
||||||
void setColor(QColor color)
|
|
||||||
{
|
|
||||||
color_ = color;
|
|
||||||
}
|
|
||||||
|
|
||||||
int interval()
|
int interval() { return interval_; }
|
||||||
{
|
void setInterval(int interval) { interval_ = interval; }
|
||||||
return interval_;
|
|
||||||
}
|
|
||||||
void setInterval(int interval)
|
|
||||||
{
|
|
||||||
interval_ = interval;
|
|
||||||
}
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onTimeout();
|
void onTimeout();
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "StateEvent.h"
|
#include "StateEvent.h"
|
||||||
|
|
||||||
constexpr int MAX_INITIAL_SYNC_FAILURES = 5;
|
constexpr int MAX_INITIAL_SYNC_FAILURES = 5;
|
||||||
|
constexpr int SYNC_RETRY_TIMEOUT = 10000;
|
||||||
|
|
||||||
namespace events = matrix::events;
|
namespace events = matrix::events;
|
||||||
|
|
||||||
|
@ -347,7 +348,7 @@ ChatPage::syncFailed(const QString &msg)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
qWarning() << "Sync error:" << msg;
|
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.
|
// TODO: Should be moved in another class that manages this global list.
|
||||||
|
|
|
@ -26,10 +26,7 @@ EmojiItemDelegate::EmojiItemDelegate(QObject *parent)
|
||||||
data_ = new Emoji;
|
data_ = new Emoji;
|
||||||
}
|
}
|
||||||
|
|
||||||
EmojiItemDelegate::~EmojiItemDelegate()
|
EmojiItemDelegate::~EmojiItemDelegate() { delete data_; }
|
||||||
{
|
|
||||||
delete data_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
EmojiItemDelegate::paint(QPainter *painter,
|
EmojiItemDelegate::paint(QPainter *painter,
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
|
|
||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
|
|
||||||
ThemeManager::ThemeManager()
|
ThemeManager::ThemeManager() { setTheme(new Theme); }
|
||||||
{
|
|
||||||
setTheme(new Theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ThemeManager::setTheme(Theme *theme)
|
ThemeManager::setTheme(Theme *theme)
|
||||||
|
|
Loading…
Reference in a new issue