summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp4
-rw-r--r--src/gui/dialogs/qwizard.cpp3
-rw-r--r--src/gui/kernel/qapplication_win.cpp13
-rw-r--r--src/gui/kernel/qguiplatformplugin.cpp4
-rw-r--r--src/gui/kernel/qwhatsthis.cpp4
-rw-r--r--src/gui/styles/qstylefactory.cpp4
-rw-r--r--src/gui/styles/qwindowsstyle.cpp8
-rw-r--r--src/gui/styles/qwindowsvistastyle.cpp2
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp2
9 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index de8e33d..6691ff1 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -670,7 +670,7 @@ QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
// GetOpenFileName() will return only one folder name for all the files. To retrieve
// the correct path for all selected files, we have to use Common Item Dialog interfaces.
#ifndef Q_WS_WINCE
- if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
return qt_win_CID_get_open_file_names(args, initialDirectory, filterLst, selectedFilter, idx);
#endif
@@ -757,7 +757,7 @@ static int __stdcall winGetExistDirCallbackProc(HWND hwnd,
QString qt_win_get_existing_directory(const QFileDialogArgs &args)
{
#ifndef Q_WS_WINCE
- if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
return qt_win_CID_get_existing_directory(args);
#endif
diff --git a/src/gui/dialogs/qwizard.cpp b/src/gui/dialogs/qwizard.cpp
index 83bdaa0..9f8d526 100644
--- a/src/gui/dialogs/qwizard.cpp
+++ b/src/gui/dialogs/qwizard.cpp
@@ -572,8 +572,7 @@ public:
#endif
}
#if !defined(QT_NO_STYLE_WINDOWSVISTA)
- if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
vistaInitPending = true;
#endif
}
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 756cb56..c472738 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -682,7 +682,7 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
QColor menuText(qt_colorref2qrgb(GetSysColor(COLOR_MENUTEXT)));
BOOL isFlat = false;
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
SystemParametersInfo(SPI_GETFLATMENU, 0, &isFlat, 0);
QPalette menu(pal);
// we might need a special color group for the menu.
@@ -697,7 +697,7 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
menu.setColor(QPalette::Disabled, QPalette::Highlight,
QColor(qt_colorref2qrgb(GetSysColor(
(QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
&& isFlat ? COLOR_MENUHILIGHT : COLOR_HIGHLIGHT))));
menu.setColor(QPalette::Disabled, QPalette::HighlightedText, disabled);
menu.setColor(QPalette::Disabled, QPalette::Button,
@@ -719,7 +719,7 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
QApplication::setPalette(menu, "QMenu");
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based) && isFlat) {
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) && isFlat) {
QColor menubar(qt_colorref2qrgb(GetSysColor(COLOR_MENUBAR)));
menu.setColor(QPalette::Active, QPalette::Button, menubar);
menu.setColor(QPalette::Disabled, QPalette::Button, menubar);
@@ -999,7 +999,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class
style = CS_DBLCLKS;
if (w->inherits("QTipLabel") || w->inherits("QAlphaWidget")) {
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) {
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))) {
style |= CS_DROPSHADOW;
}
cname = QLatin1String("QToolTip");
@@ -1017,7 +1017,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class
style |= CS_SAVEBITS;
#endif
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
style |= CS_DROPSHADOW;
icon = false;
} else {
@@ -4161,7 +4161,8 @@ PtrCloseTouchInputHandle QApplicationPrivate::CloseTouchInputHandle = 0;
void QApplicationPrivate::initializeMultitouch_sys()
{
- if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) {
+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
static const int QT_SM_DIGITIZER = 94;
int value = GetSystemMetrics(QT_SM_DIGITIZER);
static const int QT_NID_INTEGRATED_TOUCH = 0x01;
diff --git a/src/gui/kernel/qguiplatformplugin.cpp b/src/gui/kernel/qguiplatformplugin.cpp
index 708859d..04fd111 100644
--- a/src/gui/kernel/qguiplatformplugin.cpp
+++ b/src/gui/kernel/qguiplatformplugin.cpp
@@ -137,10 +137,10 @@ QString QGuiPlatformPlugin::styleName()
return QLatin1String("WindowsCE");
#elif defined(Q_WS_WIN)
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
return QLatin1String("WindowsVista");
else if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
return QLatin1String("WindowsXP");
else
return QLatin1String("Windows"); // default styles for Windows
diff --git a/src/gui/kernel/qwhatsthis.cpp b/src/gui/kernel/qwhatsthis.cpp
index 5328cb1..da79250 100644
--- a/src/gui/kernel/qwhatsthis.cpp
+++ b/src/gui/kernel/qwhatsthis.cpp
@@ -227,7 +227,7 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor
}
#if defined(Q_WS_WIN)
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
{
BOOL shadow;
SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0);
@@ -305,7 +305,7 @@ void QWhatsThat::paintEvent(QPaintEvent*)
bool drawShadow = true;
#if defined(Q_WS_WIN)
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
{
BOOL shadow;
SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0);
diff --git a/src/gui/styles/qstylefactory.cpp b/src/gui/styles/qstylefactory.cpp
index 83b6748..de693db 100644
--- a/src/gui/styles/qstylefactory.cpp
+++ b/src/gui/styles/qstylefactory.cpp
@@ -225,12 +225,12 @@ QStringList QStyleFactory::keys()
#endif
#ifndef QT_NO_STYLE_WINDOWSXP
if (!list.contains(QLatin1String("WindowsXP")) &&
- (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
list << QLatin1String("WindowsXP");
#endif
#ifndef QT_NO_STYLE_WINDOWSVISTA
if (!list.contains(QLatin1String("WindowsVista")) &&
- (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
list << QLatin1String("WindowsVista");
#endif
#ifndef QT_NO_STYLE_MOTIF
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 9732c7e..342c4c6 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -125,7 +125,7 @@ QWindowsStylePrivate::QWindowsStylePrivate()
{
#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) {
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))) {
QSystemLibrary shellLib(QLatin1String("shell32"));
pSHGetStockIconInfo = (PtrSHGetStockIconInfo)shellLib.resolve("SHGetStockIconInfo");
}
@@ -1058,7 +1058,7 @@ QPixmap QWindowsStyle::standardPixmap(StandardPixmap standardPixmap, const QStyl
case SP_VistaShield:
{
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)
&& pSHGetStockIconInfo)
{
QPixmap pixmap;
@@ -1200,7 +1200,7 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid
case SH_LineEdit_PasswordCharacter:
{
#ifdef Q_WS_WIN
- if (widget && (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) {
+ if (widget && (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))) {
const QFontMetrics &fm = widget->fontMetrics();
if (fm.inFont(QChar(0x25CF)))
ret = 0x25CF;
@@ -3362,7 +3362,7 @@ QIcon QWindowsStyle::standardIconImplementation(StandardPixmap standardIcon, con
case SP_VistaShield:
{
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based
+ && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)
&& pSHGetStockIconInfo)
{
icon.addPixmap(proxy()->standardPixmap(SP_VistaShield, option, widget)); //fetches small icon
diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp
index b894eb4..997d429 100644
--- a/src/gui/styles/qwindowsvistastyle.cpp
+++ b/src/gui/styles/qwindowsvistastyle.cpp
@@ -140,7 +140,7 @@ bool QWindowsVistaStylePrivate::useVista()
{
return (QWindowsVistaStylePrivate::useXP() &&
(QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA &&
- QSysInfo::WindowsVersion < QSysInfo::WV_NT_based));
+ (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)));
}
/*!
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 3c33df3..343f262 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -791,7 +791,7 @@ void QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
inspectData = (tmt_transparentcolor != 0 || tmt_borderonly || proporigin == PO_PART || proporigin == PO_STATE);
// ### This is a vista-specific workaround for broken alpha in titlebar pixmaps
- if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) {
+ if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))) {
if (themeData.partId == WP_CAPTION || themeData.partId == WP_SMALLCAPTION)
inspectData = false;
}