Remove empty destructors

remotes/origin/HEAD
Konstantinos Sideris 7 years ago
parent 26f221ec23
commit ba8faa357f
  1. 1
      include/ChatPage.h
  2. 3
      include/CommunitiesListItem.h
  3. 1
      include/LoginPage.h
  4. 1
      include/RegisterPage.h
  5. 2
      include/RoomInfoListItem.h
  6. 1
      include/RoomList.h
  7. 1
      include/SideBarActions.h
  8. 1
      include/TextInputWidget.h
  9. 1
      include/TopRoomBar.h
  10. 1
      include/UserInfoWidget.h
  11. 1
      include/emoji/Category.h
  12. 2
      include/timeline/TimelineItem.h
  13. 1
      include/timeline/TimelineViewManager.h
  14. 1
      include/ui/Avatar.h
  15. 1
      include/ui/Badge.h
  16. 1
      include/ui/Label.h
  17. 1
      include/ui/Ripple.h
  18. 1
      include/ui/RippleOverlay.h
  19. 7
      include/ui/SnackBar.h
  20. 3
      include/ui/TextField.h
  21. 1
      include/ui/Theme.h
  22. 2
      src/ChatPage.cc
  23. 4
      src/CommunitiesListItem.cc
  24. 2
      src/LoginPage.cc
  25. 2
      src/RegisterPage.cc
  26. 2
      src/RoomInfoListItem.cc
  27. 2
      src/RoomList.cc
  28. 2
      src/SideBarActions.cc
  29. 2
      src/TextInputWidget.cc
  30. 2
      src/TopRoomBar.cc
  31. 2
      src/UserInfoWidget.cc
  32. 2
      src/emoji/Category.cc
  33. 2
      src/timeline/TimelineItem.cc
  34. 2
      src/timeline/TimelineViewManager.cc
  35. 2
      src/ui/Avatar.cc
  36. 2
      src/ui/Badge.cc
  37. 2
      src/ui/Ripple.cc
  38. 2
      src/ui/RippleOverlay.cc
  39. 16
      src/ui/SnackBar.cc
  40. 6
      src/ui/TextField.cc
  41. 2
      src/ui/Theme.cc

@ -60,7 +60,6 @@ public:
ChatPage(QSharedPointer<MatrixClient> client, ChatPage(QSharedPointer<MatrixClient> client,
QSharedPointer<UserSettings> userSettings, QSharedPointer<UserSettings> userSettings,
QWidget *parent = 0); QWidget *parent = 0);
~ChatPage();
// Initialize all the components of the UI. // Initialize all the components of the UI.
void bootstrap(QString userid, QString homeserver, QString token); void bootstrap(QString userid, QString homeserver, QString token);

@ -24,8 +24,6 @@ public:
QString community_id, QString community_id,
QWidget *parent = nullptr); QWidget *parent = nullptr);
~CommunitiesListItem();
void setCommunity(QSharedPointer<Community> community); void setCommunity(QSharedPointer<Community> community);
inline bool isPressed() const; inline bool isPressed() const;
@ -87,7 +85,6 @@ class WorldCommunityListItem : public CommunitiesListItem
Q_OBJECT Q_OBJECT
public: public:
WorldCommunityListItem(QWidget *parent = nullptr); WorldCommunityListItem(QWidget *parent = nullptr);
~WorldCommunityListItem();
protected: protected:
void mousePressEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override;

@ -35,7 +35,6 @@ class LoginPage : public QWidget
public: public:
LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0); LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0);
~LoginPage();
void reset(); void reset();

@ -32,7 +32,6 @@ class RegisterPage : public QWidget
public: public:
RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0); RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0);
~RegisterPage();
protected: protected:
void paintEvent(QPaintEvent *event) override; void paintEvent(QPaintEvent *event) override;

@ -67,8 +67,6 @@ public:
RoomInfoListItem(QString room_id, mtx::responses::InvitedRoom room, QWidget *parent = 0); RoomInfoListItem(QString room_id, mtx::responses::InvitedRoom room, QWidget *parent = 0);
~RoomInfoListItem();
void updateUnreadMessageCount(int count); void updateUnreadMessageCount(int count);
void clearUnreadMessageCount(); void clearUnreadMessageCount();
void setState(QSharedPointer<RoomState> state) void setState(QSharedPointer<RoomState> state)

