summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 15:30:14 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 15:30:14 -0500
commit7ecf525f2007e046f54e83e4a460b7f8ff79c03d (patch)
tree3b1774f2d7dc2f7cf6949f4944fb74b639f449c4 /src
parent49075fd69d70b7850febe2fbc11f81d2d4e62cf1 (diff)
downloadqt3-7ecf525f2007e046f54e83e4a460b7f8ff79c03d.tar.gz
qt3-7ecf525f2007e046f54e83e4a460b7f8ff79c03d.zip
Fix a minor valgrind warning
Diffstat (limited to 'src')
-rw-r--r--src/kernel/qstyle.cpp24
-rw-r--r--src/kernel/qstyle.h22
2 files changed, 27 insertions, 19 deletions
diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp
index ebc7e5b..75757c9 100644
--- a/src/kernel/qstyle.cpp
+++ b/src/kernel/qstyle.cpp
@@ -2795,6 +2795,30 @@ QPixmap QStyle::stylePixmap(StylePixmap sp, const QWidget *w, const QStyleOption
\obsolete
*/
+#ifndef QT_NO_COMPAT
+int QStyle::defaultFrameWidth() const
+{
+ QStyleControlElementData ceData;
+ return pixelMetric( PM_DefaultFrameWidth, ceData, CEF_None );
+}
+
+void QStyle::tabbarMetrics( const QWidget* t, int& hf, int& vf, int& ov ) const
+{
+ QStyleControlElementData ceData;
+ hf = pixelMetric( PM_TabBarTabHSpace, ceData, CEF_None, t );
+ vf = pixelMetric( PM_TabBarTabVSpace, ceData, CEF_None, t );
+ ov = pixelMetric( PM_TabBarBaseOverlap, ceData, CEF_None, t );
+}
+
+QSize QStyle::scrollBarExtent() const
+{
+ QStyleControlElementData ceData;
+ ceData.orientation = Qt::Horizontal;
+ return QSize(pixelMetric(PM_ScrollBarExtent, ceData, CEF_None),
+ pixelMetric(PM_ScrollBarExtent, ceData, CEF_None));
+}
+#endif
+
QStyleControlElementData::QStyleControlElementData() {
isNull = true;
activePainter = 0;
diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h
index c38f403..be23340 100644
--- a/src/kernel/qstyle.h
+++ b/src/kernel/qstyle.h
@@ -1189,25 +1189,9 @@ public:
// Old 2.x QStyle API
#ifndef QT_NO_COMPAT
- int defaultFrameWidth() const
- {
- QStyleControlElementData ceData;
- return pixelMetric( PM_DefaultFrameWidth, ceData, CEF_None );
- }
- void tabbarMetrics( const QWidget* t,
- int& hf, int& vf, int& ov ) const
- {
- QStyleControlElementData ceData;
- hf = pixelMetric( PM_TabBarTabHSpace, ceData, CEF_None, t );
- vf = pixelMetric( PM_TabBarTabVSpace, ceData, CEF_None, t );
- ov = pixelMetric( PM_TabBarBaseOverlap, ceData, CEF_None, t );
- }
- QSize scrollBarExtent() const
- {
- QStyleControlElementData ceData;
- return QSize(pixelMetric(PM_ScrollBarExtent, ceData, CEF_None),
- pixelMetric(PM_ScrollBarExtent, ceData, CEF_None));
- }
+ int defaultFrameWidth() const;
+ void tabbarMetrics( const QWidget* t, int& hf, int& vf, int& ov ) const;
+ QSize scrollBarExtent() const;
#endif
public: