summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-05-20 09:21:58 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-20 10:06:33 (GMT)
commitd1d8df1076fe7884056798e1974a299ab9d7684e (patch)
tree46068ffeb8cd64f8d875f0cc4af1788dadda5fda
parent7a1accc89c5c45ef514ebf0e7693cd9522fa0362 (diff)
downloadQt-d1d8df1076fe7884056798e1974a299ab9d7684e.zip
Qt-d1d8df1076fe7884056798e1974a299ab9d7684e.tar.gz
Qt-d1d8df1076fe7884056798e1974a299ab9d7684e.tar.bz2
Compile with gcc 4.0.1
qstylehelper_p.h now includes qstringbuilder.h This triggers a gcc 4.0.1 bug when doing addition or % on annonymous enum - include qstylehelper_p.h last to avoid errors in 3rd party header - explicitly cast enums to int in qwindowsstyle.cpp Reviewed-by: Thierry
-rw-r--r--src/gui/image/qicon.cpp3
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp2
-rw-r--r--src/gui/styles/qcommonstyle.cpp3
-rw-r--r--src/gui/styles/qmacstyle_mac.mm2
-rw-r--r--src/gui/styles/qplastiquestyle.cpp2
-rw-r--r--src/gui/styles/qproxystyle.cpp2
-rw-r--r--src/gui/styles/qstyle_p.h1
-rw-r--r--src/gui/styles/qstylehelper.cpp3
-rw-r--r--src/gui/styles/qwindowsstyle.cpp8
9 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 7696632..a2f429a 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -55,7 +55,6 @@
#include "qcache.h"
#include "qdebug.h"
#include "private/qguiplatformplugin_p.h"
-#include "private/qstylehelper_p.h"
#ifdef Q_WS_MAC
#include <private/qt_mac_p.h>
@@ -67,6 +66,8 @@
#include "private/qkde_p.h"
#endif
+#include "private/qstylehelper_p.h"
+
#ifndef QT_NO_ICON
QT_BEGIN_NAMESPACE
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index d9f7df0..883f511 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -44,7 +44,6 @@
#if !defined(QT_NO_STYLE_CLEANLOOKS) || defined(QT_PLUGIN)
-#include <private/qstylehelper_p.h>
#include "qwindowsstyle_p.h"
#include <qcombobox.h>
#include <qpushbutton.h>
@@ -67,6 +66,7 @@
#include <qtoolbar.h>
#include <qwizard.h>
#include <qlibrary.h>
+#include <private/qstylehelper_p.h>
#define CL_MAX(a,b) (a)>(b) ? (a):(b) // ### qMin/qMax does not work for vc6
#define CL_MIN(a,b) (a)<(b) ? (a):(b) // remove this when it is working
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 8036728..4978565 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -65,7 +65,6 @@
#include <qrubberband.h>
#include <private/qcommonstylepixmaps_p.h>
#include <private/qmath_p.h>
-#include <private/qstylehelper_p.h>
#include <qdebug.h>
#include <qtextformat.h>
#include <qwizard.h>
@@ -88,6 +87,8 @@
# include <private/qt_cocoa_helpers_mac_p.h>
#endif
+#include <private/qstylehelper_p.h>
+
QT_BEGIN_NAMESPACE
/*!
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index e065bcc..2e2f374 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -56,7 +56,6 @@
#include <private/qpaintengine_mac_p.h>
#include <private/qpainter_p.h>
#include <private/qprintengine_mac_p.h>
-#include <private/qstylehelper_p.h>
#include <qapplication.h>
#include <qbitmap.h>
#include <qcheckbox.h>
@@ -101,6 +100,7 @@
#include <QtGui/qgraphicsproxywidget.h>
#include <QtGui/qgraphicsview.h>
#include <private/qt_cocoa_helpers_mac_p.h>
+#include <private/qstylehelper_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index fbb5e4d..c8711f6 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -50,7 +50,6 @@ static const int ProgressBarFps = 25;
static const int blueFrameWidth = 2; // with of line edit focus frame
#include "qwindowsstyle_p.h"
-#include <private/qstylehelper_p.h>
#include <qapplication.h>
#include <qbitmap.h>
#include <qabstractitemview.h>
@@ -88,6 +87,7 @@ static const int blueFrameWidth = 2; // with of line edit focus frame
#include <qprocess.h>
#include <qvarlengtharray.h>
#include <limits.h>
+#include <private/qstylehelper_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/styles/qproxystyle.cpp b/src/gui/styles/qproxystyle.cpp
index 5235350..511c025 100644
--- a/src/gui/styles/qproxystyle.cpp
+++ b/src/gui/styles/qproxystyle.cpp
@@ -40,11 +40,11 @@
****************************************************************************/
#include <qstyle.h>
-#include <private/qstyle_p.h>
#include <private/qproxystyle_p.h>
#include <private/qapplication_p.h>
#include "qproxystyle.h"
#include "qstylefactory.h"
+#include <private/qstyle_p.h>
#if !defined(QT_NO_STYLE_PROXY) || defined(QT_PLUGIN)
diff --git a/src/gui/styles/qstyle_p.h b/src/gui/styles/qstyle_p.h
index 4729032..745092f 100644
--- a/src/gui/styles/qstyle_p.h
+++ b/src/gui/styles/qstyle_p.h
@@ -43,7 +43,6 @@
#define QSTYLE_P_H
#include "private/qobject_p.h"
-#include "private/qstylehelper_p.h"
#include <QtGui/qstyle.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp
index d09d7fa..ccdbf8c 100644
--- a/src/gui/styles/qstylehelper.cpp
+++ b/src/gui/styles/qstylehelper.cpp
@@ -39,8 +39,6 @@
**
****************************************************************************/
-#include "qstylehelper_p.h"
-
#include <qstyleoption.h>
#include <qpainter.h>
#include <qpixmapcache.h>
@@ -54,6 +52,7 @@
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
+#include "qstylehelper_p.h"
#include <qstringbuilder.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 1653baa..0314c6f 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -41,7 +41,6 @@
#include "qwindowsstyle.h"
#include "qwindowsstyle_p.h"
-#include <private/qstylehelper_p.h>
#if !defined(QT_NO_STYLE_WINDOWS) || defined(QT_PLUGIN)
@@ -70,13 +69,14 @@
#include <private/qmath_p.h>
#include <qmath.h>
-
#ifdef Q_WS_X11
#include "qfileinfo.h"
#include "qdir.h"
#include <private/qt_x11_p.h>
#endif
+#include <private/qstylehelper_p.h>
+
QT_BEGIN_NAMESPACE
#if defined(Q_WS_WIN)
@@ -1911,7 +1911,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setPen(discol);
}
- int xm = QWindowsStylePrivate::windowsItemFrame + checkcol + QWindowsStylePrivate::windowsItemHMargin;
+ int xm = int(QWindowsStylePrivate::windowsItemFrame) + checkcol + int(QWindowsStylePrivate::windowsItemHMargin);
int xpos = menuitem->rect.x() + xm;
QRect textRect(xpos, y + QWindowsStylePrivate::windowsItemVMargin,
w - xm - QWindowsStylePrivate::windowsRightBorder - tab + 1, h - 2 * QWindowsStylePrivate::windowsItemVMargin);
@@ -3223,7 +3223,7 @@ QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
int checkcol = qMax<int>(maxpmw, QWindowsStylePrivate::windowsCheckMarkWidth); // Windows always shows a check column
w += checkcol;
- w += QWindowsStylePrivate::windowsRightBorder + 10;
+ w += int(QWindowsStylePrivate::windowsRightBorder) + 10;
sz.setWidth(w);
}
break;