@ -44,7 +44,6 @@ public:
RoomList(QSharedPointer<MatrixClient> client, RoomList(QSharedPointer<MatrixClient> client,
QSharedPointer<UserSettings> userSettings, QSharedPointer<UserSettings> userSettings,
QWidget *parent = 0); QWidget *parent = 0);
~RoomList();
void setCache(QSharedPointer<Cache> cache) { cache_ = cache; } void setCache(QSharedPointer<Cache> cache) { cache_ = cache; }
void setInitialRooms(const std::map<QString, QSharedPointer<RoomSettings>> &settings, void setInitialRooms(const std::map<QString, QSharedPointer<RoomSettings>> &settings,

@ -19,7 +19,6 @@ class SideBarActions : public QWidget
public: public:
SideBarActions(QWidget *parent = nullptr); SideBarActions(QWidget *parent = nullptr);
~SideBarActions();
signals: signals:
void showSettings(); void showSettings();

@ -80,7 +80,6 @@ class TextInputWidget : public QWidget
public: public:
TextInputWidget(QWidget *parent = 0); TextInputWidget(QWidget *parent = 0);
~TextInputWidget();
void stopTyping(); void stopTyping();

@ -41,7 +41,6 @@ class TopRoomBar : public QWidget
Q_OBJECT Q_OBJECT
public: public:
TopRoomBar(QWidget *parent = 0); TopRoomBar(QWidget *parent = 0);
~TopRoomBar();
void updateRoomAvatar(const QImage &avatar_image); void updateRoomAvatar(const QImage &avatar_image);
void updateRoomAvatar(const QIcon &icon); void updateRoomAvatar(const QIcon &icon);

@ -32,7 +32,6 @@ class UserInfoWidget : public QWidget
public: public:
UserInfoWidget(QWidget *parent = 0); UserInfoWidget(QWidget *parent = 0);
~UserInfoWidget();
void setAvatar(const QImage &img); void setAvatar(const QImage &img);
void setDisplayName(const QString &name); void setDisplayName(const QString &name);

@ -32,7 +32,6 @@ class Category : public QWidget
public: public:
Category(QString category, std::vector<Emoji> emoji, QWidget *parent = nullptr); Category(QString category, std::vector<Emoji> emoji, QWidget *parent = nullptr);
~Category();
signals: signals:
void emojiSelected(const QString &emoji); void emojiSelected(const QString &emoji);

@ -86,8 +86,6 @@ public:
void setEventId(const QString &event_id) { event_id_ = event_id; } void setEventId(const QString &event_id) { event_id_ = event_id; }
void markReceived(); void markReceived();
~TimelineItem();
protected: protected:
void paintEvent(QPaintEvent *event) override; void paintEvent(QPaintEvent *event) override;
void contextMenuEvent(QContextMenuEvent *event) override; void contextMenuEvent(QContextMenuEvent *event) override;

@ -35,7 +35,6 @@ class TimelineViewManager : public QStackedWidget
public: public:
TimelineViewManager(QSharedPointer<MatrixClient> client, QWidget *parent); TimelineViewManager(QSharedPointer<MatrixClient> client, QWidget *parent);
~TimelineViewManager();
// Initialize with timeline events. // Initialize with timeline events.
void initialize(const mtx::responses::Rooms &rooms); void initialize(const mtx::responses::Rooms &rooms);

@ -16,7 +16,6 @@ class Avatar : public QWidget
public: public:
explicit Avatar(QWidget *parent = 0); explicit Avatar(QWidget *parent = 0);
~Avatar();
void setBackgroundColor(const QColor &color); void setBackgroundColor(const QColor &color);
void setIcon(const QIcon &icon); void setIcon(const QIcon &icon);

@ -19,7 +19,6 @@ public:
explicit Badge(QWidget *parent = 0); explicit Badge(QWidget *parent = 0);
explicit Badge(const QIcon &icon, QWidget *parent = 0); explicit Badge(const QIcon &icon, QWidget *parent = 0);
explicit Badge(const QString &text, QWidget *parent = 0); explicit Badge(const QString &text, QWidget *parent = 0);
~Badge();
void setBackgroundColor(const QColor &color); void setBackgroundColor(const QColor &color);
void setTextColor(const QColor &color); void setTextColor(const QColor &color);

@ -11,7 +11,6 @@ public:
explicit Label(const QString &text, explicit Label(const QString &text,
QWidget *parent = Q_NULLPTR, QWidget *parent = Q_NULLPTR,
Qt::WindowFlags f = Qt::WindowFlags()); Qt::WindowFlags f = Qt::WindowFlags());
~Label() override {}
signals: signals:
void clicked(QMouseEvent *e); void clicked(QMouseEvent *e);

@ -18,7 +18,6 @@ class Ripple : public QParallelAnimationGroup
public: public:
explicit Ripple(const QPoint &center, QObject *parent = 0); explicit Ripple(const QPoint &center, QObject *parent = 0);
Ripple(const QPoint &center, RippleOverlay *overlay, QObject *parent = 0); Ripple(const QPoint &center, RippleOverlay *overlay, QObject *parent = 0);
~Ripple();
inline void setOverlay(RippleOverlay *overlay); inline void setOverlay(RippleOverlay *overlay);

@ -12,7 +12,6 @@ class RippleOverlay : public OverlayWidget
public: public:
explicit RippleOverlay(QWidget *parent = 0); explicit RippleOverlay(QWidget *parent = 0);
~RippleOverlay();
void addRipple(Ripple *ripple); void addRipple(Ripple *ripple);
void addRipple(const QPoint &position, qreal radius = 300); void addRipple(const QPoint &position, qreal radius = 300);

@ -2,7 +2,7 @@
#include <QCoreApplication> #include <QCoreApplication>
#include <QPaintEvent> #include <QPaintEvent>
#include <QStateMachine> #include <QSharedPointer>
#include <QTimer> #include <QTimer>
#include "OverlayWidget.h" #include "OverlayWidget.h"
@ -19,7 +19,6 @@ class SnackBar : public OverlayWidget
public: public:
explicit SnackBar(QWidget *parent); explicit SnackBar(QWidget *parent);
~SnackBar();
inline void setBackgroundColor(const QColor &color); inline void setBackgroundColor(const QColor &color);
inline void setTextColor(const QColor &color); inline void setTextColor(const QColor &color);
@ -48,8 +47,8 @@ private:
QList<QString> messages_; QList<QString> messages_;
QTimer *showTimer_; QSharedPointer<QTimer> showTimer_;
QTimer *hideTimer_; QSharedPointer<QTimer> hideTimer_;
int duration_; int duration_;
int boxWidth_; int boxWidth_;

@ -23,7 +23,6 @@ class TextField : public QLineEdit
public: public:
explicit TextField(QWidget *parent = 0); explicit TextField(QWidget *parent = 0);
~TextField();
void setInkColor(const QColor &color); void setInkColor(const QColor &color);
void setBackgroundColor(const QColor &color); void setBackgroundColor(const QColor &color);
@ -72,7 +71,6 @@ class TextFieldLabel : public QWidget
public: public:
TextFieldLabel(TextField *parent); TextFieldLabel(TextField *parent);
~TextFieldLabel();
inline void setColor(const QColor &color); inline void setColor(const QColor &color);
inline void setOffset(const QPointF &pos); inline void setOffset(const QPointF &pos);
@ -140,7 +138,6 @@ class TextFieldStateMachine : public QStateMachine
public: public:
TextFieldStateMachine(TextField *parent); TextFieldStateMachine(TextField *parent);
~TextFieldStateMachine();
inline void setProgress(qreal progress); inline void setProgress(qreal progress);
void setLabel(TextFieldLabel *label); void setLabel(TextFieldLabel *label);

@ -84,7 +84,6 @@ class Theme : public QObject
Q_OBJECT Q_OBJECT
public: public:
explicit Theme(QObject *parent = 0); explicit Theme(QObject *parent = 0);
~Theme();
QColor getColor(const QString &key) const; QColor getColor(const QString &key) const;

@ -988,5 +988,3 @@ ChatPage::retryInitialSync()
client_->initialSync(); client_->initialSync();
initialSyncTimer_->start(INITIAL_SYNC_RETRY_TIMEOUT); initialSyncTimer_->start(INITIAL_SYNC_RETRY_TIMEOUT);
} }
ChatPage::~ChatPage() {}

