diff --git a/src/ui/Avatar.cc b/src/ui/Avatar.cc
index 17ee198e..81e6cbed 100644
--- a/src/ui/Avatar.cc
+++ b/src/ui/Avatar.cc
@@ -17,8 +17,6 @@ Avatar::Avatar(QWidget *parent)
setSizePolicy(policy);
}
-Avatar::~Avatar() {}
-
QColor
Avatar::textColor() const
{
diff --git a/src/ui/Badge.cc b/src/ui/Badge.cc
index 016ed64f..6701f9b7 100644
--- a/src/ui/Badge.cc
+++ b/src/ui/Badge.cc
@@ -22,8 +22,6 @@ Badge::Badge(const QString &text, QWidget *parent)
setText(text);
}
-Badge::~Badge() {}
-
void
Badge::init()
{
diff --git a/src/ui/Ripple.cc b/src/ui/Ripple.cc
index 008d7a6a..e22c4a62 100644
--- a/src/ui/Ripple.cc
+++ b/src/ui/Ripple.cc
@@ -25,8 +25,6 @@ Ripple::Ripple(const QPoint ¢er, RippleOverlay *overlay, QObject *parent)
init();
}
-Ripple::~Ripple() {}
-
void
Ripple::setRadius(qreal radius)
{
diff --git a/src/ui/RippleOverlay.cc b/src/ui/RippleOverlay.cc
index a3567db2..20e98c0f 100644
--- a/src/ui/RippleOverlay.cc
+++ b/src/ui/RippleOverlay.cc
@@ -11,8 +11,6 @@ RippleOverlay::RippleOverlay(QWidget *parent)
setAttribute(Qt::WA_NoSystemBackground);
}
-RippleOverlay::~RippleOverlay() {}
-
void
RippleOverlay::addRipple(Ripple *ripple)
{
diff --git a/src/ui/SnackBar.cc b/src/ui/SnackBar.cc
index fb415fcd..1f02ee95 100644
--- a/src/ui/SnackBar.cc
+++ b/src/ui/SnackBar.cc
@@ -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
diff --git a/src/ui/TextField.cc b/src/ui/TextField.cc
index 9b410ae5..0c936e69 100644
--- a/src/ui/TextField.cc
+++ b/src/ui/TextField.cc
@@ -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 *)
{
diff --git a/src/ui/Theme.cc b/src/ui/Theme.cc
index 622428b0..7209864a 100644
--- a/src/ui/Theme.cc
+++ b/src/ui/Theme.cc
@@ -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
{
|