mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +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
|
||||
public:
|
||||
explicit Splitter(QWidget *parent = nullptr);
|
||||
~Splitter();
|
||||
~Splitter() override;
|
||||
|
||||
void restoreSizes(int fallback);
|
||||
|
||||
|
|
|
@ -30,10 +30,10 @@ class MsgCountComposedIcon : public QIconEngine
|
|||
public:
|
||||
MsgCountComposedIcon(const QString &filename);
|
||||
|
||||
virtual void paint(QPainter *p, const QRect &rect, QIcon::Mode mode, QIcon::State state);
|
||||
virtual QIconEngine *clone() const;
|
||||
virtual QList<QSize> availableSizes(QIcon::Mode mode, QIcon::State state) const;
|
||||
virtual QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state);
|
||||
void paint(QPainter *p, const QRect &rect, QIcon::Mode mode, QIcon::State state) override;
|
||||
QIconEngine *clone() const override;
|
||||
QList<QSize> availableSizes(QIcon::Mode mode, QIcon::State state) const override;
|
||||
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override;
|
||||
|
||||
int msgCount = 0;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
const QString &room_id);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *);
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
|
||||
private:
|
||||
QString dateFormat(const QDateTime &then) const;
|
||||
|
|
|
@ -35,7 +35,7 @@ signals:
|
|||
void clicked();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event)
|
||||
bool eventFilter(QObject *obj, QEvent *event) override
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
emit clicked();
|
||||
|
|
|
@ -31,7 +31,7 @@ class ItemDelegate : public QStyledItemDelegate
|
|||
|
||||
public:
|
||||
explicit ItemDelegate(QObject *parent = nullptr);
|
||||
~ItemDelegate();
|
||||
~ItemDelegate() override;
|
||||
|
||||
void paint(QPainter *painter,
|
||||
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:
|
||||
explicit FlatButtonStateMachine(FlatButton *parent);
|
||||
~FlatButtonStateMachine();
|
||||
~FlatButtonStateMachine() override;
|
||||
|
||||
void setOverlayOpacity(qreal opacity);
|
||||
void setCheckedOverlayProgress(qreal opacity);
|
||||
|
@ -100,7 +100,7 @@ public:
|
|||
ui::Role role,
|
||||
QWidget *parent = nullptr,
|
||||
ui::ButtonPreset preset = ui::ButtonPreset::FlatPreset);
|
||||
~FlatButton();
|
||||
~FlatButton() override;
|
||||
|
||||
void applyPreset(ui::ButtonPreset preset);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ class LoadingIndicator : public QWidget
|
|||
public:
|
||||
LoadingIndicator(QWidget *parent = nullptr);
|
||||
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
|
|
|
@ -13,7 +13,7 @@ class RaisedButton : public FlatButton
|
|||
public:
|
||||
explicit RaisedButton(QWidget *parent = nullptr);
|
||||
explicit RaisedButton(const QString &text, QWidget *parent = nullptr);
|
||||
~RaisedButton();
|
||||
~RaisedButton() override;
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event) override;
|
||||
|
|
|
@ -22,7 +22,7 @@ signals:
|
|||
void contextMenuIsOpening();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
};
|
||||
|
||||
class TextLabel : public QTextBrowser
|
||||
|
|
Loading…
Reference in a new issue