@ -13,8 +13,6 @@ CommunitiesListItem::CommunitiesListItem(QSharedPointer<Community> community,
setFixedWidth(ui::sidebar::CommunitiesSidebarSize); setFixedWidth(ui::sidebar::CommunitiesSidebarSize);
} }
CommunitiesListItem::~CommunitiesListItem() {}
void void
CommunitiesListItem::setCommunity(QSharedPointer<Community> community) CommunitiesListItem::setCommunity(QSharedPointer<Community> community)
{ {
@ -150,8 +148,6 @@ WorldCommunityListItem::WorldCommunityListItem(QWidget *parent)
: CommunitiesListItem(QSharedPointer<Community>(), "", parent) : CommunitiesListItem(QSharedPointer<Community>(), "", parent)
{} {}
WorldCommunityListItem::~WorldCommunityListItem() {}
void void
WorldCommunityListItem::mousePressEvent(QMouseEvent *event) WorldCommunityListItem::mousePressEvent(QMouseEvent *event)
{ {

@ -295,5 +295,3 @@ LoginPage::paintEvent(QPaintEvent *)
QPainter p(this); QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
} }
LoginPage::~LoginPage() {}

@ -177,5 +177,3 @@ RegisterPage::paintEvent(QPaintEvent *)
QPainter p(this); QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
} }
RegisterPage::~RegisterPage() {}

