summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-10-05 23:29:41 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-02-07 19:40:29 +0000
commit51cdbeeeb6d6b049f772ef2073dd4b607578b340 (patch)
tree0ad7e1a42b3a08bcbb8f9b2ec3def67fa3a4eb4e
parentb705fc45c454a9cecbcaa7f99e4963d94da9b86c (diff)
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 cc3875c2e463be5cf126a18637295a0c56358eda, so affects all current branches. Coverity-Id: 171482 Change-Id: Ica519ecda3a4ae413f606faab8c22f7072f412a8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 6292ecdf6da6c13942dd3f39c9cd164c29c7ab37)
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index 704142fe5c..5443168c4f 100644
--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -430,7 +430,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()));