summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsstyle.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-05-20 11:21:58 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-20 12:06:33 +0200
commitd1d8df1076fe7884056798e1974a299ab9d7684e (patch)
tree46068ffeb8cd64f8d875f0cc4af1788dadda5fda /src/gui/styles/qwindowsstyle.cpp
parent7a1accc89c5c45ef514ebf0e7693cd9522fa0362 (diff)
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
Diffstat (limited to 'src/gui/styles/qwindowsstyle.cpp')
-rw-r--r--src/gui/styles/qwindowsstyle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 1653baa6f7..0314c6fe12 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;