From 40fa7a816fae344f443ab7c4d431ded0179dace1 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 1 Feb 2012 11:01:21 +0100 Subject: [PATCH] Move QPlatformDialogs from QtWidgets to QtGui. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove dependency of the Windows platform plugin on QtWidgets. Change-Id: Iceb876ba7df46b49966af0fc101816654eedb5c5 Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/kernel.pri | 6 ++++-- .../kernel/qplatformdialoghelper_qpa.cpp | 0 .../kernel/qplatformdialoghelper_qpa.h | 14 +++++++------- .../platforms/windows/qwindowsdialoghelpers.cpp | 4 ---- .../platforms/windows/qwindowsdialoghelpers.h | 5 +---- src/plugins/platforms/windows/windows.pro | 2 -- src/widgets/dialogs/qdialog_p.h | 2 +- src/widgets/dialogs/qfiledialog.cpp | 1 - src/widgets/kernel/kernel.pri | 6 ++---- 9 files changed, 15 insertions(+), 25 deletions(-) rename src/{widgets => gui}/kernel/qplatformdialoghelper_qpa.cpp (100%) rename src/{widgets => gui}/kernel/qplatformdialoghelper_qpa.h (95%) diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index b46a9f0f10..bc0cb4e974 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -52,7 +52,8 @@ HEADERS += \ kernel/qstylehints.h \ kernel/qtouchdevice.h \ kernel/qtouchdevice_p.h \ - kernel/qplatformsharedgraphicscache_qpa.h + kernel/qplatformsharedgraphicscache_qpa.h \ + kernel/qplatformdialoghelper_qpa.h SOURCES += \ kernel/qclipboard_qpa.cpp \ @@ -93,7 +94,8 @@ SOURCES += \ kernel/qshortcutmap.cpp \ kernel/qstylehints.cpp \ kernel/qtouchdevice.cpp \ - kernel/qplatformsharedgraphicscache_qpa.cpp + kernel/qplatformsharedgraphicscache_qpa.cpp \ + kernel/qplatformdialoghelper_qpa.cpp contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, egl) { HEADERS += \ diff --git a/src/widgets/kernel/qplatformdialoghelper_qpa.cpp b/src/gui/kernel/qplatformdialoghelper_qpa.cpp similarity index 100% rename from src/widgets/kernel/qplatformdialoghelper_qpa.cpp rename to src/gui/kernel/qplatformdialoghelper_qpa.cpp diff --git a/src/widgets/kernel/qplatformdialoghelper_qpa.h b/src/gui/kernel/qplatformdialoghelper_qpa.h similarity index 95% rename from src/widgets/kernel/qplatformdialoghelper_qpa.h rename to src/gui/kernel/qplatformdialoghelper_qpa.h index ff043b480f..5fdffae5cb 100644 --- a/src/widgets/kernel/qplatformdialoghelper_qpa.h +++ b/src/gui/kernel/qplatformdialoghelper_qpa.h @@ -65,7 +65,7 @@ class QColorDialogOptionsPrivate; class QFontDialogOptionsPrivate; class QFileDialogOptionsPrivate; -class Q_WIDGETS_EXPORT QPlatformDialogHelper : public QObject +class Q_GUI_EXPORT QPlatformDialogHelper : public QObject { Q_OBJECT public: @@ -106,7 +106,7 @@ protected Q_SLOTS: void emitLaunchNativeAppModalPanel(); }; -class Q_WIDGETS_EXPORT QColorDialogOptions +class Q_GUI_EXPORT QColorDialogOptions { public: enum ColorDialogOption { @@ -143,7 +143,7 @@ private: QSharedDataPointer d; }; -class Q_WIDGETS_EXPORT QPlatformColorDialogHelper : public QPlatformDialogHelper +class Q_GUI_EXPORT QPlatformColorDialogHelper : public QPlatformDialogHelper { Q_OBJECT public: @@ -161,7 +161,7 @@ private: QSharedPointer m_options; }; -class Q_WIDGETS_EXPORT QFontDialogOptions +class Q_GUI_EXPORT QFontDialogOptions { public: enum FontDialogOption { @@ -188,7 +188,7 @@ private: QSharedDataPointer d; }; -class Q_WIDGETS_EXPORT QPlatformFontDialogHelper : public QPlatformDialogHelper +class Q_GUI_EXPORT QPlatformFontDialogHelper : public QPlatformDialogHelper { Q_OBJECT public: @@ -206,7 +206,7 @@ private: QSharedPointer m_options; }; -class Q_WIDGETS_EXPORT QFileDialogOptions +class Q_GUI_EXPORT QFileDialogOptions { public: enum ViewMode { Detail, List }; @@ -280,7 +280,7 @@ private: QSharedDataPointer d; }; -class Q_WIDGETS_EXPORT QPlatformFileDialogHelper : public QPlatformDialogHelper +class Q_GUI_EXPORT QPlatformFileDialogHelper : public QPlatformDialogHelper { Q_OBJECT public: diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 2d5690fa4a..f7863ae427 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -41,8 +41,6 @@ #include "qwindowsdialoghelpers.h" -#ifdef QT_WIDGETS_LIB - #include "qwindowscontext.h" #include "qwindowswindow.h" @@ -1387,5 +1385,3 @@ QPlatformDialogHelper *createHelper(QPlatformTheme::DialogType type) QT_END_NAMESPACE #include "qwindowsdialoghelpers.moc" - -#endif // QT_WIDGETS_LIB diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.h b/src/plugins/platforms/windows/qwindowsdialoghelpers.h index db72e086ff..3ae22e69eb 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.h +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.h @@ -42,10 +42,8 @@ #ifndef QWINDOWSDIALOGHELPER_H #define QWINDOWSDIALOGHELPER_H -#ifdef QT_WIDGETS_LIB - #include "qtwindows_additional.h" -#include +#include #include #include @@ -95,5 +93,4 @@ private: QT_END_NAMESPACE -#endif // QT_WIDGETS_LIB #endif // QWINDOWSDIALOGHELPER_H diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index 4b7202578a..ef8c69d18d 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -4,8 +4,6 @@ load(qt_plugin) QT *= core-private QT *= gui-private QT *= platformsupport-private -# ### fixme: Remove widgets dependencies of dialog helpers -QT *= widgets INCLUDEPATH += ../../../3rdparty/harfbuzz/src QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h index f458b733a5..ca99600489 100644 --- a/src/widgets/dialogs/qdialog_p.h +++ b/src/widgets/dialogs/qdialog_p.h @@ -58,7 +58,7 @@ #include "QtCore/qpointer.h" #include "QtWidgets/qdialog.h" #include "QtWidgets/qpushbutton.h" -#include "QtWidgets/qplatformdialoghelper_qpa.h" +#include QT_BEGIN_NAMESPACE diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index e5a24075d9..db13cfea0f 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -45,7 +45,6 @@ #ifndef QT_NO_FILEDIALOG #include "qfiledialog_p.h" -#include "qplatformdialoghelper_qpa.h" #include #include #include diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri index 1f27602466..1a28000aff 100644 --- a/src/widgets/kernel/kernel.pri +++ b/src/widgets/kernel/kernel.pri @@ -44,8 +44,7 @@ HEADERS += \ kernel/qguiplatformplugin_p.h \ kernel/qdesktopwidget_qpa_p.h \ kernel/qwidgetwindow_qpa_p.h \ - kernel/qplatformmenu_qpa.h \ - kernel/qplatformdialoghelper_qpa.h + kernel/qplatformmenu_qpa.h SOURCES += \ kernel/qaction.cpp \ @@ -81,8 +80,7 @@ SOURCES += \ kernel/qdesktopwidget_qpa.cpp \ kernel/qwidget_qpa.cpp \ kernel/qwidgetwindow_qpa.cpp \ - kernel/qplatformmenu_qpa.cpp \ - kernel/qplatformdialoghelper_qpa.cpp + kernel/qplatformmenu_qpa.cpp # TODO false:!x11:mac {