From d32f47b70387713335656a8e93f289c819fb9b05 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Jun 2015 17:04:53 +0200 Subject: fix usage of wince scope Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann --- src/widgets/dialogs/dialogs.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri index 53d1985fb5..a5b4883db8 100644 --- a/src/widgets/dialogs/dialogs.pri +++ b/src/widgets/dialogs/dialogs.pri @@ -25,7 +25,7 @@ win32 { SOURCES += dialogs/qwizard_win.cpp } -wince*: FORMS += dialogs/qfiledialog_embedded.ui +wince: FORMS += dialogs/qfiledialog_embedded.ui else: FORMS += dialogs/qfiledialog.ui INCLUDEPATH += $$PWD -- cgit v1.2.3 From 6468cf4e79cca74fa3704c1a1c03fc5da3778416 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Tue, 10 Feb 2015 17:43:03 +0300 Subject: Fix centering dialogs QDialog::setVisible() tries to adjusts the dialog position, but it's not really possible if the dialog size is not defined yet. Besides, if the dialog window is not created, QWidget::move() will not really move it and will set WA_PendingMoveEvent flag. And QWidget::setVisible() also will not change the position, because we reset WA_Moved flag. Thus it may break adjusting the position in QDialog::showEvent(). So adjust the position only in QDialog::showEvent(). Task-number: QTBUG-36185 Task-number: QTBUG-39259 Task-number: QTBUG-41844 Change-Id: I015a19f2e533f68178f4ee7519b17f5e9b5def7b Reviewed-by: Timur Pocheptsov --- src/widgets/dialogs/qdialog.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 6676a3ccba..68a419afc9 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -720,13 +720,6 @@ void QDialog::setVisible(bool visible) if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden)) return; - if (!testAttribute(Qt::WA_Moved)) { - Qt::WindowStates state = windowState(); - adjustPosition(parentWidget()); - setAttribute(Qt::WA_Moved, false); // not really an explicit position - if (state != windowState()) - setWindowState(state); - } QWidget::setVisible(visible); showExtension(d->doShowExtension); QWidget *fw = window()->focusWidget(); -- cgit v1.2.3 From aec2b28eea3354ec80350e25f4305c74ca9bc184 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 16 Jun 2015 15:09:09 +0200 Subject: OSX: show file dialog in showCocoaFilePanel, don't wait for exec() This reverts commit 21e6c7ae4745a76b676dfaa9fe17a2dd40fc0c5c because in QtQuick.Controls, we do not call exec(): we just set the dialog visible. If it is a sheet, then it is already acting as a modal dialog, basically. Task-number: QTBUG-46691 Change-Id: I7fe89f2a2ade0d4ddcf540c9bfc4f5963a077471 Reviewed-by: Timur Pocheptsov --- src/widgets/dialogs/qdialog.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 6676a3ccba..65def6d4b8 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -534,10 +534,7 @@ int QDialog::exec() QPointer guard = this; if (d->nativeDialogInUse) { - if (windowModality() == Qt::WindowModal) - d->platformHelper()->execModalForWindow(d->parentWindow()); - else - d->platformHelper()->exec(); + d->platformHelper()->exec(); } else { QEventLoop eventLoop; d->eventLoop = &eventLoop; -- cgit v1.2.3 From a7f2af09114cfa0996794c85bc48a601f665772d Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 28 May 2015 12:45:48 +0200 Subject: Replace MAC OS X with OS X Task-number: QTBUG-46374 Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138 Reviewed-by: Martin Smith --- src/widgets/dialogs/qfiledialog.cpp | 10 +++++----- src/widgets/dialogs/qmessagebox.cpp | 18 +++++++++--------- src/widgets/dialogs/qwizard.cpp | 22 +++++++++++----------- 3 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index a9d5574428..d2666026bb 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -2039,7 +2039,7 @@ QString QFileDialog::labelText(DialogLabel label) const The dialog's caption is set to \a caption. If \a caption is not specified then a default caption will be used. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not @@ -2151,7 +2151,7 @@ QUrl QFileDialog::getOpenFileUrl(QWidget *parent, The dialog's caption is set to \a caption. If \a caption is not specified then a default caption will be used. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not @@ -2279,12 +2279,12 @@ QList QFileDialog::getOpenFileUrls(QWidget *parent, The dialog's caption is set to \a caption. If \a caption is not specified, a default caption will be used. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if \a parent is not 0 then it will position the - dialog just below the parent's title bar. On Mac OS X, with its native file + dialog just below the parent's title bar. On OS X, with its native file dialog, the filter argument is ignored. On Unix/X11, the normal behavior of the file dialog is to resolve and @@ -2388,7 +2388,7 @@ QUrl QFileDialog::getSaveFileUrl(QWidget *parent, pass. To ensure a native file dialog, \l{QFileDialog::}{ShowDirsOnly} must be set. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows CE, if the device has no native file dialog, a QFileDialog will be used. diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 571b01802d..ef9b55acd6 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -580,7 +580,7 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button This is the approach recommended in the \l{http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-BABCAJID} - {Mac OS X Guidelines}. Similar guidelines apply for the other + {OS X Guidelines}. Similar guidelines apply for the other platforms, but note the different ways the \l{QMessageBox::informativeText} {informative text} is handled for different platforms. @@ -795,7 +795,7 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button Constructs a message box with no text and no buttons. \a parent is passed to the QDialog constructor. - On Mac OS X, if you want your message box to appear + On OS X, if you want your message box to appear as a Qt::Sheet of its \a parent, set the message box's \l{setWindowModality()} {window modality} to Qt::WindowModal or use open(). Otherwise, the message box will be a standard dialog. @@ -817,7 +817,7 @@ QMessageBox::QMessageBox(QWidget *parent) The message box is an \l{Qt::ApplicationModal} {application modal} dialog box. - On Mac OS X, if \a parent is not 0 and you want your message box + On OS X, if \a parent is not 0 and you want your message box to appear as a Qt::Sheet of that parent, set the message box's \l{setWindowModality()} {window modality} to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog. @@ -985,7 +985,7 @@ QAbstractButton *QMessageBox::button(StandardButton which) const \list 1 \li If there is only one button, it is made the escape button. \li If there is a \l Cancel button, it is made the escape button. - \li On Mac OS X only, if there is exactly one button with the role + \li On OS X only, if there is exactly one button with the role QMessageBox::RejectRole, it is made the escape button. \endlist @@ -1803,7 +1803,7 @@ QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString \li As a last resort it uses the Information icon. \endlist - The about box has a single button labelled "OK". On Mac OS X, the + The about box has a single button labelled "OK". On OS X, the about box is popped up as a modeless window; on other platforms, it is currently application modal. @@ -1857,7 +1857,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te QApplication provides this functionality as a slot. - On Mac OS X, the about box is popped up as a modeless window; on + On OS X, the about box is popped up as a modeless window; on other platforms, it is currently application modal. \sa QApplication::aboutQt() @@ -2622,8 +2622,8 @@ void QMessageBox::setInformativeText(const QString &text) This function shadows QWidget::setWindowTitle(). - Sets the title of the message box to \a title. On Mac OS X, - the window title is ignored (as required by the Mac OS X + Sets the title of the message box to \a title. On OS X, + the window title is ignored (as required by the OS X Guidelines). */ void QMessageBox::setWindowTitle(const QString &title) @@ -2644,7 +2644,7 @@ void QMessageBox::setWindowTitle(const QString &title) Sets the modality of the message box to \a windowModality. - On Mac OS X, if the modality is set to Qt::WindowModal and the message box + On OS X, if the modality is set to Qt::WindowModal and the message box has a parent, then the message box will be a Qt::Sheet, otherwise the message box will be a standard dialog. */ diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index bf3e44b6a6..139fbc3843 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -876,7 +876,7 @@ void QWizardPrivate::switchToPage(int newId, Direction direction) /* If there is no default button and the Next or Finish button is enabled, give focus directly to it as a convenience to the - user. This is the normal case on Mac OS X. + user. This is the normal case on OS X. Otherwise, give the focus to the new page's first child that can handle it. If there is no such child, give the focus to @@ -1815,7 +1815,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) \inmodule QtWidgets - A wizard (also called an assistant on Mac OS X) is a special type + A wizard (also called an assistant on OS X) is a special type of input dialog that consists of a sequence of pages. A wizard's purpose is to guide the user through a process step by step. Wizards are useful for complex or infrequent tasks that users may @@ -2113,10 +2113,10 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) This enum specifies the buttons in a wizard. - \value BackButton The \uicontrol Back button (\uicontrol {Go Back} on Mac OS X) - \value NextButton The \uicontrol Next button (\uicontrol Continue on Mac OS X) + \value BackButton The \uicontrol Back button (\uicontrol {Go Back} on OS X) + \value NextButton The \uicontrol Next button (\uicontrol Continue on OS X) \value CommitButton The \uicontrol Commit button - \value FinishButton The \uicontrol Finish button (\uicontrol Done on Mac OS X) + \value FinishButton The \uicontrol Finish button (\uicontrol Done on OS X) \value CancelButton The \uicontrol Cancel button (see also NoCancelButton) \value HelpButton The \uicontrol Help button (see also HaveHelpButton) \value CustomButton1 The first user-defined button (see also HaveCustomButton1) @@ -2156,7 +2156,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) \value ClassicStyle Classic Windows look \value ModernStyle Modern Windows look - \value MacStyle Mac OS X look + \value MacStyle OS X look \value AeroStyle Windows Aero look \omitvalue NStyles @@ -2629,7 +2629,7 @@ bool QWizard::testOption(WizardOption option) const \list \li Windows: HelpButtonOnRight. - \li Mac OS X: NoDefaultButton and NoCancelButton. + \li OS X: NoDefaultButton and NoCancelButton. \li X11 and QWS (Qt for Embedded Linux): none. \endlist @@ -2673,7 +2673,7 @@ QWizard::WizardOptions QWizard::options() const Sets the text on button \a which to be \a text. By default, the text on buttons depends on the wizardStyle. For - example, on Mac OS X, the \uicontrol Next button is called \uicontrol + example, on OS X, the \uicontrol Next button is called \uicontrol Continue. To add extra buttons to the wizard (e.g., a \uicontrol Print button), @@ -2705,7 +2705,7 @@ void QWizard::setButtonText(WizardButton which, const QString &text) If a text has ben set using setButtonText(), this text is returned. By default, the text on buttons depends on the wizardStyle. For - example, on Mac OS X, the \uicontrol Next button is called \uicontrol + example, on OS X, the \uicontrol Next button is called \uicontrol Continue. \sa button(), setButton(), setButtonText(), QWizardPage::buttonText(), @@ -2891,7 +2891,7 @@ void QWizard::setPixmap(WizardPixmap which, const QPixmap &pixmap) Returns the pixmap set for role \a which. By default, the only pixmap that is set is the BackgroundPixmap on - Mac OS X. + OS X. \sa QWizardPage::pixmap(), {Elements of a Wizard Page} */ @@ -3803,7 +3803,7 @@ void QWizardPage::setButtonText(QWizard::WizardButton which, const QString &text this text is returned. By default, the text on buttons depends on the QWizard::wizardStyle. - For example, on Mac OS X, the \uicontrol Next button is called \uicontrol + For example, on OS X, the \uicontrol Next button is called \uicontrol Continue. \sa setButtonText(), QWizard::buttonText(), QWizard::setButtonText() -- cgit v1.2.3