@ -388,5 +388,3 @@ RoomInfoListItem::setDescriptionMessage(const DescInfo &info)
lastMsgInfo_ = info; lastMsgInfo_ = info;
update(); update();
} }
RoomInfoListItem::~RoomInfoListItem() {}

@ -73,8 +73,6 @@ RoomList::RoomList(QSharedPointer<MatrixClient> client,
}); });
} }
RoomList::~RoomList() {}
void void
RoomList::clear() RoomList::clear()
{ {

@ -116,8 +116,6 @@ SideBarActions::SideBarActions(QWidget *parent)
connect(settingsBtn_, &QPushButton::clicked, this, &SideBarActions::showSettings); connect(settingsBtn_, &QPushButton::clicked, this, &SideBarActions::showSettings);
} }
SideBarActions::~SideBarActions() {}
void void
SideBarActions::resizeEvent(QResizeEvent *event) SideBarActions::resizeEvent(QResizeEvent *event)
{ {

@ -401,8 +401,6 @@ TextInputWidget::hideUploadSpinner()
spinner_->stop(); spinner_->stop();
} }
TextInputWidget::~TextInputWidget() {}
void void
TextInputWidget::stopTyping() TextInputWidget::stopTyping()
{ {

@ -233,5 +233,3 @@ TopRoomBar::updateRoomTopic(QString topic)
roomTopic_ = topic; roomTopic_ = topic;
update(); update();
} }
TopRoomBar::~TopRoomBar() {}

@ -119,8 +119,6 @@ UserInfoWidget::closeLogoutDialog(bool isLoggingOut)
emit logout(); emit logout();
} }
UserInfoWidget::~UserInfoWidget() {}
void void
UserInfoWidget::resizeEvent(QResizeEvent *event) UserInfoWidget::resizeEvent(QResizeEvent *event)
{ {

@ -88,5 +88,3 @@ Category::paintEvent(QPaintEvent *)
QPainter p(this); QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
} }
Category::~Category() {}

