From 0df026de86a885a7b0acb9138edab14db31d63f7 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sun, 2 Dec 2012 17:24:19 +0100 Subject: Stop using the name "Trolltech" in QSettings Also change Trolltech for QtProject in other places Task-number: QTBUG-23269 Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491 Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll --- src/widgets/dialogs/qfiledialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets/dialogs') 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)); -- cgit v1.2.3 From babc6ec1433d3ccab956a1aff4d1feb50f7de9e2 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Fri, 30 Nov 2012 15:09:56 +0100 Subject: Compile with QT_NO_COLORDIALOG. Change-Id: I37e3fed497f3595942662efb22114de57ea4c9db Reviewed-by: Marc Mutz --- src/widgets/dialogs/qdialog.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/widgets/dialogs') 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(dialog)) return QPlatformTheme::FileDialog; #endif +#ifndef QT_NO_COLORDIALOG if (qobject_cast(dialog)) return QPlatformTheme::ColorDialog; +#endif #ifndef QT_NO_FONTDIALOG if (qobject_cast(dialog)) return QPlatformTheme::FontDialog; -- cgit v1.2.3 From f59163e79b009a4e84d85ee74846450b9990e7ce Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 21 Dec 2012 12:51:37 +0100 Subject: Mac: Bring back proper layout in QMessageBox Resolved by s/Q_WS_MAC/Q_OS_MAC where appropriate. Task-number: QTBUG-28738 Change-Id: I8f1239839bffb092387d527af78e9dbe1628ef67 Reviewed-by: Jens Bache-Wiig --- src/widgets/dialogs/qmessagebox.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index e2e15870db..751fe289bc 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 @@ -1304,7 +1304,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); @@ -1324,12 +1324,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(); @@ -1663,7 +1663,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 oldMsgBox; if (oldMsgBox && oldMsgBox->text() == text) { @@ -1675,7 +1675,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 ); @@ -1685,7 +1685,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 @@ -1716,7 +1716,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 oldMsgBox; if (oldMsgBox) { @@ -1778,7 +1778,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 @@ -2443,7 +2443,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(); @@ -2457,7 +2457,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); @@ -2487,7 +2487,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); -- cgit v1.2.3 From fbfe420aeb03f497edc86b38a00b4c5cdc62cd4c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Dec 2012 22:07:13 -0800 Subject: Fix warnings reported by Clang in QtWidget qwizard.cpp:919:24: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((info.wizStyle == QWizard::AeroStyle) ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ Change-Id: I477cc4e331633682b79df3cb0113558e9019280c Reviewed-by: Andreas Aardal Hanssen Reviewed-by: Olivier Goffart --- src/widgets/dialogs/qwizard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/dialogs') 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 -- cgit v1.2.3