From 194d2ca5c3bbf7e5c06a5f8e4fbbbc8e1247f549 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Tue, 7 Feb 2012 14:23:50 +0100 Subject: Use Q_OS_WINCE instead of Q_WS_WINCE Window system defines have been deprecated, so use Q_OS_WINCE instead. Change-Id: I52059d0f854fe783ac20610ab248800c3e1e827c Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint --- src/corelib/global/qt_windows.h | 2 +- src/corelib/io/qstandardpaths_win.cpp | 2 +- .../platforms/windows/qwindowsaccessibility.cpp | 8 +-- src/widgets/dialogs/qcolordialog.cpp | 6 +- src/widgets/dialogs/qdialog.cpp | 6 +- src/widgets/dialogs/qdialog.h | 4 +- src/widgets/dialogs/qdialog_p.h | 2 +- src/widgets/dialogs/qerrormessage.cpp | 10 ++-- src/widgets/dialogs/qfiledialog.cpp | 2 +- src/widgets/dialogs/qfontdialog.cpp | 4 +- src/widgets/dialogs/qmessagebox.cpp | 18 +++--- src/widgets/dialogs/qmessagebox.h | 2 +- src/widgets/dialogs/qwizard.cpp | 4 +- src/widgets/kernel/qapplication.cpp | 14 ++--- src/widgets/kernel/qapplication.h | 4 +- src/widgets/kernel/qapplication_p.h | 2 +- src/widgets/kernel/qguiplatformplugin.cpp | 4 +- src/widgets/kernel/qwidget.cpp | 6 +- src/widgets/kernel/qwidget.h | 2 +- src/widgets/styles/qwindowsmobilestyle.cpp | 64 +++++++++++----------- src/widgets/styles/qwindowsmobilestyle_p.h | 6 +- src/widgets/util/qsystemtrayicon.cpp | 10 ++-- src/widgets/widgets/qdockwidget.cpp | 2 +- src/widgets/widgets/qeffects.cpp | 2 +- src/widgets/widgets/qmdisubwindow.cpp | 2 +- src/widgets/widgets/qmenu.cpp | 2 +- src/widgets/widgets/qmenu.h | 6 +- src/widgets/widgets/qmenu_p.h | 8 +-- src/widgets/widgets/qmenu_wince.cpp | 4 +- src/widgets/widgets/qmenubar.cpp | 22 ++++---- src/widgets/widgets/qmenubar.h | 4 +- src/widgets/widgets/qmenubar_p.h | 10 ++-- src/widgets/widgets/qscrollbar.cpp | 2 +- src/widgets/widgets/qtoolbar.cpp | 2 +- 34 files changed, 124 insertions(+), 124 deletions(-) (limited to 'src') diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h index e4af46d939..a63185b5a5 100644 --- a/src/corelib/global/qt_windows.h +++ b/src/corelib/global/qt_windows.h @@ -149,6 +149,6 @@ #ifndef LR_SHARED #define LR_SHARED 0 #endif -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE #endif // QT_WINDOWS_H diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index 310b1eb40d..16bc766170 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -177,7 +177,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) // type-specific handling goes here -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE static GetSpecialFolderPath SHGetSpecialFolderPath = resolveGetSpecialFolderPath(); if (SHGetSpecialFolderPath) { wchar_t path[MAX_PATH]; diff --git a/src/plugins/platforms/windows/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/qwindowsaccessibility.cpp index 8d11745410..2c49d8614d 100644 --- a/src/plugins/platforms/windows/qwindowsaccessibility.cpp +++ b/src/plugins/platforms/windows/qwindowsaccessibility.cpp @@ -69,7 +69,7 @@ #include #if !defined(WINABLEAPI) -# if defined(Q_WS_WINCE) +# if defined(Q_OS_WINCE) # include # endif # include @@ -80,7 +80,7 @@ #include #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qguifunctions_wince.h" #endif @@ -1344,7 +1344,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev typedef void (WINAPI *PtrNotifyWinEvent)(DWORD, HWND, LONG, LONG); -#if defined(Q_WS_WINCE) // ### TODO: check for NotifyWinEvent in CE 6.0 +#if defined(Q_OS_WINCE) // ### TODO: check for NotifyWinEvent in CE 6.0 // There is no user32.lib nor NotifyWinEvent for CE return; #else @@ -1382,7 +1382,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev ++eventNum; } -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE } /* diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index e592f14704..4a91443d00 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1060,7 +1060,7 @@ QColorShower::QColorShower(QColorDialog *parent) gl->setMargin(gl->spacing()); lab = new QColorShowLabel(this); -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE #ifdef QT_SMALL_COLORDIALOG lab->setMinimumHeight(60); #endif @@ -1452,7 +1452,7 @@ void QColorDialogPrivate::init(const QColor &initial) leftLay = 0; -#if defined(Q_WS_WINCE) || defined(QT_SMALL_COLORDIALOG) +#if defined(Q_OS_WINCE) || defined(QT_SMALL_COLORDIALOG) smallDisplay = true; const int lumSpace = 20; #else @@ -1477,7 +1477,7 @@ void QColorDialogPrivate::init(const QColor &initial) leftLay->addWidget(lblBasicColors); leftLay->addWidget(standard); -#if !defined(Q_WS_WINCE) +#if !defined(Q_OS_WINCE) leftLay->addStretch(); #endif diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index f462a362ca..861cbf902c 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -404,8 +404,8 @@ void QDialogPrivate::resetModalitySetByOpen() resetModalityTo = -1; } -#if defined(Q_WS_WINCE) -#ifdef Q_WS_WINCE_WM +#if defined(Q_OS_WINCE) +#ifdef Q_OS_WINCE_WM void QDialogPrivate::_q_doneAction() { //Done... @@ -419,7 +419,7 @@ void QDialogPrivate::_q_doneAction() bool QDialog::event(QEvent *e) { bool result = QWidget::event(e); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (e->type() == QEvent::OkRequest) { accept(); result = true; diff --git a/src/widgets/dialogs/qdialog.h b/src/widgets/dialogs/qdialog.h index 40bfbb63ee..7d3052a782 100644 --- a/src/widgets/dialogs/qdialog.h +++ b/src/widgets/dialogs/qdialog.h @@ -102,7 +102,7 @@ public Q_SLOTS: protected: QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) bool event(QEvent *e); #endif void keyPressEvent(QKeyEvent *); @@ -119,7 +119,7 @@ private: Q_DISABLE_COPY(QDialog) Q_PRIVATE_SLOT(d_func(), void _q_platformRunNativeAppModalPanel()) -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM Q_PRIVATE_SLOT(d_func(), void _q_doneAction()) #endif }; diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h index ca99600489..c40a885f86 100644 --- a/src/widgets/dialogs/qdialog_p.h +++ b/src/widgets/dialogs/qdialog_p.h @@ -101,7 +101,7 @@ public: void hideDefault(); void resetModalitySetByOpen(); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM void _q_doneAction(); #endif diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp index 4993a6d80f..84021d0988 100644 --- a/src/widgets/dialogs/qerrormessage.cpp +++ b/src/widgets/dialogs/qerrormessage.cpp @@ -61,7 +61,7 @@ #include #include -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp @@ -107,7 +107,7 @@ public: QSize QErrorMessageTextView::minimumSizeHint() const { -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (qt_wince_is_high_dpi()) return QSize(200, 200); @@ -122,7 +122,7 @@ QSize QErrorMessageTextView::minimumSizeHint() const QSize QErrorMessageTextView::sizeHint() const { -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (qt_wince_is_high_dpi()) return QSize(400, 200); @@ -132,7 +132,7 @@ QSize QErrorMessageTextView::sizeHint() const return QSize(300, 100); #else return QSize(250, 75); -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE } /*! @@ -255,7 +255,7 @@ QErrorMessage::QErrorMessage(QWidget * parent) #endif -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) d->ok->setFixedSize(0,0); #endif connect(d->ok, SIGNAL(clicked()), this, SLOT(accept())); diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index db13cfea0f..ecedf8328f 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -2002,7 +2002,7 @@ QString QFileDialog::getExistingDirectory(QWidget *parent, #if defined(Q_WS_WIN) if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly) -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) && qt_priv_ptr_valid #endif ) { diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp index 2402f2a955..7e71cd7cd4 100644 --- a/src/widgets/dialogs/qfontdialog.cpp +++ b/src/widgets/dialogs/qfontdialog.cpp @@ -316,11 +316,11 @@ void QFontDialogPrivate::init() buttonBox->addButton(QDialogButtonBox::Cancel); QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject())); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) q->resize(180, 120); #else q->resize(500, 360); -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE sizeEdit->installEventFilter(q); familyList->installEventFilter(q); diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 0f57fa67e1..c6ffaa2788 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -189,7 +189,7 @@ public: int layoutMinimumWidth(); void retranslateStrings(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void hideSpecial(); #endif @@ -307,7 +307,7 @@ void QMessageBoxPrivate::updateSize() return; QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); -#if defined(Q_WS_QWS) || defined(Q_WS_WINCE) +#if defined(Q_WS_QWS) || defined(Q_OS_WINCE) // the width of the screen, less the window border. int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width()); #else @@ -322,11 +322,11 @@ void QMessageBoxPrivate::updateSize() int softLimit = qMin(hardLimit, 500); #else // note: ideally on windows, hard and soft limits but it breaks compat -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE int softLimit = qMin(screenSize.width()/2, 500); #else int softLimit = qMin(screenSize.width() * 3 / 4, 500); -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE #endif if (informativeLabel) @@ -384,7 +384,7 @@ void QMessageBoxPrivate::updateSize() } -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE /*! \internal Hides special buttons which are rather shown in the title bar @@ -1239,7 +1239,7 @@ bool QMessageBox::event(QEvent *e) case QEvent::LanguageChange: d_func()->retranslateStrings(); break; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE case QEvent::OkRequest: case QEvent::HelpRequest: { QString bName = @@ -1382,7 +1382,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e) QDialog::keyPressEvent(e); } -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE /*! \reimp */ @@ -1453,7 +1453,7 @@ void QMessageBox::showEvent(QShowEvent *e) Q_D(QMessageBox); if (d->autoAddOkButton) { addButton(Ok); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) d->hideSpecial(); #endif } @@ -1773,7 +1773,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png")); if (!pm.isNull()) msgBox->setIconPixmap(pm); -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) msgBox->setDefaultButton(msgBox->addButton(QMessageBox::Ok)); #endif diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h index b42681a565..37dfd96514 100644 --- a/src/widgets/dialogs/qmessagebox.h +++ b/src/widgets/dialogs/qmessagebox.h @@ -143,7 +143,7 @@ public: QPushButton *addButton(StandardButton button); void removeButton(QAbstractButton *button); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void setVisible(bool visible); #endif diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 629b6828b7..324831ea52 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -69,7 +69,7 @@ #include "private/qdialog_p.h" #include -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp #endif @@ -2178,7 +2178,7 @@ QWizard::QWizard(QWidget *parent, Qt::WindowFlags flags) { Q_D(QWizard); d->init(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (!qt_wince_is_mobile()) setWindowFlags(windowFlags() & ~Qt::WindowOkButtonHint); #endif diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index ae15c9f62a..9bef6f8f71 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -104,7 +104,7 @@ #include "qlibrary.h" #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qdatetime.h" #include "qguifunctions_wince.h" extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp @@ -122,7 +122,7 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp static void initResources() { -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) Q_INIT_RESOURCE_EXTERN(qstyle_wince) Q_INIT_RESOURCE(qstyle_wince); #else @@ -140,7 +140,7 @@ Q_CORE_EXPORT void qt_call_post_routines(); QApplicationPrivate *QApplicationPrivate::self = 0; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE int QApplicationPrivate::autoMaximizeThreshold = -1; bool QApplicationPrivate::autoSipEnabled = false; #else @@ -873,7 +873,7 @@ void QApplicationPrivate::initialize() if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0) q->setAttribute(Qt::AA_NativeWindows); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #ifdef QT_AUTO_MAXIMIZE_THRESHOLD autoMaximizeThreshold = QT_AUTO_MAXIMIZE_THRESHOLD; #else @@ -882,7 +882,7 @@ void QApplicationPrivate::initialize() else autoMaximizeThreshold = -1; #endif //QT_AUTO_MAXIMIZE_THRESHOLD -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE #ifndef QT_NO_WHEELEVENT QApplicationPrivate::wheel_scroll_lines = 3; @@ -1202,7 +1202,7 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis The default is platform dependent. */ -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void QApplication::setAutoMaximizeThreshold(const int threshold) { QApplicationPrivate::autoMaximizeThreshold = threshold; @@ -3993,7 +3993,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e) if (receiver->isWidgetType()) { QWidget *widget = static_cast(receiver); -#if !defined(Q_WS_WINCE) || (defined(GWES_ICONCURS) && !defined(QT_NO_CURSOR)) +#if !defined(Q_OS_WINCE) || (defined(GWES_ICONCURS) && !defined(QT_NO_CURSOR)) // toggle HasMouse widget state on enter and leave if ((e->type() == QEvent::Enter || e->type() == QEvent::DragEnter) && (!QApplication::activePopupWidget() || QApplication::activePopupWidget() == widget->window())) diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h index b613b0f7c0..bace73e072 100644 --- a/src/widgets/kernel/qapplication.h +++ b/src/widgets/kernel/qapplication.h @@ -89,7 +89,7 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication #ifndef QT_NO_STYLE_STYLESHEET Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet) #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold) #endif Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled) @@ -245,7 +245,7 @@ public Q_SLOTS: #ifndef QT_NO_STYLE_STYLESHEET void setStyleSheet(const QString& sheet); #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void setAutoMaximizeThreshold(const int threshold); int autoMaximizeThreshold() const; #endif diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 601c511438..d9d184d51a 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -187,7 +187,7 @@ public: static bool qws_apply_settings(); static QWidget *findWidget(const QObjectList&, const QPoint &, bool rec); #endif -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE static int autoMaximizeThreshold; #endif static bool autoSipEnabled; diff --git a/src/widgets/kernel/qguiplatformplugin.cpp b/src/widgets/kernel/qguiplatformplugin.cpp index f5f00cc769..540499887e 100644 --- a/src/widgets/kernel/qguiplatformplugin.cpp +++ b/src/widgets/kernel/qguiplatformplugin.cpp @@ -50,7 +50,7 @@ #include "qplatformdefs.h" #include "qicon.h" -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qguifunctions_wince.h" extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp extern bool qt_wince_is_mobile(); //qguifunctions_wince.cpp @@ -130,7 +130,7 @@ QGuiPlatformPlugin::~QGuiPlatformPlugin() {} /* return the string key to be used by default the application */ QString QGuiPlatformPlugin::styleName() { -#if defined(Q_WS_WIN) && defined(Q_WS_WINCE) +#if defined(Q_WS_WIN) && defined(Q_OS_WINCE) if (qt_wince_is_smartphone() || qt_wince_is_pocket_pc()) return QLatin1String("WindowsMobile"); else diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 4709a89d27..008f0391bc 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1095,7 +1095,7 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) if (customize) ; // don't modify window flags if the user explicitly set them. else if (type == Qt::Dialog || type == Qt::Sheet) -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint; #else flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; @@ -4150,7 +4150,7 @@ const QPalette &QWidget::palette() const if (!isEnabled()) { data->pal.setCurrentColorGroup(QPalette::Disabled); } else if ((!isVisible() || isActiveWindow()) -#if defined(Q_OS_WIN) && !defined(Q_WS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !QApplicationPrivate::isBlockedByModal(const_cast(this)) #endif ) { @@ -7579,7 +7579,7 @@ QSize QWidgetPrivate::adjustedSize() const #else // all others QRect screen = QApplication::desktop()->screenGeometry(q->pos()); #endif -#if defined (Q_WS_WINCE) +#if defined (Q_OS_WINCE) s.setWidth(qMin(s.width(), screen.width())); s.setHeight(qMin(s.height(), screen.height())); #else diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 0f13d0b7f6..2bad2e9f1e 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -481,7 +481,7 @@ public Q_SLOTS: virtual void setVisible(bool visible); inline void setHidden(bool hidden) { setVisible(!hidden); } -#ifndef Q_WS_WINCE +#ifndef Q_OS_WINCE inline void show() { setVisible(true); } #else void show(); diff --git a/src/widgets/styles/qwindowsmobilestyle.cpp b/src/widgets/styles/qwindowsmobilestyle.cpp index 284d42dacc..86513c8267 100644 --- a/src/widgets/styles/qwindowsmobilestyle.cpp +++ b/src/widgets/styles/qwindowsmobilestyle.cpp @@ -72,13 +72,13 @@ #include "qdebug.h" #include "qtabwidget.h" -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qt_windows.h" #include "qguifunctions_wince.h" extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_smartphone(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_windows_mobile_65(); //defined in qguifunctions_wince.cpp -#endif // Q_WS_WINCE +#endif // Q_OS_WINCE #include "qstylehelper_p.h" @@ -667,7 +667,7 @@ static const char * const min_small_xpm[] = { " ++++++++++++ ", " "}; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM static char * sbhandleup_xpm[] = { "26 41 45 1", @@ -4033,12 +4033,12 @@ void tintImage(QImage *image, QColor color, qreal saturation) } } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM enum QSliderDirection { SliderUp, SliderDown, SliderLeft, SliderRight }; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM void QWindowsMobileStylePrivate::tintImagesButton(QColor color) { @@ -4096,11 +4096,11 @@ void QWindowsMobileStylePrivate::tintListViewHighlight(QColor color) } } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM void QWindowsMobileStylePrivate::setupWindowsMobileStyle65() { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM wm65 = qt_wince_is_windows_mobile_65(); if (wm65) { imageScrollbarHandleUp = QImage(sbhandleup_xpm); @@ -4119,13 +4119,13 @@ void QWindowsMobileStylePrivate::setupWindowsMobileStyle65() } tintImagesHigh(Qt::blue); } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM } void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOptionTab *tab) { #ifndef QT_NO_TABBAR -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { tintImagesButton(tab->palette.button().color()); QRect r; @@ -4154,7 +4154,7 @@ void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOp //imageTabBarBig return; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM painter->save(); painter->setPen(tab->palette.shadow().color()); if (doubleControls) { @@ -4216,7 +4216,7 @@ void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOp void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect) { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { QRect r; if (rect.isValid()) @@ -4257,7 +4257,7 @@ void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, co } return; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QPalette::ColorGroup cg = option->state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; @@ -4269,7 +4269,7 @@ void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, co void QWindowsMobileStylePrivate::drawScrollbarGrip(QPainter *p, QStyleOptionSlider *newScrollbar, const QStyleOptionComplex *option, bool drawCompleteFrame) { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { if (newScrollbar->orientation == Qt::Horizontal) { QTransform transform; @@ -4361,7 +4361,7 @@ void QWindowsMobileStylePrivate::drawScrollbarGrip(QPainter *p, QStyleOptionSlid void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool ) { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { tintImagesHigh(opt->palette.highlight().color()); QRect r = opt->rect; @@ -4380,7 +4380,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOption } return ; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QBrush fill = opt->palette.button(); if (opt->state & QStyle::State_Sunken) @@ -4418,7 +4418,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOption void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool secondScrollBar) { #ifndef QT_NO_SCROLLBAR -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (wm65) { tintImagesHigh(opt->palette.highlight().color()); QRect r = opt->rect; @@ -4437,7 +4437,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOpti } return ; } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QBrush fill = opt->palette.button(); if (opt->state & QStyle::State_Sunken) @@ -4520,13 +4520,13 @@ QWindowsMobileStyle::QWindowsMobileStyle() : QWindowsStyle(*new QWindowsMobileSt QWindowsMobileStylePrivate::QWindowsMobileStylePrivate() :QWindowsStylePrivate() { -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE doubleControls = qt_wince_is_high_dpi(); smartphone = qt_wince_is_smartphone(); #else doubleControls = false; smartphone = false; -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE #ifndef QT_NO_IMAGEFORMAT_XPM @@ -5215,7 +5215,7 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } switch (tab->shape) { case QTabBar::RoundedNorth: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif { @@ -5226,7 +5226,7 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } break; case QTabBar::RoundedSouth: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif { @@ -5237,13 +5237,13 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } break; case QTabBar::RoundedEast: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif painter->drawLine(rect.topRight(), rect.bottomRight()); break; case QTabBar::RoundedWest: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (!d->wm65) #endif painter->drawLine(rect.topLeft(), rect.bottomLeft()); @@ -6458,7 +6458,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio newSize += QSize(4, 2); break; #ifndef QT_NO_ITEMVIEWS -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM case CT_ItemViewItem: if (d_func()->wm65) if (d_func()->doubleControls) @@ -6466,7 +6466,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio else newSize.setHeight(23); break; -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM #endif //QT_NO_ITEMVIEWS default: break; @@ -6508,7 +6508,7 @@ QRect QWindowsMobileStyle::subElementRect(SubElement element, const QStyleOption #endif // QT_NO_SLIDER #ifndef QT_NO_ITEMVIEWS case SE_ItemViewItemFocusRect: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) rect = QRect(); #endif @@ -6533,13 +6533,13 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp float stretchFactor = 1.4f; int sliderButtonExtentDir = int (sliderButtonExtent * stretchFactor); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) { sliderButtonExtent = d->imageScrollbarHandleUp.width(); sliderButtonExtentDir = d->imageScrollbarHandleUp.height(); } -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM int sliderlen; int maxlen = ((scrollbar->orientation == Qt::Horizontal) ? @@ -7067,7 +7067,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co d->doubleControls ? ret = 42 : ret = 21; break; case PM_ScrollBarSliderMin: -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) #else if (false) @@ -7085,7 +7085,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co else d->doubleControls ? ret = 25 : ret = 13; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d->wm65) #else if (false) @@ -7239,10 +7239,10 @@ QPixmap QWindowsMobileStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPi switch (iconMode) { case QIcon::Selected: { -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM if (d_func()->wm65) return pixmap; -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32); int imgh = img.height(); int imgw = img.width(); diff --git a/src/widgets/styles/qwindowsmobilestyle_p.h b/src/widgets/styles/qwindowsmobilestyle_p.h index d536afe50e..0e5cf18548 100644 --- a/src/widgets/styles/qwindowsmobilestyle_p.h +++ b/src/widgets/styles/qwindowsmobilestyle_p.h @@ -71,7 +71,7 @@ public: QWindowsMobileStylePrivate(); bool doubleControls; bool smartphone; -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM bool wm65; #endif @@ -95,7 +95,7 @@ public: void setupWindowsMobileStyle65(); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM //Windows Mobile 6.5 images QImage imageScrollbarHandleUp; QImage imageScrollbarHandleDown; @@ -119,7 +119,7 @@ public: void tintImagesButton(QColor color); void tintListViewHighlight(QColor color); -#endif //Q_WS_WINCE_WM +#endif //Q_OS_WINCE_WM void drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false); void drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false); diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index 321323733b..bed8dc2eae 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -434,13 +434,13 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title titleLabel->setText(title); QFont f = titleLabel->font(); f.setBold(true); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE f.setPointSize(f.pointSize() - 2); #endif titleLabel->setFont(f); titleLabel->setTextFormat(Qt::PlainText); // to maintain compat with windows -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE const int iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize); const int closeButtonSize = style()->pixelMetric(QStyle::PM_SmallIconSize) - 2; #else @@ -456,7 +456,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title QObject::connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); QLabel *msgLabel = new QLabel; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE f.setBold(false); msgLabel->setFont(f); #endif @@ -466,7 +466,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title msgLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); // smart size for the message label -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 2; #else int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 3; @@ -481,7 +481,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title control->document()->setDefaultTextOption(opt); } } -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE // Make sure that the text isn't wrapped "somewhere" in the balloon widget // in the case that we have a long title label. setMaximumWidth(limit); diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 6da7605f4c..a90c754cee 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -207,7 +207,7 @@ bool QDockWidgetLayout::nativeWindowDeco() const bool QDockWidgetLayout::nativeWindowDeco(bool floating) const { -#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_WINCE) +#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_WINCE) Q_UNUSED(floating); return false; #else diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp index 486905658d..84823675dd 100644 --- a/src/widgets/widgets/qeffects.cpp +++ b/src/widgets/widgets/qeffects.cpp @@ -111,7 +111,7 @@ QAlphaWidget::QAlphaWidget(QWidget* w, Qt::WindowFlags f) QAlphaWidget::~QAlphaWidget() { -#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE) +#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE) // Restore user-defined opacity value if (widget) widget->setWindowOpacity(1); diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index cca39a6502..b42fedf0be 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -1772,7 +1772,7 @@ bool QMdiSubWindowPrivate::drawTitleBarWhenMaximized() const if (isChildOfTabbedQMdiArea(q)) return false; -#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) || defined(Q_WS_WINCE_WM) +#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) || defined(Q_OS_WINCE_WM) return true; #else if (q->style()->styleHint(QStyle::SH_Workspace_FillSpaceOnMaximize, 0, q)) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 1ad697c430..a4f9dc9c96 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2882,7 +2882,7 @@ void QMenu::actionEvent(QActionEvent *e) d->platformMenu->syncAction(e->action()); } -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) if (!d->wce_menu) d->wce_menu = new QMenuPrivate::QWceMenuPrivate; if (e->type() == QEvent::ActionAdded) diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index fa0542b6c2..182b0bc2b8 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -48,7 +48,7 @@ #include #include -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include // for HMENU #endif @@ -136,7 +136,7 @@ public: void setNoReplayFor(QWidget *widget); QPlatformMenu *platformMenu(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE HMENU wceMenu(); #endif @@ -170,7 +170,7 @@ protected: bool focusNextPrevChild(bool next); void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE QAction* wceCommands(uint command); #endif diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h index af236c1c8f..ee6e62653f 100644 --- a/src/widgets/widgets/qmenu_p.h +++ b/src/widgets/widgets/qmenu_p.h @@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE class QTornOffMenu; class QEventLoop; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE struct QWceMenuAction { uint command; QPointer action; @@ -91,7 +91,7 @@ public: scroll(0), eventLoop(0), tearoff(0), tornoff(0), tearoffHighlighted(0), hasCheckableItems(0), sloppyAction(0), doChildEffects(false), platformMenu(0) -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) ,wce_menu(0) #endif { } @@ -99,7 +99,7 @@ public: { delete scroll; delete platformMenu; -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) delete wce_menu; #endif } @@ -228,7 +228,7 @@ public: QPointer actionAboutToTrigger; -#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) +#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR) struct QWceMenuPrivate { QList actionItems; HMENU menuHandle; diff --git a/src/widgets/widgets/qmenu_wince.cpp b/src/widgets/widgets/qmenu_wince.cpp index ae90d23b28..11ae2844f8 100644 --- a/src/widgets/widgets/qmenu_wince.cpp +++ b/src/widgets/widgets/qmenu_wince.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ //Native menubars are only supported for Windows Mobile not the standard SDK/generic WinCE -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qmenu.h" #include "qt_windows.h" #include "qapplication.h" @@ -665,4 +665,4 @@ void QMenuBarPrivate::QWceMenuBarPrivate::rebuild() QT_END_NAMESPACE #endif //QT_NO_MENUBAR -#endif //Q_WS_WINCE +#endif //Q_OS_WINCE diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index f1269fde0f..7d6c1d8df9 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -64,7 +64,7 @@ #include "qmenubar_p.h" #include "qdebug.h" -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp #endif @@ -719,7 +719,7 @@ void QMenuBarPrivate::init() if (platformMenuBar) q->hide(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) { wceCreateMenuBar(q->parentWidget()); if(wce_menubar) @@ -783,7 +783,7 @@ QMenuBar::~QMenuBar() delete d->platformMenuBar; d->platformMenuBar = 0; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE Q_D(QMenuBar); if (qt_wince_is_mobile()) d->wceDestroyMenuBar(); @@ -1245,7 +1245,7 @@ void QMenuBar::actionEvent(QActionEvent *e) if (d->platformMenuBar) { QPlatformMenuBar *nativeMenuBar = d->platformMenuBar; -#if defined(Q_WS_WINCE) +#if defined(Q_OS_WINCE) QMenuBarPrivate::QWceMenuBarPrivate *nativeMenuBar = d->wce_menubar; #endif if (!nativeMenuBar) @@ -1338,7 +1338,7 @@ void QMenuBarPrivate::handleReparent() if (platformMenuBar) platformMenuBar->handleReparent(newParent); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile() && wce_menubar) wce_menubar->rebuild(); #endif @@ -1526,7 +1526,7 @@ QRect QMenuBar::actionGeometry(QAction *act) const QSize QMenuBar::minimumSizeHint() const { Q_D(const QMenuBar); -#if defined(Q_OS_MAC) || defined(Q_WS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) const bool as_gui_menubar = !isNativeMenuBar(); #else const bool as_gui_menubar = true; @@ -1582,7 +1582,7 @@ QSize QMenuBar::minimumSizeHint() const QSize QMenuBar::sizeHint() const { Q_D(const QMenuBar); -#if defined(Q_OS_MAC) || defined(Q_WS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) const bool as_gui_menubar = !isNativeMenuBar(); #else const bool as_gui_menubar = true; @@ -1641,7 +1641,7 @@ QSize QMenuBar::sizeHint() const int QMenuBar::heightForWidth(int) const { Q_D(const QMenuBar); -#if defined(Q_OS_MAC) || defined(Q_WS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) const bool as_gui_menubar = !isNativeMenuBar(); #else const bool as_gui_menubar = true; @@ -1838,13 +1838,13 @@ QPlatformMenuBar *QMenuBar::platformMenuBar() \sa defaultAction() */ -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void QMenuBar::setDefaultAction(QAction *act) { Q_D(QMenuBar); if (d->defaultAction == act) return; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (d->defaultAction) { disconnect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); @@ -1852,7 +1852,7 @@ void QMenuBar::setDefaultAction(QAction *act) } #endif d->defaultAction = act; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE if (qt_wince_is_mobile()) if (d->defaultAction) { connect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); diff --git a/src/widgets/widgets/qmenubar.h b/src/widgets/widgets/qmenubar.h index b20682ef6c..9818526543 100644 --- a/src/widgets/widgets/qmenubar.h +++ b/src/widgets/widgets/qmenubar.h @@ -102,7 +102,7 @@ public: void setCornerWidget(QWidget *w, Qt::Corner corner = Qt::TopRightCorner); QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void setDefaultAction(QAction *); QAction *defaultAction() const; @@ -145,7 +145,7 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_internalShortcutActivated(int)) Q_PRIVATE_SLOT(d_func(), void _q_updateLayout()) -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE Q_PRIVATE_SLOT(d_func(), void _q_updateDefaultAction()) #endif diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h index a15a1e432e..1af94bb236 100644 --- a/src/widgets/widgets/qmenubar_p.h +++ b/src/widgets/widgets/qmenubar_p.h @@ -57,7 +57,7 @@ #include "QtWidgets/qstyleoption.h" #include // Mac needs what in this file! -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE #include "qguifunctions_wince.h" #endif @@ -73,14 +73,14 @@ public: closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0), nativeMenuBar(-1), doChildEffects(false), platformMenuBar(0) -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE , wce_menubar(0), wceClassicMenu(false) #endif { } ~QMenuBarPrivate() { delete platformMenuBar; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE delete wce_menubar; #endif } @@ -124,7 +124,7 @@ public: void _q_internalShortcutActivated(int); void _q_updateLayout(); -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void _q_updateDefaultAction(); #endif @@ -150,7 +150,7 @@ public: QBasicTimer autoReleaseTimer; QPlatformMenuBar *platformMenuBar; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE void wceCreateMenuBar(QWidget *); void wceDestroyMenuBar(); struct QWceMenuBarPrivate { diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp index bca5517d8a..cb3126e566 100644 --- a/src/widgets/widgets/qscrollbar.cpp +++ b/src/widgets/widgets/qscrollbar.cpp @@ -387,7 +387,7 @@ void QScrollBarPrivate::init() q->setAttribute(Qt::WA_WState_OwnSizePolicy, false); q->setAttribute(Qt::WA_OpaquePaintEvent); -#if !defined(QT_NO_CONTEXTMENU) && defined(Q_WS_WINCE) +#if !defined(QT_NO_CONTEXTMENU) && defined(Q_OS_WINCE) if (!q->style()->styleHint(QStyle::SH_ScrollBar_ContextMenu, 0, q)) { q->setContextMenuPolicy(Qt::PreventContextMenu); } diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index c9fe4f7cc2..84cb5fd10c 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -1163,7 +1163,7 @@ bool QToolBar::event(QEvent *event) if (d->mouseMoveEvent(static_cast(event))) return true; break; -#ifdef Q_WS_WINCE +#ifdef Q_OS_WINCE case QEvent::ContextMenu: { QContextMenuEvent* contextMenuEvent = static_cast(event); -- cgit v1.2.3