QSystemTrayIcon: initialize all members

The 'showArrow' member was not init'ed.

Initialize it to true, which is the default value of the
QBalloonTip::showBalloon() function's argument of the same
purpose.

Reported as new by Coverity, but dating back all the way to
cc3875c2e4, so affects all
current branches.

Coverity-Id: 171482
Change-Id: Ica519ecda3a4ae413f606faab8c22f7072f412a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
Marc Mutz 2016-10-05 23:29:41 +02:00
parent 7d898ae38e
commit 6292ecdf6d
1 changed files with 4 additions and 1 deletions

View File

@ -436,7 +436,10 @@ bool QBalloonTip::isBalloonVisible()
QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title,
const QString& message, QSystemTrayIcon *ti)
: QWidget(0, Qt::ToolTip), trayIcon(ti), timerId(-1)
: QWidget(0, Qt::ToolTip),
trayIcon(ti),
timerId(-1),
showArrow(true)
{
setAttribute(Qt::WA_DeleteOnClose);
QObject::connect(ti, SIGNAL(destroyed()), this, SLOT(close()));