diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-08 15:51:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-04-07 10:24:45 +0000 |
commit | 115d4fc8cc1816d70f41c839d7eaa4e24ff86db2 (patch) | |
tree | a79244d8bb42aa7cd675cd6748c737e2559311c0 /src/widgets/dialogs/qmessagebox.cpp | |
parent | 4cb795cbdbc4d117c9de623b086975ebdf1f9a15 (diff) |
QtWidgets: Remove Windows CE.
Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince
.pro file clauses in library, examples and tests.
Task-number: QTBUG-51673
Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qmessagebox.cpp')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index ee760c38a0..994015030f 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -218,9 +218,6 @@ public: int layoutMinimumWidth(); void retranslateStrings(); -#ifdef Q_OS_WINCE - void hideSpecial(); -#endif static int showOldMessageBox(QWidget *parent, QMessageBox::Icon icon, const QString &title, const QString &text, int button0, int button1, int button2); @@ -362,24 +359,15 @@ void QMessageBoxPrivate::updateSize() return; QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); -#if defined(Q_OS_WINCE) - // the width of the screen, less the window border. - int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width()); -#else int hardLimit = qMin(screenSize.width() - 480, 1000); // can never get bigger than this // on small screens allows the messagebox be the same size as the screen if (screenSize.width() <= 1024) hardLimit = screenSize.width(); -#endif #ifdef Q_OS_MAC int softLimit = qMin(screenSize.width()/2, 420); #else // note: ideally on windows, hard and soft limits but it breaks compat -#ifndef Q_OS_WINCE int softLimit = qMin(screenSize.width()/2, 500); -#else - int softLimit = qMin(screenSize.width() * 3 / 4, 500); -#endif //Q_OS_WINCE #endif if (informativeLabel) @@ -436,28 +424,6 @@ void QMessageBoxPrivate::updateSize() QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest); } - -#ifdef Q_OS_WINCE -/*! - \internal - Hides special buttons which are rather shown in the title bar - on WinCE, to conserve screen space. -*/ - -void QMessageBoxPrivate::hideSpecial() -{ - Q_Q(QMessageBox); - QList<QPushButton*> list = q->findChildren<QPushButton*>(); - for (int i=0; i<list.size(); ++i) { - QPushButton *pb = list.at(i); - QString text = pb->text(); - text.remove(QChar::fromLatin1('&')); - if (text == QApplication::translate("QMessageBox", "OK" )) - pb->setFixedSize(0,0); - } -} -#endif - static int oldButton(int button) { switch (button & QMessageBox::ButtonMask) { @@ -1368,24 +1334,6 @@ bool QMessageBox::event(QEvent *e) case QEvent::LanguageChange: d_func()->retranslateStrings(); break; -#ifdef Q_OS_WINCE - case QEvent::OkRequest: - case QEvent::HelpRequest: { - QString bName = - (e->type() == QEvent::OkRequest) - ? QApplication::translate("QMessageBox", "OK") - : QApplication::translate("QMessageBox", "Help"); - QList<QPushButton*> list = findChildren<QPushButton*>(); - for (int i=0; i<list.size(); ++i) { - QPushButton *pb = list.at(i); - if (pb->text() == bName) { - if (pb->isEnabled()) - pb->click(); - return pb->isEnabled(); - } - } - } -#endif default: break; } @@ -1525,20 +1473,6 @@ void QMessageBox::keyPressEvent(QKeyEvent *e) QDialog::keyPressEvent(e); } -#ifdef Q_OS_WINCE -/*! - \reimp -*/ -void QMessageBox::setVisible(bool visible) -{ - Q_D(QMessageBox); - if (visible) - d->hideSpecial(); - QDialog::setVisible(visible); -} -#endif - - /*! \overload @@ -1596,9 +1530,6 @@ void QMessageBox::showEvent(QShowEvent *e) Q_D(QMessageBox); if (d->autoAddOkButton) { addButton(Ok); -#if defined(Q_OS_WINCE) - d->hideSpecial(); -#endif } if (d->detailsButton) addButton(d->detailsButton, QMessageBox::ActionRole); @@ -1915,9 +1846,6 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) QPixmap pm(QLatin1String(":/qt-project.org/qmessagebox/images/qtlogo-64.png")); if (!pm.isNull()) msgBox->setIconPixmap(pm); -#if defined(Q_OS_WINCE) - msgBox->setDefaultButton(msgBox->addButton(QMessageBox::Ok)); -#endif // should perhaps be a style hint #ifdef Q_OS_MAC |