summaryrefslogtreecommitdiffstats
path: root/src/styles
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-05-14 19:34:10 -0500
committerTimothy Pearson <[email protected]>2013-05-14 19:34:10 -0500
commit4eba9b823832a5bab1acffeabc245b06fe113d75 (patch)
tree9ec81ead726a66066c6450c805beb8e233391a65 /src/styles
parentbe8413249bb8a6d8dc2cfc693d9c1037284fd251 (diff)
downloadqt3-4eba9b823832a5bab1acffeabc245b06fe113d75.tar.gz
qt3-4eba9b823832a5bab1acffeabc245b06fe113d75.zip
Fix a number of threading data races
Add proper thread termination handler This partially resolves Bug 1508
Diffstat (limited to 'src/styles')
-rw-r--r--src/styles/qcommonstyle.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp
index 0ab98b4..c7382d2 100644
--- a/src/styles/qcommonstyle.cpp
+++ b/src/styles/qcommonstyle.cpp
@@ -42,6 +42,7 @@
#ifndef QT_NO_STYLE
+#include "qmutex.h"
#include "qmenubar.h"
#include "qapplication.h"
#include "qpainter.h"
@@ -2782,6 +2783,9 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleControlElementData &ceD
ret = QMAX( QFontMetrics(ceData.font).lineSpacing(), 18 );
}
}
+ else {
+ ret = 0;
+ }
break; }
case PM_ScrollBarSliderMin:
ret = 9;
@@ -2853,12 +2857,15 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleControlElementData &ceD
int thickness = pixelMetric( PM_SliderControlThickness, ceData, elementFlags, widget );
int ticks = ceData.tickMarkSetting;
- if ( ticks == QSlider::Both )
+ if ( ticks == QSlider::Both ) {
ret = (space - thickness) / 2;
- else if ( ticks == QSlider::Above )
+ }
+ else if ( ticks == QSlider::Above ) {
ret = space - thickness;
- else
+ }
+ else {
ret = 0;
+ }
break;
}