diff options
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qdialog.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dialogs/qerrormessage.cpp | 16 | ||||
-rw-r--r-- | src/widgets/dialogs/qprogressdialog.cpp | 22 | ||||
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 56 |
4 files changed, 3 insertions, 95 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 261039009c..d2c3b2ad0e 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -517,10 +517,8 @@ int QDialog::exec() setResult(0); bool showSystemDialogFullScreen = false; - if (showSystemDialogFullScreen) { - setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint); + if (showSystemDialogFullScreen) setWindowState(Qt::WindowFullScreen); - } show(); QPointer<QDialog> guard = this; diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp index a7c257b300..fa240ccaf3 100644 --- a/src/widgets/dialogs/qerrormessage.cpp +++ b/src/widgets/dialogs/qerrormessage.cpp @@ -66,10 +66,6 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp #endif -#if defined(QT_SOFTKEYS_ENABLED) -#include <qaction.h> -#endif - QT_BEGIN_NAMESPACE class QErrorMessagePrivate : public QDialogPrivate @@ -80,9 +76,6 @@ public: QCheckBox * again; QTextEdit * errors; QLabel * icon; -#ifdef QT_SOFTKEYS_ENABLED - QAction *okAction; -#endif QQueue<QPair<QString, QString> > pending; QSet<QString> doNotShow; QSet<QString> doNotShowType; @@ -245,12 +238,6 @@ QErrorMessage::QErrorMessage(QWidget * parent) d->again->setChecked(true); grid->addWidget(d->again, 1, 1, Qt::AlignTop); d->ok = new QPushButton(this); -#ifdef QT_SOFTKEYS_ENABLED - d->okAction = new QAction(d->ok); - d->okAction->setSoftKeyRole(QAction::PositiveSoftKey); - connect(d->okAction, SIGNAL(triggered()), this, SLOT(accept())); - addAction(d->okAction); -#endif #if defined(Q_OS_WINCE) @@ -402,9 +389,6 @@ void QErrorMessagePrivate::retranslateStrings() { again->setText(QErrorMessage::tr("&Show this message again")); ok->setText(QErrorMessage::tr("&OK")); -#ifdef QT_SOFTKEYS_ENABLED - okAction->setText(ok->text()); -#endif } QT_END_NAMESPACE diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp index fe7aeae558..fbbc4191bc 100644 --- a/src/widgets/dialogs/qprogressdialog.cpp +++ b/src/widgets/dialogs/qprogressdialog.cpp @@ -57,10 +57,6 @@ #include <private/qdialog_p.h> #include <limits.h> -#if defined(QT_SOFTKEYS_ENABLED) -#include <qaction.h> -#endif - QT_BEGIN_NAMESPACE // If the operation is expected to take this long (as predicted by @@ -81,9 +77,6 @@ public: #ifndef QT_NO_SHORTCUT escapeShortcut(0), #endif -#ifdef QT_SOFTKEYS_ENABLED - cancelAction(0), -#endif useDefaultCancelText(false) { } @@ -110,9 +103,6 @@ public: #ifndef QT_NO_SHORTCUT QShortcut *escapeShortcut; #endif -#ifdef QT_SOFTKEYS_ENABLED - QAction *cancelAction; -#endif bool useDefaultCancelText; QPointer<QObject> receiverToDisconnectOnClose; QByteArray memberToDisconnectOnClose; @@ -443,16 +433,7 @@ void QProgressDialog::setCancelButton(QPushButton *cancelButton) int h = qMax(isVisible() ? height() : 0, sizeHint().height()); resize(w, h); if (cancelButton) -#if !defined(QT_SOFTKEYS_ENABLED) cancelButton->show(); -#else - { - d->cancelAction = new QAction(cancelButton->text(), cancelButton); - d->cancelAction->setSoftKeyRole(QAction::NegativeSoftKey); - connect(d->cancelAction, SIGNAL(triggered()), this, SIGNAL(canceled())); - addAction(d->cancelAction); - } -#endif } /*! @@ -471,9 +452,6 @@ void QProgressDialog::setCancelButtonText(const QString &cancelButtonText) if (!cancelButtonText.isNull()) { if (d->cancel) { d->cancel->setText(cancelButtonText); -#ifdef QT_SOFTKEYS_ENABLED - d->cancelAction->setText(cancelButtonText); -#endif } else { setCancelButton(new QPushButton(cancelButtonText, this)); } diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 58aa474368..7f1cb09225 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -75,10 +75,6 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp #include <string.h> // for memset() -#ifdef QT_SOFTKEYS_ENABLED -#include "qaction.h" -#endif - QT_BEGIN_NAMESPACE // These fudge terms were needed a few places to obtain pixel-perfect results @@ -565,12 +561,9 @@ public: , maximumWidth(QWIDGETSIZE_MAX) , maximumHeight(QWIDGETSIZE_MAX) { - for (int i = 0; i < QWizard::NButtons; ++i) { + for (int i = 0; i < QWizard::NButtons; ++i) btns[i] = 0; -#ifdef QT_SOFTKEYS_ENABLED - softKeys[i] = 0; -#endif - } + #if !defined(QT_NO_STYLE_WINDOWSVISTA) if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) @@ -657,9 +650,6 @@ public: QLabel *titleLabel; QLabel *subTitleLabel; QWizardRuler *bottomRuler; -#ifdef QT_SOFTKEYS_ENABLED - mutable QAction *softKeys[QWizard::NButtons]; -#endif QVBoxLayout *pageVBoxLayout; QHBoxLayout *buttonLayout; @@ -1387,28 +1377,6 @@ bool QWizardPrivate::ensureButton(QWizard::WizardButton which) const if (which < QWizard::NStandardButtons) pushButton->setText(buttonDefaultText(wizStyle, which, this)); -#ifdef QT_SOFTKEYS_ENABLED - QAction *softKey = new QAction(pushButton->text(), pushButton); - QAction::SoftKeyRole softKeyRole; - switch(which) { - case QWizard::NextButton: - case QWizard::FinishButton: - case QWizard::CancelButton: - softKeyRole = QAction::NegativeSoftKey; - break; - case QWizard::BackButton: - case QWizard::CommitButton: - case QWizard::HelpButton: - case QWizard::CustomButton1: - case QWizard::CustomButton2: - case QWizard::CustomButton3: - default: - softKeyRole = QAction::PositiveSoftKey; - break; - } - softKey->setSoftKeyRole(softKeyRole); - softKeys[which] = softKey; -#endif connectButton(which); } return true; @@ -1422,10 +1390,6 @@ void QWizardPrivate::connectButton(QWizard::WizardButton which) const } else { QObject::connect(btns[which], SIGNAL(clicked()), q, SLOT(_q_emitCustomButtonClicked())); } - -#ifdef QT_SOFTKEYS_ENABLED - QObject::connect(softKeys[which], SIGNAL(triggered()), btns[which], SIGNAL(clicked())); -#endif } void QWizardPrivate::updateButtonTexts() @@ -1439,9 +1403,6 @@ void QWizardPrivate::updateButtonTexts() btns[i]->setText(buttonCustomTexts.value(i)); else if (i < QWizard::NStandardButtons) btns[i]->setText(buttonDefaultText(wizStyle, i, this)); -#ifdef QT_SOFTKEYS_ENABLED - softKeys[i]->setText(btns[i]->text()); -#endif } } } @@ -1686,19 +1647,6 @@ void QWizardPrivate::_q_updateButtonStates() } #endif -#ifdef QT_SOFTKEYS_ENABLED - QAbstractButton *wizardButton; - for (int i = 0; i < QWizard::NButtons; ++i) { - wizardButton = btns[i]; - if (wizardButton && !wizardButton->testAttribute(Qt::WA_WState_Hidden)) { - wizardButton->hide(); - q->addAction(softKeys[i]); - } else { - q->removeAction(softKeys[i]); - } - } -#endif - enableUpdates(); } |