summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qmessagebox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/qmessagebox.cpp')
-rw-r--r--src/gui/dialogs/qmessagebox.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index fb3bcb8..533c538 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -63,7 +63,7 @@
#include <QtGui/qfontmetrics.h>
#include <QtGui/qclipboard.h>
-#ifdef Q_OS_WINCE
+#ifdef Q_WS_WINCE
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_smartphone();//defined in qguifunctions_wince.cpp
extern bool qt_wince_is_pocket_pc(); //defined in qguifunctions_wince.cpp
@@ -152,7 +152,7 @@ public:
int layoutMinimumWidth();
void retranslateStrings();
-#ifdef Q_OS_WINCE
+#ifdef Q_WS_WINCE
void hideSpecial();
#endif
@@ -272,10 +272,7 @@ void QMessageBoxPrivate::updateSize()
return;
QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
-#ifdef Q_WS_QWS
- // the width of the screen, less the window border.
- int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width());
-#elif defined(Q_OS_WINCE)
+#if defined(Q_WS_QWS) || defined(Q_WS_WINCE)
// the width of the screen, less the window border.
int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width());
#else
@@ -290,11 +287,11 @@ void QMessageBoxPrivate::updateSize()
int softLimit = qMin(hardLimit, 500);
#else
// note: ideally on windows, hard and soft limits but it breaks compat
-#ifndef Q_OS_WINCE
+#ifndef Q_WS_WINCE
int softLimit = qMin(screenSize.width()/2, 500);
#else
int softLimit = qMin(screenSize.width() * 3 / 4, 500);
-#endif //Q_OS_WINCE
+#endif //Q_WS_WINCE
#endif
if (informativeLabel)
@@ -351,7 +348,7 @@ void QMessageBoxPrivate::updateSize()
}
-#ifdef Q_OS_WINCE
+#ifdef Q_WS_WINCE
/*!
\internal
Hides special buttons which are rather shown in the title bar
@@ -1208,7 +1205,7 @@ bool QMessageBox::event(QEvent *e)
case QEvent::LanguageChange:
d_func()->retranslateStrings();
break;
-#ifdef Q_OS_WINCE
+#ifdef Q_WS_WINCE
case QEvent::OkRequest:
case QEvent::HelpRequest: {
QString bName =
@@ -1351,7 +1348,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
QDialog::keyPressEvent(e);
}
-#ifdef Q_OS_WINCE
+#ifdef Q_WS_WINCE
/*!
\reimp
*/
@@ -1420,7 +1417,7 @@ void QMessageBox::showEvent(QShowEvent *e)
Q_D(QMessageBox);
if (d->autoAddOkButton) {
addButton(Ok);
-#if defined(Q_OS_WINCE)
+#if defined(Q_WS_WINCE)
d->hideSpecial();
#endif
}
@@ -1728,7 +1725,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_OS_WINCE)
+#if defined(Q_WS_WINCE)
msgBox->setDefaultButton(msgBox->addButton(QMessageBox::Ok));
#endif