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 <oswald.buddenhagen@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Andreas Holzammer 2012-02-07 14:23:50 +01:00 committed by Qt by Nokia
parent 3cb871241a
commit 194d2ca5c3
34 changed files with 124 additions and 124 deletions

View File

@ -149,6 +149,6 @@
#ifndef LR_SHARED #ifndef LR_SHARED
#define LR_SHARED 0 #define LR_SHARED 0
#endif #endif
#endif // Q_WS_WINCE #endif // Q_OS_WINCE
#endif // QT_WINDOWS_H #endif // QT_WINDOWS_H

View File

@ -177,7 +177,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
// type-specific handling goes here // type-specific handling goes here
#ifndef Q_WS_WINCE #ifndef Q_OS_WINCE
static GetSpecialFolderPath SHGetSpecialFolderPath = resolveGetSpecialFolderPath(); static GetSpecialFolderPath SHGetSpecialFolderPath = resolveGetSpecialFolderPath();
if (SHGetSpecialFolderPath) { if (SHGetSpecialFolderPath) {
wchar_t path[MAX_PATH]; wchar_t path[MAX_PATH];

View File

@ -69,7 +69,7 @@
#include <winuser.h> #include <winuser.h>
#if !defined(WINABLEAPI) #if !defined(WINABLEAPI)
# if defined(Q_WS_WINCE) # if defined(Q_OS_WINCE)
# include <bldver.h> # include <bldver.h>
# endif # endif
# include <winable.h> # include <winable.h>
@ -80,7 +80,7 @@
#include <comdef.h> #include <comdef.h>
#endif #endif
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
#include "qguifunctions_wince.h" #include "qguifunctions_wince.h"
#endif #endif
@ -1344,7 +1344,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev
typedef void (WINAPI *PtrNotifyWinEvent)(DWORD, HWND, LONG, LONG); 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 // There is no user32.lib nor NotifyWinEvent for CE
return; return;
#else #else
@ -1382,7 +1382,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev
++eventNum; ++eventNum;
} }
#endif // Q_WS_WINCE #endif // Q_OS_WINCE
} }
/* /*

View File

@ -1060,7 +1060,7 @@ QColorShower::QColorShower(QColorDialog *parent)
gl->setMargin(gl->spacing()); gl->setMargin(gl->spacing());
lab = new QColorShowLabel(this); lab = new QColorShowLabel(this);
#ifndef Q_WS_WINCE #ifndef Q_OS_WINCE
#ifdef QT_SMALL_COLORDIALOG #ifdef QT_SMALL_COLORDIALOG
lab->setMinimumHeight(60); lab->setMinimumHeight(60);
#endif #endif
@ -1452,7 +1452,7 @@ void QColorDialogPrivate::init(const QColor &initial)
leftLay = 0; leftLay = 0;
#if defined(Q_WS_WINCE) || defined(QT_SMALL_COLORDIALOG) #if defined(Q_OS_WINCE) || defined(QT_SMALL_COLORDIALOG)
smallDisplay = true; smallDisplay = true;
const int lumSpace = 20; const int lumSpace = 20;
#else #else
@ -1477,7 +1477,7 @@ void QColorDialogPrivate::init(const QColor &initial)
leftLay->addWidget(lblBasicColors); leftLay->addWidget(lblBasicColors);
leftLay->addWidget(standard); leftLay->addWidget(standard);
#if !defined(Q_WS_WINCE) #if !defined(Q_OS_WINCE)
leftLay->addStretch(); leftLay->addStretch();
#endif #endif

View File

@ -404,8 +404,8 @@ void QDialogPrivate::resetModalitySetByOpen()
resetModalityTo = -1; resetModalityTo = -1;
} }
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
void QDialogPrivate::_q_doneAction() void QDialogPrivate::_q_doneAction()
{ {
//Done... //Done...
@ -419,7 +419,7 @@ void QDialogPrivate::_q_doneAction()
bool QDialog::event(QEvent *e) bool QDialog::event(QEvent *e)
{ {
bool result = QWidget::event(e); bool result = QWidget::event(e);
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (e->type() == QEvent::OkRequest) { if (e->type() == QEvent::OkRequest) {
accept(); accept();
result = true; result = true;

View File

@ -102,7 +102,7 @@ public Q_SLOTS:
protected: protected:
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0); QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0);
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
bool event(QEvent *e); bool event(QEvent *e);
#endif #endif
void keyPressEvent(QKeyEvent *); void keyPressEvent(QKeyEvent *);
@ -119,7 +119,7 @@ private:
Q_DISABLE_COPY(QDialog) Q_DISABLE_COPY(QDialog)
Q_PRIVATE_SLOT(d_func(), void _q_platformRunNativeAppModalPanel()) 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()) Q_PRIVATE_SLOT(d_func(), void _q_doneAction())
#endif #endif
}; };

View File

@ -101,7 +101,7 @@ public:
void hideDefault(); void hideDefault();
void resetModalitySetByOpen(); void resetModalitySetByOpen();
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
void _q_doneAction(); void _q_doneAction();
#endif #endif

View File

@ -61,7 +61,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_high_dpi(); //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 QSize QErrorMessageTextView::minimumSizeHint() const
{ {
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (qt_wince_is_mobile()) if (qt_wince_is_mobile())
if (qt_wince_is_high_dpi()) if (qt_wince_is_high_dpi())
return QSize(200, 200); return QSize(200, 200);
@ -122,7 +122,7 @@ QSize QErrorMessageTextView::minimumSizeHint() const
QSize QErrorMessageTextView::sizeHint() const QSize QErrorMessageTextView::sizeHint() const
{ {
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (qt_wince_is_mobile()) if (qt_wince_is_mobile())
if (qt_wince_is_high_dpi()) if (qt_wince_is_high_dpi())
return QSize(400, 200); return QSize(400, 200);
@ -132,7 +132,7 @@ QSize QErrorMessageTextView::sizeHint() const
return QSize(300, 100); return QSize(300, 100);
#else #else
return QSize(250, 75); return QSize(250, 75);
#endif //Q_WS_WINCE #endif //Q_OS_WINCE
} }
/*! /*!
@ -255,7 +255,7 @@ QErrorMessage::QErrorMessage(QWidget * parent)
#endif #endif
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
d->ok->setFixedSize(0,0); d->ok->setFixedSize(0,0);
#endif #endif
connect(d->ok, SIGNAL(clicked()), this, SLOT(accept())); connect(d->ok, SIGNAL(clicked()), this, SLOT(accept()));

View File

@ -2002,7 +2002,7 @@ QString QFileDialog::getExistingDirectory(QWidget *parent,
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly) if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly)
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
&& qt_priv_ptr_valid && qt_priv_ptr_valid
#endif #endif
) { ) {

View File

@ -316,11 +316,11 @@ void QFontDialogPrivate::init()
buttonBox->addButton(QDialogButtonBox::Cancel); buttonBox->addButton(QDialogButtonBox::Cancel);
QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject())); QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
q->resize(180, 120); q->resize(180, 120);
#else #else
q->resize(500, 360); q->resize(500, 360);
#endif // Q_WS_WINCE #endif // Q_OS_WINCE
sizeEdit->installEventFilter(q); sizeEdit->installEventFilter(q);
familyList->installEventFilter(q); familyList->installEventFilter(q);

View File

@ -189,7 +189,7 @@ public:
int layoutMinimumWidth(); int layoutMinimumWidth();
void retranslateStrings(); void retranslateStrings();
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void hideSpecial(); void hideSpecial();
#endif #endif
@ -307,7 +307,7 @@ void QMessageBoxPrivate::updateSize()
return; return;
QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); 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. // the width of the screen, less the window border.
int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width()); int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width());
#else #else
@ -322,11 +322,11 @@ void QMessageBoxPrivate::updateSize()
int softLimit = qMin(hardLimit, 500); int softLimit = qMin(hardLimit, 500);
#else #else
// note: ideally on windows, hard and soft limits but it breaks compat // 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); int softLimit = qMin(screenSize.width()/2, 500);
#else #else
int softLimit = qMin(screenSize.width() * 3 / 4, 500); int softLimit = qMin(screenSize.width() * 3 / 4, 500);
#endif //Q_WS_WINCE #endif //Q_OS_WINCE
#endif #endif
if (informativeLabel) if (informativeLabel)
@ -384,7 +384,7 @@ void QMessageBoxPrivate::updateSize()
} }
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
/*! /*!
\internal \internal
Hides special buttons which are rather shown in the title bar Hides special buttons which are rather shown in the title bar
@ -1239,7 +1239,7 @@ bool QMessageBox::event(QEvent *e)
case QEvent::LanguageChange: case QEvent::LanguageChange:
d_func()->retranslateStrings(); d_func()->retranslateStrings();
break; break;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
case QEvent::OkRequest: case QEvent::OkRequest:
case QEvent::HelpRequest: { case QEvent::HelpRequest: {
QString bName = QString bName =
@ -1382,7 +1382,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
QDialog::keyPressEvent(e); QDialog::keyPressEvent(e);
} }
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
/*! /*!
\reimp \reimp
*/ */
@ -1453,7 +1453,7 @@ void QMessageBox::showEvent(QShowEvent *e)
Q_D(QMessageBox); Q_D(QMessageBox);
if (d->autoAddOkButton) { if (d->autoAddOkButton) {
addButton(Ok); addButton(Ok);
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
d->hideSpecial(); d->hideSpecial();
#endif #endif
} }
@ -1773,7 +1773,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png")); QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png"));
if (!pm.isNull()) if (!pm.isNull())
msgBox->setIconPixmap(pm); msgBox->setIconPixmap(pm);
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
msgBox->setDefaultButton(msgBox->addButton(QMessageBox::Ok)); msgBox->setDefaultButton(msgBox->addButton(QMessageBox::Ok));
#endif #endif

