Hide SnackBar initially & guard against access of an empty list

This commit is contained in:
Konstantinos Sideris 2018-05-08 23:38:57 +03:00
parent ebed87ea57
commit 7d809be79f
3 changed files with 24 additions and 20 deletions

View file

@ -2,8 +2,8 @@
#include <QCoreApplication>
#include <QPaintEvent>
#include <QSharedPointer>
#include <QTimer>
#include <deque>
#include "OverlayWidget.h"
@ -44,10 +44,10 @@ private:
qreal bgOpacity_;
qreal offset_;
QList<QString> messages_;
std::deque<QString> messages_;
QSharedPointer<QTimer> showTimer_;
QSharedPointer<QTimer> hideTimer_;
QTimer showTimer_;
QTimer hideTimer_;
int duration_;
int boxWidth_;