diff options
Diffstat (limited to 'src/widgets/dialogs')
38 files changed, 198 insertions, 495 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 777e4cc4ba..e592f14704 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -64,10 +64,6 @@ #include "qspinbox.h" #include "qdialogbuttonbox.h" -#ifdef MAEMO_UI -# define QT_SMALL_COLORDIALOG -#endif - QT_BEGIN_NAMESPACE //////////// QWellArray BEGIN @@ -1064,14 +1060,6 @@ QColorShower::QColorShower(QColorDialog *parent) gl->setMargin(gl->spacing()); lab = new QColorShowLabel(this); -#ifdef QT_SMALL_COLORDIALOG -# ifdef Q_WS_S60 - const bool nonTouchUI = !S60->hasTouchscreen; -# elif defined Q_WS_MAEMO_5 - const bool nonTouchUI = false; -# endif -#endif - #ifndef Q_WS_WINCE #ifdef QT_SMALL_COLORDIALOG lab->setMinimumHeight(60); @@ -1081,7 +1069,6 @@ QColorShower::QColorShower(QColorDialog *parent) lab->setMinimumWidth(20); #endif -// In S60, due to small screen and different screen layouts need to re-arrange the widgets. // For QVGA screens only the comboboxes and color label are visible. // For nHD screens only color and luminence pickers and color label are visible. #if !defined(QT_SMALL_COLORDIALOG) @@ -1480,14 +1467,6 @@ void QColorDialogPrivate::init(const QColor &initial) topLay->addLayout(leftLay); } -#if defined(QT_SMALL_COLORDIALOG) -# if defined(Q_WS_S60) - const bool nonTouchUI = !S60->hasTouchscreen; -# elif defined(Q_WS_MAEMO_5) - const bool nonTouchUI = false; -# endif -#endif - if (!smallDisplay) { standard = new QColorWell(q, 6, 8, QColorDialogOptions::standardColors()); lblBasicColors = new QLabel(q); diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index 1bdb0b41a2..cfb54a7eb9 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -48,7 +48,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_COLORDIALOG diff --git a/src/widgets/dialogs/qcolordialog_mac.mm b/src/widgets/dialogs/qcolordialog_mac.mm index bdf5e1cccd..1496ba8300 100644 --- a/src/widgets/dialogs/qcolordialog_mac.mm +++ b/src/widgets/dialogs/qcolordialog_mac.mm @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qcolordialog_p.h b/src/widgets/dialogs/qcolordialog_p.h index a6149017d7..12634e4532 100644 --- a/src/widgets/dialogs/qcolordialog_p.h +++ b/src/widgets/dialogs/qcolordialog_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index af11fc971d..f462a362ca 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,12 +34,14 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "qdialog.h" - +#include "qcolordialog.h" +#include "qfontdialog.h" +#include "qfiledialog.h" #include "qevent.h" #include "qdesktopwidget.h" @@ -59,22 +60,36 @@ QT_BEGIN_NAMESPACE +static inline int themeDialogType(const QDialog *dialog) +{ + if (qobject_cast<const QFileDialog *>(dialog)) + return QPlatformTheme::FileDialog; + if (qobject_cast<const QColorDialog *>(dialog)) + return QPlatformTheme::ColorDialog; + if (qobject_cast<const QFontDialog *>(dialog)) + return QPlatformTheme::FontDialog; + return -1; +} + QPlatformDialogHelper *QDialogPrivate::platformHelper() const { // Delayed creation of the platform, ensuring that // that qobject_cast<> on the dialog works in the plugin. if (!m_platformHelperCreated) { - QDialogPrivate *ncThis = const_cast<QDialogPrivate *>(this); m_platformHelperCreated = true; + QDialogPrivate *ncThis = const_cast<QDialogPrivate *>(this); QDialog *dialog = ncThis->q_func(); - m_platformHelper = QGuiApplicationPrivate::platformTheme() - ->createPlatformDialogHelper(dialog); - if (m_platformHelper) { - QObject::connect(m_platformHelper, SIGNAL(accept()), dialog, SLOT(accept())); - QObject::connect(m_platformHelper, SIGNAL(reject()), dialog, SLOT(reject())); - QObject::connect(m_platformHelper, SIGNAL(launchNativeAppModalPanel()), - dialog, SLOT(_q_platformRunNativeAppModalPanel())); - ncThis->initHelper(m_platformHelper); + const int type = themeDialogType(dialog); + if (type >= 0) { + m_platformHelper = QGuiApplicationPrivate::platformTheme() + ->createPlatformDialogHelper(static_cast<QPlatformTheme::DialogType>(type)); + if (m_platformHelper) { + QObject::connect(m_platformHelper, SIGNAL(accept()), dialog, SLOT(accept())); + QObject::connect(m_platformHelper, SIGNAL(reject()), dialog, SLOT(reject())); + QObject::connect(m_platformHelper, SIGNAL(launchNativeAppModalPanel()), + dialog, SLOT(_q_platformRunNativeAppModalPanel())); + ncThis->initHelper(m_platformHelper); + } } } return m_platformHelper; @@ -733,7 +748,7 @@ void QDialog::setVisible(bool visible) } #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(this, 0, QAccessible::DialogStart); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DialogStart, this, 0)); #endif } else { @@ -742,7 +757,7 @@ void QDialog::setVisible(bool visible) #ifndef QT_NO_ACCESSIBILITY if (isVisible()) - QAccessible::updateAccessibility(this, 0, QAccessible::DialogEnd); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DialogEnd, this, 0)); #endif // Reimplemented to exit a modal event loop when the dialog is hidden. diff --git a/src/widgets/dialogs/qdialog.h b/src/widgets/dialogs/qdialog.h index 8329e6460a..40bfbb63ee 100644 --- a/src/widgets/dialogs/qdialog.h +++ b/src/widgets/dialogs/qdialog.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -48,7 +48,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) class QPushButton; class QDialogPrivate; diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h index ecdfff03fd..ca99600489 100644 --- a/src/widgets/dialogs/qdialog_p.h +++ b/src/widgets/dialogs/qdialog_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -58,7 +58,7 @@ #include "QtCore/qpointer.h" #include "QtWidgets/qdialog.h" #include "QtWidgets/qpushbutton.h" -#include "QtWidgets/qplatformdialoghelper_qpa.h" +#include <QtGui/QPlatformDialogHelper> QT_BEGIN_NAMESPACE diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp index 1c950a7158..4993a6d80f 100644 --- a/src/widgets/dialogs/qerrormessage.cpp +++ b/src/widgets/dialogs/qerrormessage.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -71,9 +71,6 @@ extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp #if defined(QT_SOFTKEYS_ENABLED) #include <qaction.h> #endif -#ifdef Q_WS_S60 -#include "private/qt_s60_p.h" -#endif QT_BEGIN_NAMESPACE @@ -134,14 +131,7 @@ QSize QErrorMessageTextView::sizeHint() const else return QSize(300, 100); #else - -#ifdef Q_WS_S60 - const int smallerDimension = qMin(S60->screenHeightInPixels, S60->screenWidthInPixels); - // In S60 layout data, error messages seem to be one third of the screen height (in portrait) minus two. - return QSize(smallerDimension, smallerDimension/3-2); -#else return QSize(250, 75); -#endif //Q_WS_S60 #endif //Q_WS_WINCE } @@ -265,7 +255,7 @@ QErrorMessage::QErrorMessage(QWidget * parent) #endif -#if defined(Q_WS_WINCE) || defined(Q_WS_S60) +#if defined(Q_WS_WINCE) d->ok->setFixedSize(0,0); #endif connect(d->ok, SIGNAL(clicked()), this, SLOT(accept())); diff --git a/src/widgets/dialogs/qerrormessage.h b/src/widgets/dialogs/qerrormessage.h index c43df749f7..085fa8eb6b 100644 --- a/src/widgets/dialogs/qerrormessage.h +++ b/src/widgets/dialogs/qerrormessage.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -48,7 +48,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_ERRORMESSAGE diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 2f49a226e9..db13cfea0f 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -67,11 +67,12 @@ #if defined(Q_OS_WINCE) extern bool qt_priv_ptr_valid; #endif +#endif #if defined(Q_OS_UNIX) #include <pwd.h> +#elif defined(Q_OS_WIN) +# include <QtCore/qt_windows.h> #endif -#endif -#include "qplatformdialoghelper_qpa.h" QT_BEGIN_NAMESPACE @@ -1097,15 +1098,6 @@ void QFileDialog::setNameFilter(const QString &filter) setNameFilters(qt_make_filter_list(filter)); } -/*! - \obsolete - - Use setNameFilter() instead. -*/ -void QFileDialog::setFilter(const QString &filter) -{ - setNameFilter(filter); -} /*! \property QFileDialog::nameFilterDetailsVisible @@ -1178,16 +1170,6 @@ void QFileDialog::setNameFilters(const QStringList &filters) } /*! - \obsolete - - Use setNameFilters() instead. -*/ -void QFileDialog::setFilters(const QStringList &filters) -{ - setNameFilters(filters); -} - -/*! \since 4.4 Returns the file type filters that are in operation on this file @@ -1199,17 +1181,6 @@ QStringList QFileDialog::nameFilters() const } /*! - \obsolete - - Use nameFilters() instead. -*/ - -QStringList QFileDialog::filters() const -{ - return nameFilters(); -} - -/*! \since 4.4 Sets the current file type \a filter. Multiple filters can be @@ -1237,17 +1208,6 @@ void QFileDialog::selectNameFilter(const QString &filter) } /*! - \obsolete - - Use selectNameFilter() instead. -*/ - -void QFileDialog::selectFilter(const QString &filter) -{ - selectNameFilter(filter); -} - -/*! \since 4.4 Returns the filter that the user selected in the file dialog. @@ -1264,16 +1224,6 @@ QString QFileDialog::selectedNameFilter() const } /*! - \obsolete - - Use selectedNameFilter() instead. -*/ -QString QFileDialog::selectedFilter() const -{ - return selectedNameFilter(); -} - -/*! \since 4.4 Returns the filter that is used when displaying files. @@ -1437,6 +1387,25 @@ QLineEdit *QFileDialogPrivate::lineEdit() const { return (QLineEdit*)qFileDialogUi->fileNameEdit; } +int QFileDialogPrivate::maxNameLength(const QString &path) +{ +#if defined(Q_OS_UNIX) + return ::pathconf(QFile::encodeName(path).data(), _PC_NAME_MAX); +#elif defined(Q_OS_WINCE) + Q_UNUSED(path); + return MAX_PATH; +#elif defined(Q_OS_WIN) + DWORD maxLength; + const QString drive = path.left(3); + if (::GetVolumeInformation(reinterpret_cast<const wchar_t *>(drive.utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0) == FALSE) + return -1; + return maxLength; +#else + Q_UNUSED(path); +#endif + return -1; +} + /* Sets the view root index to be the file system model index */ @@ -1723,25 +1692,6 @@ extern QStringList qt_win_get_open_file_names(const QFileDialogArgs &args, extern QString qt_win_get_existing_directory(const QFileDialogArgs &args); #endif -/* - For Symbian file dialogs -*/ -#if defined(Q_WS_S60) -extern QString qtSymbianGetOpenFileName(const QString &caption, - const QString &dir, - const QString &filter); - -extern QStringList qtSymbianGetOpenFileNames(const QString &caption, - const QString &dir, - const QString &filter); - -extern QString qtSymbianGetSaveFileName(const QString &caption, - const QString &dir); - -extern QString qtSymbianGetExistingDirectory(const QString &caption, - const QString &dir); -#endif - /*! This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string. @@ -1770,7 +1720,7 @@ extern QString qtSymbianGetExistingDirectory(const QString &caption, The dialog's caption is set to \a caption. If \a caption is not specified then a default caption will be used. - On Windows, Mac OS X and Symbian^3, this static function will use the + On Windows, and Mac 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 @@ -1783,10 +1733,6 @@ extern QString qtSymbianGetExistingDirectory(const QString &caption, \a options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories. - On Symbian^3 the parameter \a selectedFilter has no meaning and the - \a options parameter is only used to define if the native file dialog is - used. - \warning Do not delete \a parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors. @@ -1802,10 +1748,6 @@ QString QFileDialog::getOpenFileName(QWidget *parent, { if (qt_filedialog_open_filename_hook && !(options & DontUseNativeDialog)) return qt_filedialog_open_filename_hook(parent, caption, dir, filter, selectedFilter, options); -#if defined(Q_WS_S60) - if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog)) - return qtSymbianGetOpenFileName(caption, dir, filter); -#endif QFileDialogArgs args; args.parent = parent; args.caption = caption; @@ -1826,7 +1768,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent, dialog.selectNameFilter(*selectedFilter); if (dialog.exec() == QDialog::Accepted) { if (selectedFilter) - *selectedFilter = dialog.selectedFilter(); + *selectedFilter = dialog.selectedNameFilter(); return dialog.selectedFiles().value(0); } return QString(); @@ -1856,7 +1798,7 @@ QString QFileDialog::getOpenFileName(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, Mac OS X and Symbian^3, this static function will use the + On Windows, and Mac 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 @@ -1875,10 +1817,6 @@ QString QFileDialog::getOpenFileName(QWidget *parent, \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 10 - On Symbian^3 the parameter \a selectedFilter has no meaning and the - \a options parameter is only used to define if the native file dialog is - used. On Symbian^3, this function can only return a single filename. - \warning Do not delete \a parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors. @@ -1894,10 +1832,6 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent, { if (qt_filedialog_open_filenames_hook && !(options & DontUseNativeDialog)) return qt_filedialog_open_filenames_hook(parent, caption, dir, filter, selectedFilter, options); -#if defined(Q_WS_S60) - if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog)) - return qtSymbianGetOpenFileNames(caption, dir, filter); -#endif QFileDialogArgs args; args.parent = parent; args.caption = caption; @@ -1919,7 +1853,7 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent, dialog.selectNameFilter(*selectedFilter); if (dialog.exec() == QDialog::Accepted) { if (selectedFilter) - *selectedFilter = dialog.selectedFilter(); + *selectedFilter = dialog.selectedNameFilter(); return dialog.selectedFiles(); } return QStringList(); @@ -1955,7 +1889,7 @@ QStringList QFileDialog::getOpenFileNames(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, Mac OS X and Symbian^3, this static function will use the + On Windows, and Mac 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 @@ -1969,10 +1903,6 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent, \a options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories. - On Symbian^3 the parameters \a filter and \a selectedFilter have no - meaning. The \a options parameter is only used to define if the native file - dialog is used. - \warning Do not delete \a parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors. @@ -1988,10 +1918,6 @@ QString QFileDialog::getSaveFileName(QWidget *parent, { if (qt_filedialog_save_filename_hook && !(options & DontUseNativeDialog)) return qt_filedialog_save_filename_hook(parent, caption, dir, filter, selectedFilter, options); -#if defined(Q_WS_S60) - if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog)) - return qtSymbianGetSaveFileName(caption, dir); -#endif QFileDialogArgs args; args.parent = parent; args.caption = caption; @@ -2014,7 +1940,7 @@ QString QFileDialog::getSaveFileName(QWidget *parent, dialog.selectNameFilter(*selectedFilter); if (dialog.exec() == QDialog::Accepted) { if (selectedFilter) - *selectedFilter = dialog.selectedFilter(); + *selectedFilter = dialog.selectedNameFilter(); return dialog.selectedFiles().value(0); } @@ -2040,7 +1966,7 @@ QString QFileDialog::getSaveFileName(QWidget *parent, pass. To ensure a native file dialog, \l{QFileDialog::}{ShowDirsOnly} must be set. - On Windows, Mac OS X and Symbian^3, this static function will use the + On Windows, and Mac 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. @@ -2054,9 +1980,6 @@ QString QFileDialog::getSaveFileName(QWidget *parent, dispatch any QTimers, and if \a parent is not 0 then it will position the dialog just below the parent's title bar. - On Symbian^3 the \a options parameter is only used to define if the native - file dialog is used. - \warning Do not delete \a parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors. @@ -2070,10 +1993,6 @@ QString QFileDialog::getExistingDirectory(QWidget *parent, { if (qt_filedialog_existing_directory_hook && !(options & DontUseNativeDialog)) return qt_filedialog_existing_directory_hook(parent, caption, dir, options); -#if defined(Q_WS_S60) - if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog)) - return qtSymbianGetExistingDirectory(caption, dir); -#endif QFileDialogArgs args; args.parent = parent; args.caption = caption; @@ -3437,10 +3356,7 @@ QStringList QFSCompleter::splitPath(const QString &path) const QString pathCopy = QDir::toNativeSeparators(path); QString sep = QDir::separator(); -#if defined(Q_OS_SYMBIAN) - if (pathCopy == QLatin1String("\\")) - return QStringList(pathCopy); -#elif defined(Q_OS_WIN) +#if defined(Q_OS_WIN) if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\")) return QStringList(pathCopy); QString doubleSlash(QLatin1String("\\\\")); @@ -3463,11 +3379,7 @@ QStringList QFSCompleter::splitPath(const QString &path) const QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']')); -#if defined(Q_OS_SYMBIAN) - QStringList parts = pathCopy.split(re, QString::SkipEmptyParts); - if (pathCopy.endsWith(sep)) - parts.append(QString()); -#elif defined(Q_OS_WIN) +#if defined(Q_OS_WIN) QStringList parts = pathCopy.split(re, QString::SkipEmptyParts); if (!doubleSlash.isEmpty() && !parts.isEmpty()) parts[0].prepend(doubleSlash); diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h index ac011e634a..c5298b1227 100644 --- a/src/widgets/dialogs/qfiledialog.h +++ b/src/widgets/dialogs/qfiledialog.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -50,7 +50,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_FILEDIALOG @@ -85,7 +84,6 @@ public: enum AcceptMode { AcceptOpen, AcceptSave }; enum DialogLabel { LookIn, FileName, FileType, Accept, Reject }; - // ### Rename to FileDialogOption and FileDialogOptions for Qt 5.0 enum Option { ShowDirsOnly = 0x00000001, @@ -112,13 +110,6 @@ public: void selectFile(const QString &filename); QStringList selectedFiles() const; -#ifdef QT_DEPRECATED - QT_DEPRECATED void setFilter(const QString &filter); - QT_DEPRECATED void setFilters(const QStringList &filters); - QT_DEPRECATED QStringList filters() const; - QT_DEPRECATED void selectFilter(const QString &filter); - QT_DEPRECATED QString selectedFilter() const; -#endif void setNameFilterDetailsVisible(bool enabled); bool isNameFilterDetailsVisible() const; diff --git a/src/widgets/dialogs/qfiledialog.ui b/src/widgets/dialogs/qfiledialog.ui index ff86e9cc13..76dac823ee 100644 --- a/src/widgets/dialogs/qfiledialog.ui +++ b/src/widgets/dialogs/qfiledialog.ui @@ -2,8 +2,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -36,6 +35,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/src/widgets/dialogs/qfiledialog_embedded.ui b/src/widgets/dialogs/qfiledialog_embedded.ui index 5eb9f52a12..deb19c1999 100644 --- a/src/widgets/dialogs/qfiledialog_embedded.ui +++ b/src/widgets/dialogs/qfiledialog_embedded.ui @@ -2,8 +2,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -36,6 +35,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/src/widgets/dialogs/qfiledialog_mac.mm b/src/widgets/dialogs/qfiledialog_mac.mm index fe3c41a4b7..01ec736550 100644 --- a/src/widgets/dialogs/qfiledialog_mac.mm +++ b/src/widgets/dialogs/qfiledialog_mac.mm @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h index 30c73ade7b..a66ee757f6 100644 --- a/src/widgets/dialogs/qfiledialog_p.h +++ b/src/widgets/dialogs/qfiledialog_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -143,25 +143,7 @@ public: QLineEdit *lineEdit() const; - int maxNameLength(const QString &path) { -#if defined(Q_OS_UNIX) - return ::pathconf(QFile::encodeName(path).data(), _PC_NAME_MAX); -#elif defined(Q_OS_WIN) -#ifndef Q_OS_WINCE - DWORD maxLength; - QString drive = path.left(3); - if (::GetVolumeInformation(reinterpret_cast<const wchar_t *>(drive.utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0) == FALSE) - return -1; - return maxLength; -#else - Q_UNUSED(path); - return MAX_PATH; -#endif //Q_OS_WINCE -#else - Q_UNUSED(path); -#endif - return -1; - } + static int maxNameLength(const QString &path); QString basename(const QString &path) const { @@ -187,7 +169,7 @@ public: static inline QString toInternal(const QString &path) { -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QString n(path); n.replace(QLatin1Char('\\'), QLatin1Char('/')); #if defined(Q_OS_WINCE) diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp index bce8b3ecc1..451376b3c7 100644 --- a/src/widgets/dialogs/qfileinfogatherer.cpp +++ b/src/widgets/dialogs/qfileinfogatherer.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -264,8 +264,6 @@ QString QFileInfoGatherer::translateDriveName(const QFileInfo &drive) const #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (driveName.startsWith(QLatin1Char('/'))) // UNC host return drive.fileName(); -#endif -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) if (driveName.endsWith(QLatin1Char('/'))) driveName.chop(1); #endif diff --git a/src/widgets/dialogs/qfileinfogatherer_p.h b/src/widgets/dialogs/qfileinfogatherer_p.h index 3621c6b6ad..3e5d1be384 100644 --- a/src/widgets/dialogs/qfileinfogatherer_p.h +++ b/src/widgets/dialogs/qfileinfogatherer_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index e44a9ea882..7ea4302a56 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -49,10 +49,8 @@ #include <qapplication.h> #ifdef Q_OS_WIN -#include <qt_windows.h> -#endif -#ifdef Q_OS_WIN32 -#include <QtCore/QVarLengthArray> +# include <QtCore/QVarLengthArray> +# include <qt_windows.h> #endif QT_BEGIN_NAMESPACE @@ -367,7 +365,7 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS // ### TODO can we use bool QAbstractFileEngine::caseSensitive() const? QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts); if ((pathElements.isEmpty()) -#if (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) && QDir::fromNativeSeparators(longPath) != QLatin1String("/") #endif ) @@ -399,11 +397,9 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS } else #endif -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) { if (!pathElements.at(0).contains(QLatin1String(":"))) { - // The reason we express it like this instead of with anonymous, temporary - // variables, is to workaround a compiler crash with Q_CC_NOKIAX86. QString rootPath = QDir(longPath).rootPath(); pathElements.prepend(rootPath); } @@ -1314,7 +1310,7 @@ QString QFileSystemModelPrivate::filePath(const QModelIndex &index) const if ((fullPath.length() > 2) && fullPath[0] == QLatin1Char('/') && fullPath[1] == QLatin1Char('/')) fullPath = fullPath.mid(1); #endif -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) if (fullPath.length() == 2 && fullPath.endsWith(QLatin1Char(':'))) fullPath.append(QLatin1Char('/')); #endif @@ -1655,25 +1651,13 @@ void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, cons if (parentNode->children.count() == 0) return; QStringList toRemove; -#if defined(Q_OS_SYMBIAN) - // Filename case must be exact in qBinaryFind below, so create a list of all lowercase names. - QStringList newFiles; - for(int i = 0; i < files.size(); i++) { - newFiles << files.at(i).toLower(); - } -#else QStringList newFiles = files; -#endif qSort(newFiles.begin(), newFiles.end()); QHash<QString, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin(); while (i != parentNode->children.constEnd()) { QStringList::iterator iterator; iterator = qBinaryFind(newFiles.begin(), newFiles.end(), -#if defined(Q_OS_SYMBIAN) - i.value()->fileName.toLower()); -#else i.value()->fileName); -#endif if (iterator == newFiles.end()) { toRemove.append(i.value()->fileName); } @@ -1978,8 +1962,8 @@ bool QFileSystemModelPrivate::filtersAcceptsNode(const QFileSystemNode *node) co const bool hideHidden = !(filters & QDir::Hidden); const bool hideSystem = !(filters & QDir::System); const bool hideSymlinks = (filters & QDir::NoSymLinks); - const bool hideDot = (filters & QDir::NoDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot) - const bool hideDotDot = (filters & QDir::NoDotDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot) + const bool hideDot = (filters & QDir::NoDot); + const bool hideDotDot = (filters & QDir::NoDotDot); // Note that we match the behavior of entryList and not QFileInfo on this and this // incompatibility won't be fixed until Qt 5 at least diff --git a/src/widgets/dialogs/qfilesystemmodel.h b/src/widgets/dialogs/qfilesystemmodel.h index 09e8d9d529..5a9139266d 100644 --- a/src/widgets/dialogs/qfilesystemmodel.h +++ b/src/widgets/dialogs/qfilesystemmodel.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -52,7 +52,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_FILESYSTEMMODEL diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h index 2ab7838dad..0e982140b5 100644 --- a/src/widgets/dialogs/qfilesystemmodel_p.h +++ b/src/widgets/dialogs/qfilesystemmodel_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp index c8fb36d9d6..2402f2a955 100644 --- a/src/widgets/dialogs/qfontdialog.cpp +++ b/src/widgets/dialogs/qfontdialog.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -65,10 +65,6 @@ #include <private/qdialog_p.h> #include <private/qfont_p.h> -#if defined(Q_WS_S60) -#include <QtWidgets/qdesktopwidget.h> -#endif - QT_BEGIN_NAMESPACE class QFontListView : public QListView @@ -322,8 +318,6 @@ void QFontDialogPrivate::init() #if defined(Q_WS_WINCE) q->resize(180, 120); -#elif defined(Q_WS_S60) - q->resize(QApplication::desktop()->availableGeometry(QCursor::pos()).size()); #else q->resize(500, 360); #endif // Q_WS_WINCE @@ -385,23 +379,6 @@ QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, cons /*! \overload - \since 4.5 -*/ -QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, const QString &title) -{ - return QFontDialogPrivate::getFont(ok, initial, parent, title, 0); -} - -/*! - \overload -*/ -QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent) -{ - return QFontDialogPrivate::getFont(ok, initial, parent, QString(), 0); -} - -/*! - \overload Executes a modal font dialog and returns a font. @@ -782,11 +759,7 @@ void QFontDialogPrivate::retranslateStrings() familyAccel->setText(QFontDialog::tr("&Font")); styleAccel->setText(QFontDialog::tr("Font st&yle")); sizeAccel->setText(QFontDialog::tr("&Size")); -#ifndef Q_WS_S60 - // Removed the title due to lack of screen estate in small S60 screen. - // The effects are descriptive without a title (strikeout, underline). effects->setTitle(QFontDialog::tr("Effects")); -#endif strikeout->setText(QFontDialog::tr("Stri&keout")); underline->setText(QFontDialog::tr("&Underline")); sample->setTitle(QFontDialog::tr("Sample")); diff --git a/src/widgets/dialogs/qfontdialog.h b/src/widgets/dialogs/qfontdialog.h index f5353d512f..c5f654a50a 100644 --- a/src/widgets/dialogs/qfontdialog.h +++ b/src/widgets/dialogs/qfontdialog.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -50,7 +50,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_FONTDIALOG @@ -97,13 +96,9 @@ public: void setVisible(bool visible); - // ### Qt 5: merge overloads - static QFont getFont(bool *ok, const QFont &initial, QWidget *parent, const QString &title, - FontDialogOptions options); - static QFont getFont(bool *ok, const QFont &initial, QWidget *parent, const QString &title); - static QFont getFont(bool *ok, const QFont &initial, QWidget *parent = 0); static QFont getFont(bool *ok, QWidget *parent = 0); - + static QFont getFont(bool *ok, const QFont &initial, QWidget *parent = 0, const QString &title = QString(), + FontDialogOptions options = 0); Q_SIGNALS: void currentFontChanged(const QFont &font); @@ -112,11 +107,9 @@ Q_SIGNALS: protected: void changeEvent(QEvent *event); void done(int result); - -private: - // ### Qt 5: make protected bool eventFilter(QObject *object, QEvent *event); +private: Q_DISABLE_COPY(QFontDialog) Q_PRIVATE_SLOT(d_func(), void _q_sizeChanged(const QString &)) diff --git a/src/widgets/dialogs/qfontdialog_mac.mm b/src/widgets/dialogs/qfontdialog_mac.mm index 71b142cd48..bf8b88a0c9 100644 --- a/src/widgets/dialogs/qfontdialog_mac.mm +++ b/src/widgets/dialogs/qfontdialog_mac.mm @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qfontdialog_p.h b/src/widgets/dialogs/qfontdialog_p.h index 506d52b0b6..9bf00d2657 100644 --- a/src/widgets/dialogs/qfontdialog_p.h +++ b/src/widgets/dialogs/qfontdialog_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qfscompleter_p.h b/src/widgets/dialogs/qfscompleter_p.h index c25bcf20cb..eae972aa32 100644 --- a/src/widgets/dialogs/qfscompleter_p.h +++ b/src/widgets/dialogs/qfscompleter_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -66,7 +66,7 @@ public: QFSCompleter(QFileSystemModel *model, QObject *parent = 0) : QCompleter(model, parent), proxyModel(0), sourceModel(model) { -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) setCaseSensitivity(Qt::CaseInsensitive); #endif } diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp index dc7e30368b..9cf41003f5 100644 --- a/src/widgets/dialogs/qinputdialog.cpp +++ b/src/widgets/dialogs/qinputdialog.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -1173,17 +1173,6 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri } /*! - \internal -*/ -// ### Qt 5: Use only the version above. -QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label, - QLineEdit::EchoMode mode, const QString &text, bool *ok, - Qt::WindowFlags flags) -{ - return getText(parent, title, label, mode, text, ok, flags, Qt::ImhNone); -} - -/*! \since 4.5 Static convenience function to get an integer input from the user. @@ -1342,29 +1331,6 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri } /*! - \internal -*/ -// ### Qt 5: Use only the version above. -QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label, - const QStringList &items, int current, bool editable, bool *ok, - Qt::WindowFlags flags) -{ - return getItem(parent, title, label, items, current, editable, ok, flags, Qt::ImhNone); -} - -/*! - \obsolete - - Use getInt() instead. -*/ -int QInputDialog::getInteger(QWidget *parent, const QString &title, const QString &label, - int value, int min, int max, int step, bool *ok, - Qt::WindowFlags flags) -{ - return getInt(parent, title, label, value, min, max, step, ok, flags); -} - -/*! \fn QString QInputDialog::getText(const QString &title, const QString &label, QLineEdit::EchoMode echo = QLineEdit::Normal, const QString &text = QString(), bool *ok = 0, @@ -1377,19 +1343,6 @@ int QInputDialog::getInteger(QWidget *parent, const QString &title, const QStrin */ /*! - \fn int QInputDialog::getInteger(const QString &title, const QString &label, int value = 0, - int min = -2147483647, int max = 2147483647, - int step = 1, bool *ok = 0, - QWidget *parent = 0, const char *name = 0, Qt::WindowFlags flags = 0) - - - Call getInteger(\a parent, \a title, \a label, \a value, \a - min, \a max, \a step, \a ok, \a flags) instead. - - The \a name parameter is ignored. -*/ - -/*! \fn double QInputDialog::getDouble(const QString &title, const QString &label, double value = 0, double min = -2147483647, double max = 2147483647, int decimals = 1, bool *ok = 0, diff --git a/src/widgets/dialogs/qinputdialog.h b/src/widgets/dialogs/qinputdialog.h index 164e0d1014..bf6885cccc 100644 --- a/src/widgets/dialogs/qinputdialog.h +++ b/src/widgets/dialogs/qinputdialog.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -50,7 +50,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_INPUTDIALOG @@ -167,7 +166,6 @@ public: void setVisible(bool visible); -#ifdef Q_QDOC static QString getText(QWidget *parent, const QString &title, const QString &label, QLineEdit::EchoMode echo = QLineEdit::Normal, const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0, @@ -176,22 +174,7 @@ public: const QStringList &items, int current = 0, bool editable = true, bool *ok = 0, Qt::WindowFlags flags = 0, Qt::InputMethodHints inputMethodHints = Qt::ImhNone); -#else - static QString getText(QWidget *parent, const QString &title, const QString &label, - QLineEdit::EchoMode echo = QLineEdit::Normal, - const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0); - static QString getItem(QWidget *parent, const QString &title, const QString &label, - const QStringList &items, int current = 0, bool editable = true, - bool *ok = 0, Qt::WindowFlags flags = 0); - static QString getText(QWidget *parent, const QString &title, const QString &label, - QLineEdit::EchoMode echo, - const QString &text, bool *ok, Qt::WindowFlags flags, - Qt::InputMethodHints inputMethodHints); - static QString getItem(QWidget *parent, const QString &title, const QString &label, - const QStringList &items, int current, bool editable, - bool *ok, Qt::WindowFlags flags, - Qt::InputMethodHints inputMethodHints); -#endif + static int getInt(QWidget *parent, const QString &title, const QString &label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0); @@ -199,11 +182,14 @@ public: double minValue = -2147483647, double maxValue = 2147483647, int decimals = 1, bool *ok = 0, Qt::WindowFlags flags = 0); - // obsolete - static int getInteger(QWidget *parent, const QString &title, const QString &label, int value = 0, +#if QT_DEPRECATED_SINCE(5, 0) + QT_DEPRECATED static inline int getInteger(QWidget *parent, const QString &title, const QString &label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, - int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0); - + int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0) + { + return getInt(parent, title, label, value, minValue, maxValue, step, ok, flags); + } +#endif Q_SIGNALS: // ### emit signals! @@ -214,9 +200,8 @@ Q_SIGNALS: void doubleValueChanged(double value); void doubleValueSelected(double value); - public: - void done(int result); // ### Qt 5: Make protected. + void done(int result); private: Q_DISABLE_COPY(QInputDialog) diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index fdba17d0ce..0f57fa67e1 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -65,20 +65,23 @@ #include <QtGui/qfontmetrics.h> #include <QtGui/qclipboard.h> -#ifndef QT_NO_STYLE_S60 -#include <qs60style.h> +#ifdef Q_OS_WIN +# include <QtCore/qt_windows.h> +# include <QtGui/QPlatformNativeInterface> #endif -#ifdef Q_WS_WINCE -extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp -extern bool qt_wince_is_smartphone();//defined in qguifunctions_wince.cpp -extern bool qt_wince_is_pocket_pc(); //defined in qguifunctions_wince.cpp +QT_BEGIN_NAMESPACE -#include "qguifunctions_wince.h" +#ifdef Q_OS_WIN +HMENU qt_getWindowsSystemMenu(const QWidget *w) +{ + if (QWindow *window = QApplicationPrivate::windowForWidget(w)) + if (void *handle = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window)) + return GetSystemMenu(reinterpret_cast<HWND>(handle), FALSE); + return 0; +} #endif -QT_BEGIN_NAMESPACE - enum Button { Old_Ok = 1, Old_Cancel = 2, Old_Yes = 3, Old_No = 4, Old_Abort = 5, Old_Retry = 6, Old_Ignore = 7, Old_YesAll = 8, Old_NoAll = 9, Old_ButtonMask = 0xFF, NewButtonMask = 0xFFFFFC00 }; @@ -346,15 +349,6 @@ void QMessageBoxPrivate::updateSize() width = hardLimit; } } -#ifdef Q_WS_S60 - // in S60 portait messageBoxes should always occupy maximum width - if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width()){ - width = hardLimit; - } else { - // in landscape the messageBoxes should be of same width as in portrait - width = qMin(QApplication::desktop()->size().height(), hardLimit); - } -#endif if (informativeLabel) { label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); @@ -385,15 +379,6 @@ void QMessageBoxPrivate::updateSize() ? layout->totalHeightForWidth(width) : layout->totalMinimumSize().height(); -#ifndef QT_NO_STYLE_S60 - QS60Style *s60Style = 0; - s60Style = qobject_cast<QS60Style *>(QApplication::style()); - - //use custom pixel metric to deduce the minimum height of the messagebox - if (s60Style) - height = qMax(height, s60Style->pixelMetric((QStyle::PixelMetric)PM_MessageBoxHeight)); -#endif - q->setFixedSize(width, height); QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest); } @@ -1478,15 +1463,12 @@ void QMessageBox::showEvent(QShowEvent *e) d->updateSize(); #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(this, 0, QAccessible::Alert); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Alert, this, 0)); #endif -#ifdef Q_WS_WIN - HMENU systemMenu = GetSystemMenu((HWND)winId(), FALSE); - if (!d->detectedEscapeButton) { - EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_GRAYED); - } - else { - EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_ENABLED); +#ifdef Q_OS_WIN + if (const HMENU systemMenu = qt_getWindowsSystemMenu(this)) { + EnableMenuItem(systemMenu, SC_CLOSE, d->detectedEscapeButton ? + MF_BYCOMMAND|MF_ENABLED : MF_BYCOMMAND|MF_GRAYED); } #endif QDialog::showEvent(e); @@ -1810,15 +1792,6 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) #endif } -/*! - \internal -*/ -QSize QMessageBox::sizeHint() const -{ - // ### Qt 5: remove - return QDialog::sizeHint(); -} - ///////////////////////////////////////////////////////////////////////////////////////// // Source and binary compatibility routines for 4.0 and 4.1 diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h index 4774389a69..b42681a565 100644 --- a/src/widgets/dialogs/qmessagebox.h +++ b/src/widgets/dialogs/qmessagebox.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -48,7 +48,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_MESSAGEBOX @@ -62,7 +61,6 @@ class Q_WIDGETS_EXPORT QMessageBox : public QDialog Q_ENUMS(Icon) Q_FLAGS(StandardButtons) Q_PROPERTY(QString text READ text WRITE setText) - // ### Qt 5: Rename 'icon' 'standardIcon' and 'iconPixmap' 'icon' (and use QIcon?) Q_PROPERTY(Icon icon READ icon WRITE setIcon) Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap) Q_PROPERTY(Qt::TextFormat textFormat READ textFormat WRITE setTextFormat) @@ -191,10 +189,8 @@ public: static StandardButton information(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton); - // ### Qt 5: Replace Ok with Yes|No in question() function. - // Also consider if Ok == Yes and Cancel == No. static StandardButton question(QWidget *parent, const QString &title, - const QString &text, StandardButtons buttons = Ok, + const QString &text, StandardButtons buttons = StandardButtons(Yes | No), StandardButton defaultButton = NoButton); static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons = Ok, @@ -205,8 +201,6 @@ public: static void about(QWidget *parent, const QString &title, const QString &text); static void aboutQt(QWidget *parent, const QString &title = QString()); - QSize sizeHint() const; - // the following functions are obsolete: QMessageBox(const QString &title, const QString &text, Icon icon, diff --git a/src/widgets/dialogs/qnspanelproxy_mac.mm b/src/widgets/dialogs/qnspanelproxy_mac.mm index 4f171eab74..403c3edc24 100644 --- a/src/widgets/dialogs/qnspanelproxy_mac.mm +++ b/src/widgets/dialogs/qnspanelproxy_mac.mm @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp index 3cf576462d..f39a7b63ec 100644 --- a/src/widgets/dialogs/qprogressdialog.cpp +++ b/src/widgets/dialogs/qprogressdialog.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -60,10 +60,6 @@ #if defined(QT_SOFTKEYS_ENABLED) #include <qaction.h> #endif -#ifdef Q_WS_S60 -#include <QtWidgets/qdesktopwidget.h> -#endif - QT_BEGIN_NAMESPACE @@ -730,14 +726,7 @@ QSize QProgressDialog::sizeHint() const int h = margin * 2 + bh.height() + sh.height() + spacing; if (d->cancel) h += d->cancel->sizeHint().height() + spacing; -#ifdef Q_WS_S60 - if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width()) - return QSize(qMax(QApplication::desktop()->size().width(), sh.width() + 2 * margin), h); - else - return QSize(qMax(QApplication::desktop()->size().height(), sh.width() + 2 * margin), h); -#else return QSize(qMax(200, sh.width() + 2 * margin), h); -#endif } /*!\reimp diff --git a/src/widgets/dialogs/qprogressdialog.h b/src/widgets/dialogs/qprogressdialog.h index 6089de3f80..41fa821bb0 100644 --- a/src/widgets/dialogs/qprogressdialog.h +++ b/src/widgets/dialogs/qprogressdialog.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -48,7 +48,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_PROGRESSDIALOG diff --git a/src/widgets/dialogs/qsidebar.cpp b/src/widgets/dialogs/qsidebar.cpp index b62afec9bf..00f60f7e77 100644 --- a/src/widgets/dialogs/qsidebar.cpp +++ b/src/widgets/dialogs/qsidebar.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h index 265408b4ef..d19ad97639 100644 --- a/src/widgets/dialogs/qsidebar_p.h +++ b/src/widgets/dialogs/qsidebar_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index dbdff5e34d..629b6828b7 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -2975,11 +2975,7 @@ QSize QWizard::sizeHint() const { Q_D(const QWizard); QSize result = d->mainLayout->totalSizeHint(); -#ifdef Q_WS_S60 - QSize extra(QApplication::desktop()->availableGeometry(QCursor::pos()).size()); -#else QSize extra(500, 360); -#endif if (d->wizStyle == MacStyle && d->current != -1) { QSize pixmap(currentPage()->pixmap(BackgroundPixmap).size()); extra.setWidth(616); @@ -3205,16 +3201,17 @@ void QWizard::paintEvent(QPaintEvent * event) #endif } -#if defined(Q_WS_WIN) +#if defined(Q_OS_WIN) /*! \reimp */ -bool QWizard::winEvent(MSG *message, long *result) +bool QWizard::nativeEvent(const QByteArray &eventType, void *message, long *result) { #if !defined(QT_NO_STYLE_WINDOWSVISTA) Q_D(QWizard); - if (d->isVistaThemeEnabled()) { - const bool winEventResult = d->vistaHelper->handleWinEvent(message, result); + if (d->isVistaThemeEnabled() && eventType == QByteArrayLiteral("windows_generic_MSG")) { + MSG *windowsMessage = static_cast<MSG *>(message); + const bool winEventResult = d->vistaHelper->handleWinEvent(windowsMessage, result); if (QVistaHelper::vistaState() != d->vistaState) { d->vistaState = QVistaHelper::vistaState(); d->vistaStateChanged = true; @@ -3222,10 +3219,10 @@ bool QWizard::winEvent(MSG *message, long *result) } return winEventResult; } else { - return QDialog::winEvent(message, result); + return QDialog::nativeEvent(eventType, message, result); } #else - return QDialog::winEvent(message, result); + return QDialog::nativeEvent(eventType, message, result); #endif } #endif diff --git a/src/widgets/dialogs/qwizard.h b/src/widgets/dialogs/qwizard.h index f9af57c0b1..caa9d5e648 100644 --- a/src/widgets/dialogs/qwizard.h +++ b/src/widgets/dialogs/qwizard.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -48,7 +48,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Gui) #ifndef QT_NO_WIZARD @@ -190,8 +189,8 @@ protected: bool event(QEvent *event); void resizeEvent(QResizeEvent *event); void paintEvent(QPaintEvent *event); -#if defined(Q_WS_WIN) - bool winEvent(MSG * message, long * result); +#ifdef Q_OS_WIN + bool nativeEvent(const QByteArray &eventType, void * message, long * result); #endif void done(int result); virtual void initializePage(int id); diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp index 06640a5864..2c4c738681 100644 --- a/src/widgets/dialogs/qwizard_win.cpp +++ b/src/widgets/dialogs/qwizard_win.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -318,10 +318,10 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type) return value; } +Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &); + void QVistaHelper::drawTitleBar(QPainter *painter) { - Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &); - Q_ASSERT(backButton_); QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); QBackingStore *backingStore = backButton_->backingStore(); @@ -399,12 +399,13 @@ bool QVistaHelper::winEvent(MSG* msg, long* result) *result = DefWindowProc(msg->hwnd, msg->message, msg->wParam, msg->lParam); break; } - case WM_NCCALCSIZE: { - NCCALCSIZE_PARAMS* lpncsp = (NCCALCSIZE_PARAMS*)msg->lParam; - *result = DefWindowProc(msg->hwnd, msg->message, msg->wParam, msg->lParam); - lpncsp->rgrc[0].top -= (vistaState() == VistaAero ? titleBarSize() : 0); - break; - } +// case WM_NCCALCSIZE: { #fixme: If the frame size is changed, it needs to be communicated to the QWindow. +// NCCALCSIZE_PARAMS* lpncsp = (NCCALCSIZE_PARAMS*)msg->lParam; +// *result = DefWindowProc(msg->hwnd, msg->message, msg->wParam, msg->lParam); +// lpncsp->rgrc[0].top -= (vistaState() == VistaAero ? titleBarSize() : 0); +// +// break; +// } default: retval = false; } @@ -480,8 +481,8 @@ bool QVistaHelper::handleWinEvent(MSG *message, long *result) if (wizard->wizardStyle() == QWizard::AeroStyle && vistaState() == VistaAero) { status = winEvent(message, result); if (message->message == WM_NCCALCSIZE) { - if (status) - collapseTopFrameStrut(); +// if (status) #fixme +// collapseTopFrameStrut(); } else if (message->message == WM_NCPAINT) { wizard->update(); } diff --git a/src/widgets/dialogs/qwizard_win_p.h b/src/widgets/dialogs/qwizard_win_p.h index ab16d293af..80b5fd8241 100644 --- a/src/widgets/dialogs/qwizard_win_p.h +++ b/src/widgets/dialogs/qwizard_win_p.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -56,12 +56,12 @@ #ifndef QT_NO_WIZARD #ifndef QT_NO_STYLE_WINDOWSVISTA -#include <qt_windows.h> #include <qobject.h> #include <qwidget.h> #include <qabstractbutton.h> #include <QtWidgets/private/qwidget_p.h> #include <QtWidgets/private/qstylehelper_p.h> +#include <qt_windows.h> QT_BEGIN_NAMESPACE |