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
#define LR_SHARED 0
#endif
#endif // Q_WS_WINCE
#endif // Q_OS_WINCE
#endif // QT_WINDOWS_H

View File

@ -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];

View File

@ -69,7 +69,7 @@
#include <winuser.h>
#if !defined(WINABLEAPI)
# if defined(Q_WS_WINCE)
# if defined(Q_OS_WINCE)
# include <bldver.h>
# endif
# include <winable.h>
@ -80,7 +80,7 @@
#include <comdef.h>
#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
}
/*

View File

@ -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

View File

@ -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;

View File

@ -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
};

View File

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

View File

@ -61,7 +61,7 @@
#include <stdio.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_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()));

View File

@ -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
) {

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -69,7 +69,7 @@
#include "private/qdialog_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
@ -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

View File

@ -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<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
if ((e->type() == QEvent::Enter || e->type() == QEvent::DragEnter) &&
(!QApplication::activePopupWidget() || QApplication::activePopupWidget() == widget->window()))

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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<QWidget *>(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

View File

@ -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();

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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))

View File

@ -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)

View File

@ -48,7 +48,7 @@
#include <QtWidgets/qaction.h>
#include <QtWidgets/qplatformmenu_qpa.h>
#ifdef Q_WS_WINCE
#ifdef Q_OS_WINCE
#include <windef.h> // 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

View File

@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
class QTornOffMenu;
class QEventLoop;
#ifdef Q_WS_WINCE
#ifdef Q_OS_WINCE
struct QWceMenuAction {
uint command;
QPointer<QAction> 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<QAction> actionAboutToTrigger;
#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR)
#if defined(Q_OS_WINCE) && !defined(QT_NO_MENUBAR)
struct QWceMenuPrivate {
QList<QWceMenuAction*> actionItems;
HMENU menuHandle;

View File

@ -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

View File

@ -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()));

View File

@ -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

View File

@ -57,7 +57,7 @@
#include "QtWidgets/qstyleoption.h"
#include <private/qmenu_p.h> // 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 {

View File

@ -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);
}

View File

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