mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 06:08:48 +03:00
modernize: use override
This commit is contained in:
parent
7dab4d39ee
commit
2b531227a8
10 changed files with 13 additions and 37 deletions
|
@ -37,7 +37,7 @@ class Splitter : public QSplitter
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit Splitter(QWidget *parent = nullptr);
|
explicit Splitter(QWidget *parent = nullptr);
|
||||||
~Splitter();
|
~Splitter() override;
|
||||||
|
|
||||||
void restoreSizes(int fallback);
|
void restoreSizes(int fallback);
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,10 @@ class MsgCountComposedIcon : public QIconEngine
|
||||||
public:
|
public:
|
||||||
MsgCountComposedIcon(const QString &filename);
|
MsgCountComposedIcon(const QString &filename);
|
||||||
|
|
||||||
virtual void paint(QPainter *p, const QRect &rect, QIcon::Mode mode, QIcon::State state);
|
void paint(QPainter *p, const QRect &rect, QIcon::Mode mode, QIcon::State state) override;
|
||||||
virtual QIconEngine *clone() const;
|
QIconEngine *clone() const override;
|
||||||
virtual QList<QSize> availableSizes(QIcon::Mode mode, QIcon::State state) const;
|
QList<QSize> availableSizes(QIcon::Mode mode, QIcon::State state) const override;
|
||||||
virtual QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state);
|
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override;
|
||||||
|
|
||||||
int msgCount = 0;
|
int msgCount = 0;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ public:
|
||||||
const QString &room_id);
|
const QString &room_id);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *);
|
void paintEvent(QPaintEvent *) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString dateFormat(const QDateTime &then) const;
|
QString dateFormat(const QDateTime &then) const;
|
||||||
|
|
|
@ -35,7 +35,7 @@ signals:
|
||||||
void clicked();
|
void clicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event)
|
bool eventFilter(QObject *obj, QEvent *event) override
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::MouseButtonRelease) {
|
if (event->type() == QEvent::MouseButtonRelease) {
|
||||||
emit clicked();
|
emit clicked();
|
||||||
|
|
|
@ -31,7 +31,7 @@ class ItemDelegate : public QStyledItemDelegate
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ItemDelegate(QObject *parent = nullptr);
|
explicit ItemDelegate(QObject *parent = nullptr);
|
||||||
~ItemDelegate();
|
~ItemDelegate() override;
|
||||||
|
|
||||||
void paint(QPainter *painter,
|
void paint(QPainter *painter,
|
||||||
const QStyleOptionViewItem &option,
|
const QStyleOptionViewItem &option,
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
sudo apt install cmake
|
|
||||||
sudo apt install gcc make automake
|
|
||||||
sudo apt install qt5-default
|
|
||||||
sudo apt install liblmdb-dev
|
|
||||||
sudo apt install qttools5-dev-tools
|
|
||||||
sudo apt install qttools5-dev-tools
|
|
||||||
sudo apt install qttools5
|
|
||||||
sudo apt install qt5-qmltooling-plugins qml-module-qtgstreamer
|
|
||||||
sudo apt install libqt5webview5-dev
|
|
||||||
sudo apt install libqt5quickcontrols2-5
|
|
||||||
sudo apt install qtquickcontrols2-5-dev
|
|
||||||
sudo apt install libssl-dev
|
|
||||||
sudo apt install qml-module-qtgraphicaleffects
|
|
||||||
sudo apt install qml-module-qtquick-controls2
|
|
||||||
sudo apt install qml-module-qtquick-layouts
|
|
||||||
sudo apt install qml-module-qtmultimedia
|
|
||||||
sudo apt install qml-module-qt-labs-settings qml-module-qt-labs-sharedimage
|
|
||||||
sudo apt install qttools5-dev
|
|
||||||
sudo apt install libqt5svg5-dev
|
|
||||||
sudo apt install qt5multimedia
|
|
||||||
sudo apt install libqt5multimedia5
|
|
||||||
sudo apt install libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5multimediawidgets5
|
|
||||||
sudo apt install qt5ct
|
|
||||||
sudo apt install qtmultimedia5-dev
|
|
|
@ -18,7 +18,7 @@ class FlatButtonStateMachine : public QStateMachine
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FlatButtonStateMachine(FlatButton *parent);
|
explicit FlatButtonStateMachine(FlatButton *parent);
|
||||||
~FlatButtonStateMachine();
|
~FlatButtonStateMachine() override;
|
||||||
|
|
||||||
void setOverlayOpacity(qreal opacity);
|
void setOverlayOpacity(qreal opacity);
|
||||||
void setCheckedOverlayProgress(qreal opacity);
|
void setCheckedOverlayProgress(qreal opacity);
|
||||||
|
@ -100,7 +100,7 @@ public:
|
||||||
ui::Role role,
|
ui::Role role,
|
||||||
QWidget *parent = nullptr,
|
QWidget *parent = nullptr,
|
||||||
ui::ButtonPreset preset = ui::ButtonPreset::FlatPreset);
|
ui::ButtonPreset preset = ui::ButtonPreset::FlatPreset);
|
||||||
~FlatButton();
|
~FlatButton() override;
|
||||||
|
|
||||||
void applyPreset(ui::ButtonPreset preset);
|
void applyPreset(ui::ButtonPreset preset);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class LoadingIndicator : public QWidget
|
||||||
public:
|
public:
|
||||||
LoadingIndicator(QWidget *parent = nullptr);
|
LoadingIndicator(QWidget *parent = nullptr);
|
||||||
|
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e) override;
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
|
@ -13,7 +13,7 @@ class RaisedButton : public FlatButton
|
||||||
public:
|
public:
|
||||||
explicit RaisedButton(QWidget *parent = nullptr);
|
explicit RaisedButton(QWidget *parent = nullptr);
|
||||||
explicit RaisedButton(const QString &text, QWidget *parent = nullptr);
|
explicit RaisedButton(const QString &text, QWidget *parent = nullptr);
|
||||||
~RaisedButton();
|
~RaisedButton() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent *event) override;
|
bool event(QEvent *event) override;
|
||||||
|
|
|
@ -22,7 +22,7 @@ signals:
|
||||||
void contextMenuIsOpening();
|
void contextMenuIsOpening();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TextLabel : public QTextBrowser
|
class TextLabel : public QTextBrowser
|
||||||
|
|
Loading…
Reference in a new issue