View File

@ -143,7 +143,7 @@ public:
QPushButton *addButton(StandardButton button); QPushButton *addButton(StandardButton button);
void removeButton(QAbstractButton *button); void removeButton(QAbstractButton *button);
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void setVisible(bool visible); void setVisible(bool visible);
#endif #endif

View File

@ -69,7 +69,7 @@
#include "private/qdialog_p.h" #include "private/qdialog_p.h"
#include <qdebug.h> #include <qdebug.h>
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp
#endif #endif
@ -2178,7 +2178,7 @@ QWizard::QWizard(QWidget *parent, Qt::WindowFlags flags)
{ {
Q_D(QWizard); Q_D(QWizard);
d->init(); d->init();
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (!qt_wince_is_mobile()) if (!qt_wince_is_mobile())
setWindowFlags(windowFlags() & ~Qt::WindowOkButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowOkButtonHint);
#endif #endif

View File

@ -104,7 +104,7 @@
#include "qlibrary.h" #include "qlibrary.h"
#endif #endif
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
#include "qdatetime.h" #include "qdatetime.h"
#include "qguifunctions_wince.h" #include "qguifunctions_wince.h"
extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp 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() static void initResources()
{ {
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
Q_INIT_RESOURCE_EXTERN(qstyle_wince) Q_INIT_RESOURCE_EXTERN(qstyle_wince)
Q_INIT_RESOURCE(qstyle_wince); Q_INIT_RESOURCE(qstyle_wince);
#else #else
@ -140,7 +140,7 @@ Q_CORE_EXPORT void qt_call_post_routines();
QApplicationPrivate *QApplicationPrivate::self = 0; QApplicationPrivate *QApplicationPrivate::self = 0;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
int QApplicationPrivate::autoMaximizeThreshold = -1; int QApplicationPrivate::autoMaximizeThreshold = -1;
bool QApplicationPrivate::autoSipEnabled = false; bool QApplicationPrivate::autoSipEnabled = false;
#else #else
@ -873,7 +873,7 @@ void QApplicationPrivate::initialize()
if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0) if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0)
q->setAttribute(Qt::AA_NativeWindows); q->setAttribute(Qt::AA_NativeWindows);
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
#ifdef QT_AUTO_MAXIMIZE_THRESHOLD #ifdef QT_AUTO_MAXIMIZE_THRESHOLD
autoMaximizeThreshold = QT_AUTO_MAXIMIZE_THRESHOLD; autoMaximizeThreshold = QT_AUTO_MAXIMIZE_THRESHOLD;
#else #else
@ -882,7 +882,7 @@ void QApplicationPrivate::initialize()
else else
autoMaximizeThreshold = -1; autoMaximizeThreshold = -1;
#endif //QT_AUTO_MAXIMIZE_THRESHOLD #endif //QT_AUTO_MAXIMIZE_THRESHOLD
#endif //Q_WS_WINCE #endif //Q_OS_WINCE
#ifndef QT_NO_WHEELEVENT #ifndef QT_NO_WHEELEVENT
QApplicationPrivate::wheel_scroll_lines = 3; QApplicationPrivate::wheel_scroll_lines = 3;
@ -1202,7 +1202,7 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis
The default is platform dependent. The default is platform dependent.
*/ */
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void QApplication::setAutoMaximizeThreshold(const int threshold) void QApplication::setAutoMaximizeThreshold(const int threshold)
{ {
QApplicationPrivate::autoMaximizeThreshold = threshold; QApplicationPrivate::autoMaximizeThreshold = threshold;
@ -3993,7 +3993,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
if (receiver->isWidgetType()) { if (receiver->isWidgetType()) {
QWidget *widget = static_cast<QWidget *>(receiver); QWidget *widget = static_cast<QWidget *>(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 // toggle HasMouse widget state on enter and leave
if ((e->type() == QEvent::Enter || e->type() == QEvent::DragEnter) && if ((e->type() == QEvent::Enter || e->type() == QEvent::DragEnter) &&
(!QApplication::activePopupWidget() || QApplication::activePopupWidget() == widget->window())) (!QApplication::activePopupWidget() || QApplication::activePopupWidget() == widget->window()))

View File

@ -89,7 +89,7 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
#ifndef QT_NO_STYLE_STYLESHEET #ifndef QT_NO_STYLE_STYLESHEET
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet) Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
#endif #endif
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold) Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold)
#endif #endif
Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled) Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled)
@ -245,7 +245,7 @@ public Q_SLOTS:
#ifndef QT_NO_STYLE_STYLESHEET #ifndef QT_NO_STYLE_STYLESHEET
void setStyleSheet(const QString& sheet); void setStyleSheet(const QString& sheet);
#endif #endif
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void setAutoMaximizeThreshold(const int threshold); void setAutoMaximizeThreshold(const int threshold);
int autoMaximizeThreshold() const; int autoMaximizeThreshold() const;
#endif #endif

View File

@ -187,7 +187,7 @@ public:
static bool qws_apply_settings(); static bool qws_apply_settings();
static QWidget *findWidget(const QObjectList&, const QPoint &, bool rec); static QWidget *findWidget(const QObjectList&, const QPoint &, bool rec);
#endif #endif
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
static int autoMaximizeThreshold; static int autoMaximizeThreshold;
#endif #endif
static bool autoSipEnabled; static bool autoSipEnabled;

View File

@ -50,7 +50,7 @@
#include "qplatformdefs.h" #include "qplatformdefs.h"
#include "qicon.h" #include "qicon.h"
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
#include "qguifunctions_wince.h" #include "qguifunctions_wince.h"
extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp
extern bool qt_wince_is_mobile(); //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 */ /* return the string key to be used by default the application */
QString QGuiPlatformPlugin::styleName() 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()) if (qt_wince_is_smartphone() || qt_wince_is_pocket_pc())
return QLatin1String("WindowsMobile"); return QLatin1String("WindowsMobile");
else else

View File

@ -1095,7 +1095,7 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w)
if (customize) if (customize)
; // don't modify window flags if the user explicitly set them. ; // don't modify window flags if the user explicitly set them.
else if (type == Qt::Dialog || type == Qt::Sheet) 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; flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint;
#else #else
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint;
@ -4150,7 +4150,7 @@ const QPalette &QWidget::palette() const
if (!isEnabled()) { if (!isEnabled()) {
data->pal.setCurrentColorGroup(QPalette::Disabled); data->pal.setCurrentColorGroup(QPalette::Disabled);
} else if ((!isVisible() || isActiveWindow()) } 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<QWidget *>(this)) && !QApplicationPrivate::isBlockedByModal(const_cast<QWidget *>(this))
#endif #endif
) { ) {
@ -7579,7 +7579,7 @@ QSize QWidgetPrivate::adjustedSize() const
#else // all others #else // all others
QRect screen = QApplication::desktop()->screenGeometry(q->pos()); QRect screen = QApplication::desktop()->screenGeometry(q->pos());
#endif #endif
#if defined (Q_WS_WINCE) #if defined (Q_OS_WINCE)
s.setWidth(qMin(s.width(), screen.width())); s.setWidth(qMin(s.width(), screen.width()));
s.setHeight(qMin(s.height(), screen.height())); s.setHeight(qMin(s.height(), screen.height()));
#else #else

View File

@ -481,7 +481,7 @@ public Q_SLOTS:
virtual void setVisible(bool visible); virtual void setVisible(bool visible);
inline void setHidden(bool hidden) { setVisible(!hidden); } inline void setHidden(bool hidden) { setVisible(!hidden); }
#ifndef Q_WS_WINCE #ifndef Q_OS_WINCE
inline void show() { setVisible(true); } inline void show() { setVisible(true); }
#else #else
void show(); void show();

View File

@ -72,13 +72,13 @@
#include "qdebug.h" #include "qdebug.h"
#include "qtabwidget.h" #include "qtabwidget.h"
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
#include "qt_windows.h" #include "qt_windows.h"
#include "qguifunctions_wince.h" #include "qguifunctions_wince.h"
extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp 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_smartphone(); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_windows_mobile_65(); //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" #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[] = { static char * sbhandleup_xpm[] = {
"26 41 45 1", "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 }; enum QSliderDirection { SliderUp, SliderDown, SliderLeft, SliderRight };
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
void QWindowsMobileStylePrivate::tintImagesButton(QColor color) 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() void QWindowsMobileStylePrivate::setupWindowsMobileStyle65()
{ {
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
wm65 = qt_wince_is_windows_mobile_65(); wm65 = qt_wince_is_windows_mobile_65();
if (wm65) { if (wm65) {
imageScrollbarHandleUp = QImage(sbhandleup_xpm); imageScrollbarHandleUp = QImage(sbhandleup_xpm);
@ -4119,13 +4119,13 @@ void QWindowsMobileStylePrivate::setupWindowsMobileStyle65()
} }
tintImagesHigh(Qt::blue); tintImagesHigh(Qt::blue);
} }
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
} }
void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOptionTab *tab) void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOptionTab *tab)
{ {
#ifndef QT_NO_TABBAR #ifndef QT_NO_TABBAR
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (wm65) { if (wm65) {
tintImagesButton(tab->palette.button().color()); tintImagesButton(tab->palette.button().color());
QRect r; QRect r;
@ -4154,7 +4154,7 @@ void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOp
//imageTabBarBig //imageTabBarBig
return; return;
} }
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
painter->save(); painter->save();
painter->setPen(tab->palette.shadow().color()); painter->setPen(tab->palette.shadow().color());
if (doubleControls) { if (doubleControls) {
@ -4216,7 +4216,7 @@ void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOp
void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect) void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect)
{ {
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (wm65) { if (wm65) {
QRect r; QRect r;
if (rect.isValid()) if (rect.isValid())
@ -4257,7 +4257,7 @@ void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, co
} }
return; return;
} }
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
QPalette::ColorGroup cg = option->state & QStyle::State_Enabled QPalette::ColorGroup cg = option->state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled; ? 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) 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 (wm65) {
if (newScrollbar->orientation == Qt::Horizontal) { if (newScrollbar->orientation == Qt::Horizontal) {
QTransform transform; QTransform transform;
@ -4361,7 +4361,7 @@ void QWindowsMobileStylePrivate::drawScrollbarGrip(QPainter *p, QStyleOptionSlid
void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool ) void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool )
{ {
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (wm65) { if (wm65) {
tintImagesHigh(opt->palette.highlight().color()); tintImagesHigh(opt->palette.highlight().color());
QRect r = opt->rect; QRect r = opt->rect;
@ -4380,7 +4380,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOption
} }
return ; return ;
} }
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
QBrush fill = opt->palette.button(); QBrush fill = opt->palette.button();
if (opt->state & QStyle::State_Sunken) 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) void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool secondScrollBar)
{ {
#ifndef QT_NO_SCROLLBAR #ifndef QT_NO_SCROLLBAR
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (wm65) { if (wm65) {
tintImagesHigh(opt->palette.highlight().color()); tintImagesHigh(opt->palette.highlight().color());
QRect r = opt->rect; QRect r = opt->rect;
@ -4437,7 +4437,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOpti
} }
return ; return ;
} }
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
QBrush fill = opt->palette.button(); QBrush fill = opt->palette.button();
if (opt->state & QStyle::State_Sunken) if (opt->state & QStyle::State_Sunken)
@ -4520,13 +4520,13 @@ QWindowsMobileStyle::QWindowsMobileStyle() : QWindowsStyle(*new QWindowsMobileSt
QWindowsMobileStylePrivate::QWindowsMobileStylePrivate() :QWindowsStylePrivate() { QWindowsMobileStylePrivate::QWindowsMobileStylePrivate() :QWindowsStylePrivate() {
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
doubleControls = qt_wince_is_high_dpi(); doubleControls = qt_wince_is_high_dpi();
smartphone = qt_wince_is_smartphone(); smartphone = qt_wince_is_smartphone();
#else #else
doubleControls = false; doubleControls = false;
smartphone = false; smartphone = false;
#endif //Q_WS_WINCE #endif //Q_OS_WINCE
#ifndef QT_NO_IMAGEFORMAT_XPM #ifndef QT_NO_IMAGEFORMAT_XPM
@ -5215,7 +5215,7 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
} }
switch (tab->shape) { switch (tab->shape) {
case QTabBar::RoundedNorth: case QTabBar::RoundedNorth:
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (!d->wm65) if (!d->wm65)
#endif #endif
{ {
@ -5226,7 +5226,7 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
} }
break; break;
case QTabBar::RoundedSouth: case QTabBar::RoundedSouth:
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (!d->wm65) if (!d->wm65)
#endif #endif
{ {
@ -5237,13 +5237,13 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
} }
break; break;
case QTabBar::RoundedEast: case QTabBar::RoundedEast:
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (!d->wm65) if (!d->wm65)
#endif #endif
painter->drawLine(rect.topRight(), rect.bottomRight()); painter->drawLine(rect.topRight(), rect.bottomRight());
break; break;
case QTabBar::RoundedWest: case QTabBar::RoundedWest:
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (!d->wm65) if (!d->wm65)
#endif #endif
painter->drawLine(rect.topLeft(), rect.bottomLeft()); painter->drawLine(rect.topLeft(), rect.bottomLeft());
@ -6458,7 +6458,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio
newSize += QSize(4, 2); newSize += QSize(4, 2);
break; break;
#ifndef QT_NO_ITEMVIEWS #ifndef QT_NO_ITEMVIEWS
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
case CT_ItemViewItem: case CT_ItemViewItem:
if (d_func()->wm65) if (d_func()->wm65)
if (d_func()->doubleControls) if (d_func()->doubleControls)
@ -6466,7 +6466,7 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio
else else
newSize.setHeight(23); newSize.setHeight(23);
break; break;
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
#endif //QT_NO_ITEMVIEWS #endif //QT_NO_ITEMVIEWS
default: default:
break; break;
@ -6508,7 +6508,7 @@ QRect QWindowsMobileStyle::subElementRect(SubElement element, const QStyleOption
#endif // QT_NO_SLIDER #endif // QT_NO_SLIDER
#ifndef QT_NO_ITEMVIEWS #ifndef QT_NO_ITEMVIEWS
case SE_ItemViewItemFocusRect: case SE_ItemViewItemFocusRect:
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (d->wm65) if (d->wm65)
rect = QRect(); rect = QRect();
#endif #endif
@ -6533,13 +6533,13 @@ QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOp
float stretchFactor = 1.4f; float stretchFactor = 1.4f;
int sliderButtonExtentDir = int (sliderButtonExtent * stretchFactor); int sliderButtonExtentDir = int (sliderButtonExtent * stretchFactor);
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (d->wm65) if (d->wm65)
{ {
sliderButtonExtent = d->imageScrollbarHandleUp.width(); sliderButtonExtent = d->imageScrollbarHandleUp.width();
sliderButtonExtentDir = d->imageScrollbarHandleUp.height(); sliderButtonExtentDir = d->imageScrollbarHandleUp.height();
} }
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
int sliderlen; int sliderlen;
int maxlen = ((scrollbar->orientation == Qt::Horizontal) ? 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; d->doubleControls ? ret = 42 : ret = 21;
break; break;
case PM_ScrollBarSliderMin: case PM_ScrollBarSliderMin:
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (d->wm65) if (d->wm65)
#else #else
if (false) if (false)
@ -7085,7 +7085,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co
else else
d->doubleControls ? ret = 25 : ret = 13; d->doubleControls ? ret = 25 : ret = 13;
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (d->wm65) if (d->wm65)
#else #else
if (false) if (false)
@ -7239,10 +7239,10 @@ QPixmap QWindowsMobileStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPi
switch (iconMode) { switch (iconMode) {
case QIcon::Selected: { case QIcon::Selected: {
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
if (d_func()->wm65) if (d_func()->wm65)
return pixmap; return pixmap;
#endif //Q_WS_WINCE_WM #endif //Q_OS_WINCE_WM
QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32); QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32);
int imgh = img.height(); int imgh = img.height();
int imgw = img.width(); int imgw = img.width();

View File

@ -71,7 +71,7 @@ public:
QWindowsMobileStylePrivate(); QWindowsMobileStylePrivate();
bool doubleControls; bool doubleControls;
bool smartphone; bool smartphone;
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
bool wm65; bool wm65;
#endif #endif
@ -95,7 +95,7 @@ public:
void setupWindowsMobileStyle65(); void setupWindowsMobileStyle65();
#ifdef Q_WS_WINCE_WM #ifdef Q_OS_WINCE_WM
//Windows Mobile 6.5 images //Windows Mobile 6.5 images
QImage imageScrollbarHandleUp; QImage imageScrollbarHandleUp;
QImage imageScrollbarHandleDown; QImage imageScrollbarHandleDown;
@ -119,7 +119,7 @@ public:
void tintImagesButton(QColor color); void tintImagesButton(QColor color);
void tintListViewHighlight(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 drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false);
void drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false); void drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame = false, bool secondScrollBar = false);

View File

@ -434,13 +434,13 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title
titleLabel->setText(title); titleLabel->setText(title);
QFont f = titleLabel->font(); QFont f = titleLabel->font();
f.setBold(true); f.setBold(true);
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
f.setPointSize(f.pointSize() - 2); f.setPointSize(f.pointSize() - 2);
#endif #endif
titleLabel->setFont(f); titleLabel->setFont(f);
titleLabel->setTextFormat(Qt::PlainText); // to maintain compat with windows 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 iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize);
const int closeButtonSize = style()->pixelMetric(QStyle::PM_SmallIconSize) - 2; const int closeButtonSize = style()->pixelMetric(QStyle::PM_SmallIconSize) - 2;
#else #else
@ -456,7 +456,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title
QObject::connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); QObject::connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
QLabel *msgLabel = new QLabel; QLabel *msgLabel = new QLabel;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
f.setBold(false); f.setBold(false);
msgLabel->setFont(f); msgLabel->setFont(f);
#endif #endif
@ -466,7 +466,7 @@ QBalloonTip::QBalloonTip(QSystemTrayIcon::MessageIcon icon, const QString& title
msgLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); msgLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
// smart size for the message label // smart size for the message label
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 2; int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 2;
#else #else
int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 3; 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); 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 // Make sure that the text isn't wrapped "somewhere" in the balloon widget
// in the case that we have a long title label. // in the case that we have a long title label.
setMaximumWidth(limit); setMaximumWidth(limit);

View File

@ -207,7 +207,7 @@ bool QDockWidgetLayout::nativeWindowDeco() const
bool QDockWidgetLayout::nativeWindowDeco(bool floating) 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); Q_UNUSED(floating);
return false; return false;
#else #else

View File

@ -111,7 +111,7 @@ QAlphaWidget::QAlphaWidget(QWidget* w, Qt::WindowFlags f)
QAlphaWidget::~QAlphaWidget() 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 // Restore user-defined opacity value
if (widget) if (widget)
widget->setWindowOpacity(1); widget->setWindowOpacity(1);

View File

@ -1772,7 +1772,7 @@ bool QMdiSubWindowPrivate::drawTitleBarWhenMaximized() const
if (isChildOfTabbedQMdiArea(q)) if (isChildOfTabbedQMdiArea(q))
return false; 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; return true;
#else #else
if (q->style()->styleHint(QStyle::SH_Workspace_FillSpaceOnMaximize, 0, q)) if (q->style()->styleHint(QStyle::SH_Workspace_FillSpaceOnMaximize, 0, q))

View File

@ -2882,7 +2882,7 @@ void QMenu::actionEvent(QActionEvent *e)
d->platformMenu->syncAction(e->action()); 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) if (!d->wce_menu)
d->wce_menu = new QMenuPrivate::QWceMenuPrivate; d->wce_menu = new QMenuPrivate::QWceMenuPrivate;
if (e->type() == QEvent::ActionAdded) if (e->type() == QEvent::ActionAdded)

View File

@ -48,7 +48,7 @@
#include <QtWidgets/qaction.h> #include <QtWidgets/qaction.h>
#include <QtWidgets/qplatformmenu_qpa.h> #include <QtWidgets/qplatformmenu_qpa.h>
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
#include <windef.h> // for HMENU #include <windef.h> // for HMENU
#endif #endif
@ -136,7 +136,7 @@ public:
void setNoReplayFor(QWidget *widget); void setNoReplayFor(QWidget *widget);
QPlatformMenu *platformMenu(); QPlatformMenu *platformMenu();
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
HMENU wceMenu(); HMENU wceMenu();
#endif #endif
@ -170,7 +170,7 @@ protected:
bool focusNextPrevChild(bool next); bool focusNextPrevChild(bool next);
void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const; void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
QAction* wceCommands(uint command); QAction* wceCommands(uint command);
#endif #endif

View File

@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
class QTornOffMenu; class QTornOffMenu;
class QEventLoop; class QEventLoop;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
struct QWceMenuAction { struct QWceMenuAction {
uint command; uint command;
QPointer<QAction> action; QPointer<QAction> action;
@ -91,7 +91,7 @@ public:
scroll(0), eventLoop(0), tearoff(0), tornoff(0), tearoffHighlighted(0), scroll(0), eventLoop(0), tearoff(0), tornoff(0), tearoffHighlighted(0),
hasCheckableItems(0), sloppyAction(0), doChildEffects(false), platformMenu(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) ,wce_menu(0)
#endif #endif
{ } { }
@ -99,7 +99,7 @@ public:
{ {
delete scroll; delete scroll;
delete platformMenu; delete platformMenu;
#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) #if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR)
delete wce_menu; delete wce_menu;
#endif #endif
} }
@ -228,7 +228,7 @@ public:
QPointer<QAction> actionAboutToTrigger; QPointer<QAction> actionAboutToTrigger;
#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) #if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR)
struct QWceMenuPrivate { struct QWceMenuPrivate {
QList<QWceMenuAction*> actionItems; QList<QWceMenuAction*> actionItems;
HMENU menuHandle; HMENU menuHandle;

View File

@ -40,7 +40,7 @@
****************************************************************************/ ****************************************************************************/
//Native menubars are only supported for Windows Mobile not the standard SDK/generic WinCE //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 "qmenu.h"
#include "qt_windows.h" #include "qt_windows.h"
#include "qapplication.h" #include "qapplication.h"
@ -665,4 +665,4 @@ void QMenuBarPrivate::QWceMenuBarPrivate::rebuild()
QT_END_NAMESPACE QT_END_NAMESPACE
#endif //QT_NO_MENUBAR #endif //QT_NO_MENUBAR
#endif //Q_WS_WINCE #endif //Q_OS_WINCE

View File

@ -64,7 +64,7 @@
#include "qmenubar_p.h" #include "qmenubar_p.h"
#include "qdebug.h" #include "qdebug.h"
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp
#endif #endif
@ -719,7 +719,7 @@ void QMenuBarPrivate::init()
if (platformMenuBar) if (platformMenuBar)
q->hide(); q->hide();
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (qt_wince_is_mobile()) { if (qt_wince_is_mobile()) {
wceCreateMenuBar(q->parentWidget()); wceCreateMenuBar(q->parentWidget());
if(wce_menubar) if(wce_menubar)
@ -783,7 +783,7 @@ QMenuBar::~QMenuBar()
delete d->platformMenuBar; delete d->platformMenuBar;
d->platformMenuBar = 0; d->platformMenuBar = 0;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
Q_D(QMenuBar); Q_D(QMenuBar);
if (qt_wince_is_mobile()) if (qt_wince_is_mobile())
d->wceDestroyMenuBar(); d->wceDestroyMenuBar();
@ -1245,7 +1245,7 @@ void QMenuBar::actionEvent(QActionEvent *e)
if (d->platformMenuBar) { if (d->platformMenuBar) {
QPlatformMenuBar *nativeMenuBar = d->platformMenuBar; QPlatformMenuBar *nativeMenuBar = d->platformMenuBar;
#if defined(Q_WS_WINCE) #if defined(Q_OS_WINCE)
QMenuBarPrivate::QWceMenuBarPrivate *nativeMenuBar = d->wce_menubar; QMenuBarPrivate::QWceMenuBarPrivate *nativeMenuBar = d->wce_menubar;
#endif #endif
if (!nativeMenuBar) if (!nativeMenuBar)
@ -1338,7 +1338,7 @@ void QMenuBarPrivate::handleReparent()
if (platformMenuBar) if (platformMenuBar)
platformMenuBar->handleReparent(newParent); platformMenuBar->handleReparent(newParent);
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (qt_wince_is_mobile() && wce_menubar) if (qt_wince_is_mobile() && wce_menubar)
wce_menubar->rebuild(); wce_menubar->rebuild();
#endif #endif
@ -1526,7 +1526,7 @@ QRect QMenuBar::actionGeometry(QAction *act) const
QSize QMenuBar::minimumSizeHint() const QSize QMenuBar::minimumSizeHint() const
{ {
Q_D(const QMenuBar); 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(); const bool as_gui_menubar = !isNativeMenuBar();
#else #else
const bool as_gui_menubar = true; const bool as_gui_menubar = true;
@ -1582,7 +1582,7 @@ QSize QMenuBar::minimumSizeHint() const
QSize QMenuBar::sizeHint() const QSize QMenuBar::sizeHint() const
{ {
Q_D(const QMenuBar); 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(); const bool as_gui_menubar = !isNativeMenuBar();
#else #else
const bool as_gui_menubar = true; const bool as_gui_menubar = true;
@ -1641,7 +1641,7 @@ QSize QMenuBar::sizeHint() const
int QMenuBar::heightForWidth(int) const int QMenuBar::heightForWidth(int) const
{ {
Q_D(const QMenuBar); 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(); const bool as_gui_menubar = !isNativeMenuBar();
#else #else
const bool as_gui_menubar = true; const bool as_gui_menubar = true;
@ -1838,13 +1838,13 @@ QPlatformMenuBar *QMenuBar::platformMenuBar()
\sa defaultAction() \sa defaultAction()
*/ */
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void QMenuBar::setDefaultAction(QAction *act) void QMenuBar::setDefaultAction(QAction *act)
{ {
Q_D(QMenuBar); Q_D(QMenuBar);
if (d->defaultAction == act) if (d->defaultAction == act)
return; return;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (qt_wince_is_mobile()) if (qt_wince_is_mobile())
if (d->defaultAction) { if (d->defaultAction) {
disconnect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); disconnect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction()));
@ -1852,7 +1852,7 @@ void QMenuBar::setDefaultAction(QAction *act)
} }
#endif #endif
d->defaultAction = act; d->defaultAction = act;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
if (qt_wince_is_mobile()) if (qt_wince_is_mobile())
if (d->defaultAction) { if (d->defaultAction) {
connect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); connect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction()));

View File

@ -102,7 +102,7 @@ public:
void setCornerWidget(QWidget *w, Qt::Corner corner = Qt::TopRightCorner); void setCornerWidget(QWidget *w, Qt::Corner corner = Qt::TopRightCorner);
QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const; QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void setDefaultAction(QAction *); void setDefaultAction(QAction *);
QAction *defaultAction() const; QAction *defaultAction() const;
@ -145,7 +145,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_internalShortcutActivated(int)) Q_PRIVATE_SLOT(d_func(), void _q_internalShortcutActivated(int))
Q_PRIVATE_SLOT(d_func(), void _q_updateLayout()) Q_PRIVATE_SLOT(d_func(), void _q_updateLayout())
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
Q_PRIVATE_SLOT(d_func(), void _q_updateDefaultAction()) Q_PRIVATE_SLOT(d_func(), void _q_updateDefaultAction())
#endif #endif

View File

@ -57,7 +57,7 @@
#include "QtWidgets/qstyleoption.h" #include "QtWidgets/qstyleoption.h"
#include <private/qmenu_p.h> // Mac needs what in this file! #include <private/qmenu_p.h> // Mac needs what in this file!
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
#include "qguifunctions_wince.h" #include "qguifunctions_wince.h"
#endif #endif
@ -73,14 +73,14 @@ public:
closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0), closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0),
nativeMenuBar(-1), doChildEffects(false), platformMenuBar(0) nativeMenuBar(-1), doChildEffects(false), platformMenuBar(0)
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
, wce_menubar(0), wceClassicMenu(false) , wce_menubar(0), wceClassicMenu(false)
#endif #endif
{ } { }
~QMenuBarPrivate() ~QMenuBarPrivate()
{ {
delete platformMenuBar; delete platformMenuBar;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
delete wce_menubar; delete wce_menubar;
#endif #endif
} }
@ -124,7 +124,7 @@ public:
void _q_internalShortcutActivated(int); void _q_internalShortcutActivated(int);
void _q_updateLayout(); void _q_updateLayout();
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void _q_updateDefaultAction(); void _q_updateDefaultAction();
#endif #endif
@ -150,7 +150,7 @@ public:
QBasicTimer autoReleaseTimer; QBasicTimer autoReleaseTimer;
QPlatformMenuBar *platformMenuBar; QPlatformMenuBar *platformMenuBar;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
void wceCreateMenuBar(QWidget *); void wceCreateMenuBar(QWidget *);
void wceDestroyMenuBar(); void wceDestroyMenuBar();
struct QWceMenuBarPrivate { struct QWceMenuBarPrivate {

View File

@ -387,7 +387,7 @@ void QScrollBarPrivate::init()
q->setAttribute(Qt::WA_WState_OwnSizePolicy, false); q->setAttribute(Qt::WA_WState_OwnSizePolicy, false);
q->setAttribute(Qt::WA_OpaquePaintEvent); 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)) { if (!q->style()->styleHint(QStyle::SH_ScrollBar_ContextMenu, 0, q)) {
q->setContextMenuPolicy(Qt::PreventContextMenu); q->setContextMenuPolicy(Qt::PreventContextMenu);
} }

View File

@ -1163,7 +1163,7 @@ bool QToolBar::event(QEvent *event)
if (d->mouseMoveEvent(static_cast<QMouseEvent*>(event))) if (d->mouseMoveEvent(static_cast<QMouseEvent*>(event)))
return true; return true;
break; break;
#ifdef Q_WS_WINCE #ifdef Q_OS_WINCE
case QEvent::ContextMenu: case QEvent::ContextMenu:
{ {
QContextMenuEvent* contextMenuEvent = static_cast<QContextMenuEvent*>(event); QContextMenuEvent* contextMenuEvent = static_cast<QContextMenuEvent*>(event);