diff options
Diffstat (limited to 'src/widgets/dialogs/qmessagebox.cpp')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 0f57fa67e1..634e911cd1 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 @@ -2597,6 +2597,9 @@ QPixmap QMessageBox::standardIcon(Icon icon) When using QMessageBox with custom buttons, this function returns an opaque value; use clickedButton() to determine which button was clicked. + \note The result() function returns also \l StandardButton value instead + of \l QDialog::DialogCode. + Users cannot interact with any other window in the same application until they close the dialog, either by clicking a button or by using a mechanism provided by the window system. |