@ -497,8 +497,6 @@ TimelineItem::setUserAvatar(const QImage &avatar)
userAvatar_->setImage(avatar); userAvatar_->setImage(avatar);
} }
TimelineItem::~TimelineItem() {}
void void
TimelineItem::contextMenuEvent(QContextMenuEvent *event) TimelineItem::contextMenuEvent(QContextMenuEvent *event)
{ {

@ -45,8 +45,6 @@ TimelineViewManager::TimelineViewManager(QSharedPointer<MatrixClient> client, QW
&TimelineViewManager::messageSendFailed); &TimelineViewManager::messageSendFailed);
} }
TimelineViewManager::~TimelineViewManager() {}
void void
TimelineViewManager::messageSent(const QString &event_id, const QString &roomid, int txn_id) TimelineViewManager::messageSent(const QString &event_id, const QString &roomid, int txn_id)
{ {

@ -17,8 +17,6 @@ Avatar::Avatar(QWidget *parent)
setSizePolicy(policy); setSizePolicy(policy);
} }
Avatar::~Avatar() {}
QColor QColor
Avatar::textColor() const Avatar::textColor() const
{ {

@ -22,8 +22,6 @@ Badge::Badge(const QString &text, QWidget *parent)
setText(text); setText(text);
} }
Badge::~Badge() {}
void void
Badge::init() Badge::init()
{ {

@ -25,8 +25,6 @@ Ripple::Ripple(const QPoint &center, RippleOverlay *overlay, QObject *parent)
init(); init();
} }
Ripple::~Ripple() {}
void void
Ripple::setRadius(qreal radius) Ripple::setRadius(qreal radius)
{ {

@ -11,8 +11,6 @@ RippleOverlay::RippleOverlay(QWidget *parent)
setAttribute(Qt::WA_NoSystemBackground); setAttribute(Qt::WA_NoSystemBackground);
} }
RippleOverlay::~RippleOverlay() {}
void void
RippleOverlay::addRipple(Ripple *ripple) RippleOverlay::addRipple(Ripple *ripple)
{ {

@ -23,20 +23,12 @@ SnackBar::SnackBar(QWidget *parent)
font.setWeight(50); font.setWeight(50);
setFont(font); setFont(font);
showTimer_ = new QTimer(); showTimer_ = QSharedPointer<QTimer>(new QTimer);
hideTimer_ = new QTimer(); hideTimer_ = QSharedPointer<QTimer>(new QTimer);
hideTimer_->setSingleShot(true); hideTimer_->setSingleShot(true);
connect(showTimer_, SIGNAL(timeout()), this, SLOT(onTimeout())); connect(showTimer_.data(), SIGNAL(timeout()), this, SLOT(onTimeout()));
connect(hideTimer_, SIGNAL(timeout()), this, SLOT(hideMessage())); connect(hideTimer_.data(), SIGNAL(timeout()), this, SLOT(hideMessage()));
}
SnackBar::~SnackBar()
{
stopTimers();
delete showTimer_;
delete hideTimer_;
} }
void void

@ -32,8 +32,6 @@ TextField::TextField(QWidget *parent)
QCoreApplication::processEvents(); QCoreApplication::processEvents();
} }
TextField::~TextField() {}
void void
TextField::setBackgroundColor(const QColor &color) TextField::setBackgroundColor(const QColor &color)
{ {
@ -273,8 +271,6 @@ TextFieldStateMachine::TextFieldStateMachine(TextField *parent)
connect(text_field_, SIGNAL(textChanged(QString)), this, SLOT(setupProperties())); connect(text_field_, SIGNAL(textChanged(QString)), this, SLOT(setupProperties()));
} }
TextFieldStateMachine::~TextFieldStateMachine() {}
void void
TextFieldStateMachine::setLabel(TextFieldLabel *label) TextFieldStateMachine::setLabel(TextFieldLabel *label)
{ {
@ -350,8 +346,6 @@ TextFieldLabel::TextFieldLabel(TextField *parent)
setFont(font); setFont(font);
} }
TextFieldLabel::~TextFieldLabel() {}
void void
TextFieldLabel::paintEvent(QPaintEvent *) TextFieldLabel::paintEvent(QPaintEvent *)
{ {

@ -22,8 +22,6 @@ Theme::Theme(QObject *parent)
setColor("Transparent", ui::Color::Transparent); setColor("Transparent", ui::Color::Transparent);
} }
Theme::~Theme() {}
QColor QColor
Theme::rgba(int r, int g, int b, qreal a) const Theme::rgba(int r, int g, int b, qreal a) const
{ {

Loading…
Cancel
Save