diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-03 14:20:01 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-04 11:12:05 +0100 |
commit | ca2f44680cb97e7a7c46ee0ab26654822fe65e2d (patch) | |
tree | b9d85ad8ec1b18a6aa56b7657812cf3791bdf72e /src/widgets/dialogs | |
parent | 28a21d98ef8d880a6dd86ee19dd803424bb5eae1 (diff) | |
parent | 83188c6499ccdc87c0a2c468bb497e287f5db369 (diff) |
Merge branch 'stable' into dev
Conflicts:
examples/widgets/painting/shared/shared.pri
src/corelib/tools/qharfbuzz_p.h
src/corelib/tools/qunicodetools.cpp
src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
src/plugins/platforms/windows/qwindowsfontdatabase.cpp
Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qdialog.cpp | 2 | ||||
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 30 | ||||
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 2 |
4 files changed, 20 insertions, 18 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 7b47f4e135..290f0a7f65 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -67,8 +67,10 @@ static inline int themeDialogType(const QDialog *dialog) if (qobject_cast<const QFileDialog *>(dialog)) return QPlatformTheme::FileDialog; #endif +#ifndef QT_NO_COLORDIALOG if (qobject_cast<const QColorDialog *>(dialog)) return QPlatformTheme::ColorDialog; +#endif #ifndef QT_NO_FONTDIALOG if (qobject_cast<const QFontDialog *>(dialog)) return QPlatformTheme::FontDialog; diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index fc8b62d75e..88652271af 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -363,7 +363,7 @@ QFileDialog::QFileDialog(const QFileDialogArgs &args) QFileDialog::~QFileDialog() { #ifndef QT_NO_SETTINGS - QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); + QSettings settings(QSettings::UserScope, QLatin1String("QtProject")); settings.beginGroup(QLatin1String("Qt")); settings.setValue(QLatin1String("filedialog"), saveState()); #endif @@ -2229,7 +2229,7 @@ void QFileDialogPrivate::init(const QString &directory, const QString &nameFilte q->setFileMode(QFileDialog::AnyFile); #ifndef QT_NO_SETTINGS - QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); + QSettings settings(QSettings::UserScope, QLatin1String("QtProject")); settings.beginGroup(QLatin1String("Qt")); if (!directory.isEmpty()) setLastVisitedDirectory(workingDirectory(directory)); diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 1bab8b7785..e93850c1b7 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -240,7 +240,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text) label->setTextInteractionFlags(Qt::TextInteractionFlags(q->style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, q))); label->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); label->setOpenExternalLinks(true); -#if defined(Q_WS_MAC) +#if defined(Q_OS_MAC) label->setContentsMargins(16, 0, 0, 0); #else label->setContentsMargins(2, 0, 0, 0); @@ -258,7 +258,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text) q, SLOT(_q_buttonClicked(QAbstractButton*))); QGridLayout *grid = new QGridLayout; -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop); grid->addWidget(label, 0, 1, 1, 1); // -- leave space for information label -- @@ -285,7 +285,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text) } q->setModal(true); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QFont f = q->font(); f.setBold(true); label->setFont(f); @@ -316,7 +316,7 @@ void QMessageBoxPrivate::updateSize() if (screenSize.width() <= 1024) hardLimit = screenSize.width(); #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC int softLimit = qMin(screenSize.width()/2, 420); #else // note: ideally on windows, hard and soft limits but it breaks compat @@ -1328,7 +1328,7 @@ void QMessageBox::changeEvent(QEvent *ev) } case QEvent::FontChange: case QEvent::ApplicationFontChange: -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC { QFont f = font(); f.setBold(true); @@ -1348,12 +1348,12 @@ void QMessageBox::keyPressEvent(QKeyEvent *e) { Q_D(QMessageBox); if (e->key() == Qt::Key_Escape -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC || (e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period) #endif ) { if (d->detectedEscapeButton) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC d->detectedEscapeButton->animateClick(); #else d->detectedEscapeButton->click(); @@ -1687,7 +1687,7 @@ QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString */ void QMessageBox::about(QWidget *parent, const QString &title, const QString &text) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC static QPointer<QMessageBox> oldMsgBox; if (oldMsgBox && oldMsgBox->text() == text) { @@ -1699,7 +1699,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te #endif QMessageBox *msgBox = new QMessageBox(title, text, Information, 0, 0, 0, parent -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC , Qt::WindowTitleHint | Qt::WindowSystemMenuHint #endif ); @@ -1709,7 +1709,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te msgBox->setIconPixmap(icon.pixmap(size)); // should perhaps be a style hint -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC oldMsgBox = msgBox; #if 0 // ### doesn't work until close button is enabled in title bar @@ -1740,7 +1740,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te */ void QMessageBox::aboutQt(QWidget *parent, const QString &title) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC static QPointer<QMessageBox> oldMsgBox; if (oldMsgBox) { @@ -1802,7 +1802,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) #endif // should perhaps be a style hint -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC oldMsgBox = msgBox; #if 0 // ### doesn't work until close button is enabled in title bar @@ -2467,7 +2467,7 @@ void QMessageBox::setInformativeText(const QString &text) layout()->removeWidget(d->informativeLabel); delete d->informativeLabel; d->informativeLabel = 0; -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC d->label->setContentsMargins(2, 0, 0, 0); #endif d->updateSize(); @@ -2481,7 +2481,7 @@ void QMessageBox::setInformativeText(const QString &text) label->setAlignment(Qt::AlignTop | Qt::AlignLeft); label->setOpenExternalLinks(true); label->setWordWrap(true); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC d->label->setContentsMargins(2, 0, 0, 0); label->setContentsMargins(2, 0, 0, 6); label->setIndent(9); @@ -2511,7 +2511,7 @@ void QMessageBox::setInformativeText(const QString &text) void QMessageBox::setWindowTitle(const QString &title) { // Message boxes on the mac do not have a title -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QDialog::setWindowTitle(title); #else Q_UNUSED(title); diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 44518ec7d5..241e9f678a 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -916,7 +916,7 @@ QWizardLayoutInfo QWizardPrivate::layoutInfoForCurrentPage() info.buttonSpacing = 12; info.wizStyle = wizStyle; - if ((info.wizStyle == QWizard::AeroStyle) + if (info.wizStyle == QWizard::AeroStyle #if !defined(QT_NO_STYLE_WINDOWSVISTA) && (QVistaHelper::vistaState() == QVistaHelper::Classic || vistaDisabled()) #endif |