summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-04-27 01:33:35 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-07 20:25:24 +0200
commit36547f4eff44361f7a6acd0cff107c0e47561f93 (patch)
treeaafbf1b22400bbaf90046b415490667164a2d93a /src/widgets/kernel
parent30a424543858a14a649624e8ce21e4506c8d9532 (diff)
Expose QPA API under qpa/*
The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/kernel.pri2
-rw-r--r--src/widgets/kernel/qapplication.cpp4
-rw-r--r--src/widgets/kernel/qapplication_p.h4
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp8
-rw-r--r--src/widgets/kernel/qiconloader.cpp2
-rw-r--r--src/widgets/kernel/qplatformmenu.h (renamed from src/widgets/kernel/qplatformmenu_qpa.h)0
-rw-r--r--src/widgets/kernel/qplatformmenu_qpa.cpp2
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp2
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp6
10 files changed, 16 insertions, 16 deletions
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri
index 97430babd3..9e3d82ea12 100644
--- a/src/widgets/kernel/kernel.pri
+++ b/src/widgets/kernel/kernel.pri
@@ -42,7 +42,7 @@ HEADERS += \
kernel/qsoftkeymanager_common_p.h \
kernel/qdesktopwidget_qpa_p.h \
kernel/qwidgetwindow_qpa_p.h \
- kernel/qplatformmenu_qpa.h
+ kernel/qplatformmenu.h
SOURCES += \
kernel/qaction.cpp \
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 734c737e84..369f9b9063 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -72,7 +72,7 @@
#include <QtWidgets/qgraphicsproxywidget.h>
#include <QtGui/qstylehints.h>
#include <QtGui/qinputmethod.h>
-#include <QtGui/qplatformtheme_qpa.h>
+#include <qpa/qplatformtheme.h>
#include "private/qkeymapper_p.h"
@@ -92,7 +92,7 @@
#include "qgesture.h"
#include "private/qgesturemanager_p.h"
#include "private/qguiapplication_p.h"
-#include "qplatformfontdatabase_qpa.h"
+#include <qpa/qplatformfontdatabase.h>
#ifndef QT_NO_LIBRARY
#include "qlibrary.h"
#endif
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index b1f510c5a5..9e92a6d121 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -61,7 +61,7 @@
#include "QtGui/qregion.h"
#include "QtGui/qwindow.h"
#include "qwidget.h"
-#include "QtGui/qplatformnativeinterface_qpa.h"
+#include <qpa/qplatformnativeinterface.h>
#include "QtCore/qmutex.h"
#include "QtCore/qtranslator.h"
#include "QtCore/qbasictimer.h"
@@ -72,7 +72,7 @@
#include <QTime>
#include <QWindowSystemInterface>
#include "private/qwindowsysteminterface_qpa_p.h"
-#include "QtGui/qplatformintegration_qpa.h"
+#include <qpa/qplatformintegration.h>
#include "private/qguiapplication_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp
index 0651d5bf44..998f06cd15 100644
--- a/src/widgets/kernel/qapplication_qpa.cpp
+++ b/src/widgets/kernel/qapplication_qpa.cpp
@@ -52,15 +52,15 @@
#include "private/qevent_p.h"
#include "qgenericpluginfactory_qpa.h"
-#include "private/qplatformintegrationfactory_qpa_p.h"
+#include <qpa/qplatformintegrationfactory_p.h>
#include <qdesktopwidget.h>
-#include <QPlatformCursor>
-#include <QPlatformTheme>
+#include <qpa/qplatformcursor.h>
+#include <qpa/qplatformtheme.h>
#include <qdebug.h>
#include <QWindowSystemInterface>
#include "private/qwindowsysteminterface_qpa_p.h"
-#include <QPlatformIntegration>
+#include <qpa/qplatformintegration.h>
#include "qdesktopwidget_qpa_p.h"
#include "qwidgetwindow_qpa_p.h"
diff --git a/src/widgets/kernel/qiconloader.cpp b/src/widgets/kernel/qiconloader.cpp
index e1828fd1f1..38cee3e51f 100644
--- a/src/widgets/kernel/qiconloader.cpp
+++ b/src/widgets/kernel/qiconloader.cpp
@@ -48,7 +48,7 @@
#include <QtWidgets/QApplication>
#include <QtWidgets/QIconEnginePlugin>
#include <QtGui/QPixmapCache>
-#include <QtGui/QPlatformTheme>
+#include <qpa/qplatformtheme.h>
#include <QtWidgets/QIconEngine>
#include <QtWidgets/QStyleOption>
#include <QtCore/QList>
diff --git a/src/widgets/kernel/qplatformmenu_qpa.h b/src/widgets/kernel/qplatformmenu.h
index cbd7eae6ac..cbd7eae6ac 100644
--- a/src/widgets/kernel/qplatformmenu_qpa.h
+++ b/src/widgets/kernel/qplatformmenu.h
diff --git a/src/widgets/kernel/qplatformmenu_qpa.cpp b/src/widgets/kernel/qplatformmenu_qpa.cpp
index 95a70d9dcd..f28560e560 100644
--- a/src/widgets/kernel/qplatformmenu_qpa.cpp
+++ b/src/widgets/kernel/qplatformmenu_qpa.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qplatformmenu_qpa.h"
+#include "qplatformmenu.h"
QT_BEGIN_NAMESPACE
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 5df69be020..907a29f3fb 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -55,7 +55,7 @@
#include "qcursor.h"
#include "qbitmap.h"
#include "qtextdocument.h"
-#include "qplatformtheme_qpa.h"
+#include <qpa/qplatformtheme.h>
#include "private/qtextdocumentlayout_p.h"
#include "qtoolbutton.h"
#include "qdebug.h"
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 9abba54390..dcd052a94e 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -67,7 +67,7 @@
# include "qtoolbar.h"
# include <private/qmainwindowlayout_p.h>
#endif
-#include "qplatformwindow_qpa.h"
+#include <qpa/qplatformwindow.h>
#include "private/qwidgetwindow_qpa_p.h"
#include "qpainter.h"
#include "qtooltip.h"
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index a8175455b2..97cf921691 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -47,12 +47,12 @@
#include "private/qwidgetwindow_qpa_p.h"
#include "private/qapplication_p.h"
#include "QtWidgets/qdesktopwidget.h"
-#include "QtGui/qplatformwindow_qpa.h"
+#include <qpa/qplatformwindow.h>
#include "QtGui/qsurfaceformat.h"
-#include "QtGui/qplatformopenglcontext_qpa.h"
+#include <qpa/qplatformopenglcontext.h>
#include "QtGui/private/qwindow_p.h"
-#include <QtGui/QPlatformCursor>
+#include <qpa/qplatformcursor.h>
#include <QtGui/QGuiApplication>
#include <QtGui/QScreen>