summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-09-21 19:38:37 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-09-22 18:56:22 +0200
commit8259413e410b4291d1cef319c90718ff853a3ffc (patch)
tree7303cf456606dad279c77833eee51433033c28c3 /src/widgets
parentb4af1235eff3c7b23fdc5534453a45aa3db70e5e (diff)
GTK syle: initialize all members of GdkColor
Coverity rightfully complains that we're copying a struct with an uninitialized member, triggering undefined behavior. Change-Id: I7635b859eb11e5eb9b825df8e23b453116059892 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qgtkstyle.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index 9fa056960a..8ca6898b3d 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -297,6 +297,7 @@ static QColor mergedColors(const QColor &colorA, const QColor &colorB, int facto
static GdkColor fromQColor(const QColor &color)
{
GdkColor retval;
+ retval.pixel = 0;
retval.red = color.red() * 255;
retval.green = color.green() * 255;
retval.blue = color.blue() * 255;