Remove empty destructors
This commit is contained in:
parent
26f221ec23
commit
ba8faa357f
@ -60,7 +60,6 @@ public:
|
||||
ChatPage(QSharedPointer<MatrixClient> client,
|
||||
QSharedPointer<UserSettings> userSettings,
|
||||
QWidget *parent = 0);
|
||||
~ChatPage();
|
||||
|
||||
// Initialize all the components of the UI.
|
||||
void bootstrap(QString userid, QString homeserver, QString token);
|
||||
|
@ -24,8 +24,6 @@ public:
|
||||
QString community_id,
|
||||
QWidget *parent = nullptr);
|
||||
|
||||
~CommunitiesListItem();
|
||||
|
||||
void setCommunity(QSharedPointer<Community> community);
|
||||
|
||||
inline bool isPressed() const;
|
||||
@ -87,7 +85,6 @@ class WorldCommunityListItem : public CommunitiesListItem
|
||||
Q_OBJECT
|
||||
public:
|
||||
WorldCommunityListItem(QWidget *parent = nullptr);
|
||||
~WorldCommunityListItem();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
|
@ -35,7 +35,6 @@ class LoginPage : public QWidget
|
||||
|
||||
public:
|
||||
LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0);
|
||||
~LoginPage();
|
||||
|
||||
void reset();
|
||||
|
||||
|
@ -32,7 +32,6 @@ class RegisterPage : public QWidget
|
||||
|
||||
public:
|
||||
RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0);
|
||||
~RegisterPage();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
@ -67,8 +67,6 @@ public:
|
||||
|
||||
RoomInfoListItem(QString room_id, mtx::responses::InvitedRoom room, QWidget *parent = 0);
|
||||
|
||||
~RoomInfoListItem();
|
||||
|
||||
void updateUnreadMessageCount(int count);
|
||||
void clearUnreadMessageCount();
|
||||
void setState(QSharedPointer<RoomState> state)
|
||||
|
@ -44,7 +44,6 @@ public:
|
||||
RoomList(QSharedPointer<MatrixClient> client,
|
||||
QSharedPointer<UserSettings> userSettings,
|
||||
QWidget *parent = 0);
|
||||
~RoomList();
|
||||
|
||||
void setCache(QSharedPointer<Cache> cache) { cache_ = cache; }
|
||||
void setInitialRooms(const std::map<QString, QSharedPointer<RoomSettings>> &settings,
|
||||
|
@ -19,7 +19,6 @@ class SideBarActions : public QWidget
|
||||
|
||||
public:
|
||||
SideBarActions(QWidget *parent = nullptr);
|
||||
~SideBarActions();
|
||||
|
||||
signals:
|
||||
void showSettings();
|
||||
|
@ -80,7 +80,6 @@ class TextInputWidget : public QWidget
|
||||
|
||||
public:
|
||||
TextInputWidget(QWidget *parent = 0);
|
||||
~TextInputWidget();
|
||||
|
||||
void stopTyping();
|
||||
|
||||
|
@ -41,7 +41,6 @@ class TopRoomBar : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
TopRoomBar(QWidget *parent = 0);
|
||||
~TopRoomBar();
|
||||
|
||||
void updateRoomAvatar(const QImage &avatar_image);
|
||||
void updateRoomAvatar(const QIcon &icon);
|
||||
|
@ -32,7 +32,6 @@ class UserInfoWidget : public QWidget
|
||||
|
||||
public:
|
||||
UserInfoWidget(QWidget *parent = 0);
|
||||
~UserInfoWidget();
|
||||
|
||||
void setAvatar(const QImage &img);
|
||||
void setDisplayName(const QString &name);
|
||||
|
@ -32,7 +32,6 @@ class Category : public QWidget
|
||||
|
||||
public:
|
||||
Category(QString category, std::vector<Emoji> emoji, QWidget *parent = nullptr);
|
||||
~Category();
|
||||
|
||||
signals:
|
||||
void emojiSelected(const QString &emoji);
|
||||
|
@ -86,8 +86,6 @@ public:
|
||||
void setEventId(const QString &event_id) { event_id_ = event_id; }
|
||||
void markReceived();
|
||||
|
||||
~TimelineItem();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
|
@ -35,7 +35,6 @@ class TimelineViewManager : public QStackedWidget
|
||||
|
||||
public:
|
||||
TimelineViewManager(QSharedPointer<MatrixClient> client, QWidget *parent);
|
||||
~TimelineViewManager();
|
||||
|
||||
// Initialize with timeline events.
|
||||
void initialize(const mtx::responses::Rooms &rooms);
|
||||
|
@ -16,7 +16,6 @@ class Avatar : public QWidget
|
||||
|
||||
public:
|
||||
explicit Avatar(QWidget *parent = 0);
|
||||
~Avatar();
|
||||
|
||||
void setBackgroundColor(const QColor &color);
|
||||
void setIcon(const QIcon &icon);
|
||||
|
@ -19,7 +19,6 @@ public:
|
||||
explicit Badge(QWidget *parent = 0);
|
||||
explicit Badge(const QIcon &icon, QWidget *parent = 0);
|
||||
explicit Badge(const QString &text, QWidget *parent = 0);
|
||||
~Badge();
|
||||
|
||||
void setBackgroundColor(const QColor &color);
|
||||
void setTextColor(const QColor &color);
|
||||
|
@ -11,7 +11,6 @@ public:
|
||||
explicit Label(const QString &text,
|
||||
QWidget *parent = Q_NULLPTR,
|
||||
Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~Label() override {}
|
||||
|
||||
signals:
|
||||
void clicked(QMouseEvent *e);
|
||||
|
@ -18,7 +18,6 @@ class Ripple : public QParallelAnimationGroup
|
||||
public:
|
||||
explicit Ripple(const QPoint ¢er, QObject *parent = 0);
|
||||
Ripple(const QPoint ¢er, RippleOverlay *overlay, QObject *parent = 0);
|
||||
~Ripple();
|
||||
|
||||
inline void setOverlay(RippleOverlay *overlay);
|
||||
|
||||
|
@ -12,7 +12,6 @@ class RippleOverlay : public OverlayWidget
|
||||
|
||||
public:
|
||||
explicit RippleOverlay(QWidget *parent = 0);
|
||||
~RippleOverlay();
|
||||
|
||||
void addRipple(Ripple *ripple);
|
||||
void addRipple(const QPoint &position, qreal radius = 300);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QPaintEvent>
|
||||
#include <QStateMachine>
|
||||
#include <QSharedPointer>
|
||||
#include <QTimer>
|
||||
|
||||
#include "OverlayWidget.h"
|
||||
@ -19,7 +19,6 @@ class SnackBar : public OverlayWidget
|
||||
|
||||
public:
|
||||
explicit SnackBar(QWidget *parent);
|
||||
~SnackBar();
|
||||
|
||||
inline void setBackgroundColor(const QColor &color);
|
||||
inline void setTextColor(const QColor &color);
|
||||
@ -48,8 +47,8 @@ private:
|
||||
|
||||
QList<QString> messages_;
|
||||
|
||||
QTimer *showTimer_;
|
||||
QTimer *hideTimer_;
|
||||
QSharedPointer<QTimer> showTimer_;
|
||||
QSharedPointer<QTimer> hideTimer_;
|
||||
|
||||
int duration_;
|
||||
int boxWidth_;
|
||||
|
@ -23,7 +23,6 @@ class TextField : public QLineEdit
|
||||
|
||||
public:
|
||||
explicit TextField(QWidget *parent = 0);
|
||||
~TextField();
|
||||
|
||||
void setInkColor(const QColor &color);
|
||||
void setBackgroundColor(const QColor &color);
|
||||
@ -72,7 +71,6 @@ class TextFieldLabel : public QWidget
|
||||
|
||||
public:
|
||||
TextFieldLabel(TextField *parent);
|
||||
~TextFieldLabel();
|
||||
|
||||
inline void setColor(const QColor &color);
|
||||
inline void setOffset(const QPointF &pos);
|
||||
@ -140,7 +138,6 @@ class TextFieldStateMachine : public QStateMachine
|
||||
|
||||
public:
|
||||
TextFieldStateMachine(TextField *parent);
|
||||
~TextFieldStateMachine();
|
||||
|
||||
inline void setProgress(qreal progress);
|
||||
void setLabel(TextFieldLabel *label);
|
||||
|
@ -84,7 +84,6 @@ class Theme : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Theme(QObject *parent = 0);
|
||||
~Theme();
|
||||
|
||||
QColor getColor(const QString &key) const;
|
||||
|
||||
|
@ -988,5 +988,3 @@ ChatPage::retryInitialSync()
|
||||
client_->initialSync();
|
||||
initialSyncTimer_->start(INITIAL_SYNC_RETRY_TIMEOUT);
|
||||
}
|
||||
|
||||
ChatPage::~ChatPage() {}
|
||||
|
@ -13,8 +13,6 @@ CommunitiesListItem::CommunitiesListItem(QSharedPointer<Community> community,
|
||||
setFixedWidth(ui::sidebar::CommunitiesSidebarSize);
|
||||
}
|
||||
|
||||
CommunitiesListItem::~CommunitiesListItem() {}
|
||||
|
||||
void
|
||||
CommunitiesListItem::setCommunity(QSharedPointer<Community> community)
|
||||
{
|
||||
@ -150,8 +148,6 @@ WorldCommunityListItem::WorldCommunityListItem(QWidget *parent)
|
||||
: CommunitiesListItem(QSharedPointer<Community>(), "", parent)
|
||||
{}
|
||||
|
||||
WorldCommunityListItem::~WorldCommunityListItem() {}
|
||||
|
||||
void
|
||||
WorldCommunityListItem::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
|
@ -295,5 +295,3 @@ LoginPage::paintEvent(QPaintEvent *)
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
||||
LoginPage::~LoginPage() {}
|
||||
|
@ -177,5 +177,3 @@ RegisterPage::paintEvent(QPaintEvent *)
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
||||
RegisterPage::~RegisterPage() {}
|
||||
|
@ -388,5 +388,3 @@ RoomInfoListItem::setDescriptionMessage(const DescInfo &info)
|
||||
lastMsgInfo_ = info;
|
||||
update();
|
||||
}
|
||||
|
||||
RoomInfoListItem::~RoomInfoListItem() {}
|
||||
|
@ -73,8 +73,6 @@ RoomList::RoomList(QSharedPointer<MatrixClient> client,
|
||||
});
|
||||
}
|
||||
|
||||
RoomList::~RoomList() {}
|
||||
|
||||
void
|
||||
RoomList::clear()
|
||||
{
|
||||
|
@ -116,8 +116,6 @@ SideBarActions::SideBarActions(QWidget *parent)
|
||||
connect(settingsBtn_, &QPushButton::clicked, this, &SideBarActions::showSettings);
|
||||
}
|
||||
|
||||
SideBarActions::~SideBarActions() {}
|
||||
|
||||
void
|
||||
SideBarActions::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
|
@ -401,8 +401,6 @@ TextInputWidget::hideUploadSpinner()
|
||||
spinner_->stop();
|
||||
}
|
||||
|
||||
TextInputWidget::~TextInputWidget() {}
|
||||
|
||||
void
|
||||
TextInputWidget::stopTyping()
|
||||
{
|
||||
|
@ -233,5 +233,3 @@ TopRoomBar::updateRoomTopic(QString topic)
|
||||
roomTopic_ = topic;
|
||||
update();
|
||||
}
|
||||
|
||||
TopRoomBar::~TopRoomBar() {}
|
||||
|
@ -119,8 +119,6 @@ UserInfoWidget::closeLogoutDialog(bool isLoggingOut)
|
||||
emit logout();
|
||||
}
|
||||
|
||||
UserInfoWidget::~UserInfoWidget() {}
|
||||
|
||||
void
|
||||
UserInfoWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
|
@ -88,5 +88,3 @@ Category::paintEvent(QPaintEvent *)
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
||||
Category::~Category() {}
|
||||
|
@ -497,8 +497,6 @@ TimelineItem::setUserAvatar(const QImage &avatar)
|
||||
userAvatar_->setImage(avatar);
|
||||
}
|
||||
|
||||
TimelineItem::~TimelineItem() {}
|
||||
|
||||
void
|
||||
TimelineItem::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
|
@ -45,8 +45,6 @@ TimelineViewManager::TimelineViewManager(QSharedPointer<MatrixClient> client, QW
|
||||
&TimelineViewManager::messageSendFailed);
|
||||
}
|
||||
|
||||
TimelineViewManager::~TimelineViewManager() {}
|
||||
|
||||
void
|
||||
TimelineViewManager::messageSent(const QString &event_id, const QString &roomid, int txn_id)
|
||||
{
|
||||
|
@ -17,8 +17,6 @@ Avatar::Avatar(QWidget *parent)
|
||||
setSizePolicy(policy);
|
||||
}
|
||||
|
||||
Avatar::~Avatar() {}
|
||||
|
||||
QColor
|
||||
Avatar::textColor() const
|
||||
{
|
||||
|
@ -22,8 +22,6 @@ Badge::Badge(const QString &text, QWidget *parent)
|
||||
setText(text);
|
||||
}
|
||||
|
||||
Badge::~Badge() {}
|
||||
|
||||
void
|
||||
Badge::init()
|
||||
{
|
||||
|
@ -25,8 +25,6 @@ Ripple::Ripple(const QPoint ¢er, RippleOverlay *overlay, QObject *parent)
|
||||
init();
|
||||
}
|
||||
|
||||
Ripple::~Ripple() {}
|
||||
|
||||
void
|
||||
Ripple::setRadius(qreal radius)
|
||||
{
|
||||
|
@ -11,8 +11,6 @@ RippleOverlay::RippleOverlay(QWidget *parent)
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
}
|
||||
|
||||
RippleOverlay::~RippleOverlay() {}
|
||||
|
||||
void
|
||||
RippleOverlay::addRipple(Ripple *ripple)
|
||||
{
|
||||
|
@ -23,20 +23,12 @@ SnackBar::SnackBar(QWidget *parent)
|
||||
font.setWeight(50);
|
||||
setFont(font);
|
||||
|
||||
showTimer_ = new QTimer();
|
||||
hideTimer_ = new QTimer();
|
||||
showTimer_ = QSharedPointer<QTimer>(new QTimer);
|
||||
hideTimer_ = QSharedPointer<QTimer>(new QTimer);
|
||||
hideTimer_->setSingleShot(true);
|
||||
|
||||
connect(showTimer_, SIGNAL(timeout()), this, SLOT(onTimeout()));
|
||||
connect(hideTimer_, SIGNAL(timeout()), this, SLOT(hideMessage()));
|
||||
}
|
||||
|
||||
SnackBar::~SnackBar()
|
||||
{
|
||||
stopTimers();
|
||||
|
||||
delete showTimer_;
|
||||
delete hideTimer_;
|
||||
connect(showTimer_.data(), SIGNAL(timeout()), this, SLOT(onTimeout()));
|
||||
connect(hideTimer_.data(), SIGNAL(timeout()), this, SLOT(hideMessage()));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -32,8 +32,6 @@ TextField::TextField(QWidget *parent)
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
|
||||
TextField::~TextField() {}
|
||||
|
||||
void
|
||||
TextField::setBackgroundColor(const QColor &color)
|
||||
{
|
||||
@ -273,8 +271,6 @@ TextFieldStateMachine::TextFieldStateMachine(TextField *parent)
|
||||
connect(text_field_, SIGNAL(textChanged(QString)), this, SLOT(setupProperties()));
|
||||
}
|
||||
|
||||
TextFieldStateMachine::~TextFieldStateMachine() {}
|
||||
|
||||
void
|
||||
TextFieldStateMachine::setLabel(TextFieldLabel *label)
|
||||
{
|
||||
@ -350,8 +346,6 @@ TextFieldLabel::TextFieldLabel(TextField *parent)
|
||||
setFont(font);
|
||||
}
|
||||
|
||||
TextFieldLabel::~TextFieldLabel() {}
|
||||
|
||||
void
|
||||
TextFieldLabel::paintEvent(QPaintEvent *)
|
||||
{
|
||||
|
@ -22,8 +22,6 @@ Theme::Theme(QObject *parent)
|
||||
setColor("Transparent", ui::Color::Transparent);
|
||||
}
|
||||
|
||||
Theme::~Theme() {}
|
||||
|
||||
QColor
|
||||
Theme::rgba(int r, int g, int b, qreal a) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user