summary refs log tree commit diff
path: root/src/ui/SnackBar.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-10 16:29:09 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-10 16:29:09 +0200
commitba8faa357f78561d00b3acf694644b7c3d0bd92b (patch)
tree454a3eb27f5327937f992eba5074a4a4b672f41e /src/ui/SnackBar.cc
parentMove LeaveRoom dialog to MainWindow (#87) (diff)
downloadnheko-ba8faa357f78561d00b3acf694644b7c3d0bd92b.tar.xz
Remove empty destructors
Diffstat (limited to 'src/ui/SnackBar.cc')
-rw-r--r--src/ui/SnackBar.cc16
1 files changed, 4 insertions, 12 deletions
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