summaryrefslogtreecommitdiffstats
path: root/tests/auto
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 /tests/auto
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 'tests/auto')
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp4
-rw-r--r--tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp2
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp2
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp2
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp2
-rw-r--r--tests/auto/shared/platforminputcontext.h2
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp2
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp4
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp2
12 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index c7652e445f..eeac564689 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -50,8 +50,8 @@
#include <qpaintengine.h>
#include <qsplashscreen.h>
-#include <qplatformpixmap_qpa.h>
-#include <qplatformintegration_qpa.h>
+#include <qpa/qplatformpixmap.h>
+#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
#include <private/qdrawhelper_p.h>
diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
index cfe26d23e7..5bbd4958da 100644
--- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
+++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
@@ -43,7 +43,7 @@
#include <private/qguiapplication_p.h>
#include <private/qinputmethod_p.h>
-#include <qplatforminputcontext_qpa.h>
+#include <qpa/qplatforminputcontext.h>
#include "../../../shared/platforminputcontext.h"
class InputItem : public QObject
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 588584545c..766352f918 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -42,7 +42,7 @@
#include <QtTest/QtTest>
#include <qkeysequence.h>
-#include <qplatformtheme_qpa.h>
+#include <qpa/qplatformtheme.h>
#include <private/qkeysequence_p.h>
#include <private/qguiapplication_p.h>
#include <QTranslator>
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 051e26f4af..5da44dfbfa 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -55,7 +55,7 @@
#include <QVBoxLayout>
#ifdef QT_BUILD_INTERNAL
-#include <qplatformpixmap_qpa.h>
+#include <qpa/qplatformpixmap.h>
#include <QtOpenGL/private/qgl_p.h>
#include <QtGui/private/qimage_p.h>
#include <QtGui/private/qimagepixmapcleanuphooks_p.h>
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index 663f2ef798..38f58fdcda 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -49,7 +49,7 @@
#include <QtCore/QTranslator>
#include <QtCore/QTemporaryDir>
#include <private/qthread_p.h>
-#include <QtGui/QPlatformTheme>
+#include <qpa/qplatformtheme.h>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QColorDialog>
#include <QtWidgets/QDialogButtonBox>
diff --git a/tests/auto/shared/platforminputcontext.h b/tests/auto/shared/platforminputcontext.h
index 2049ec7d61..b7f7e2b826 100644
--- a/tests/auto/shared/platforminputcontext.h
+++ b/tests/auto/shared/platforminputcontext.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <qplatforminputcontext_qpa.h>
+#include <qpa/qplatforminputcontext.h>
class PlatformInputContext : public QPlatformInputContext
{
diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
index 1d391a1c09..6c91bb7a35 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
@@ -48,7 +48,7 @@
#include <QApplication>
#include <QPushButton>
#include <QDialogButtonBox>
-#include <QPlatformTheme>
+#include <qpa/qplatformtheme.h>
#include <private/qguiapplication_p.h>
#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
#include <QMacStyle>
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index be649db9d8..a6330aac17 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -57,7 +57,7 @@
#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
# include <windows.h>
# include <QtGui/QGuiApplication>
-# include <QtGui/QPlatformNativeInterface>
+#include <qpa/qplatformnativeinterface.h>
#endif // Q_OS_WIN
#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
index 51123af953..71f655b197 100644
--- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
+++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
@@ -46,7 +46,7 @@
#include <qevent.h>
#include <qaction.h>
#include <qmenu.h>
-#include <qplatformtheme_qpa.h>
+#include <qpa/qplatformtheme.h>
#include <private/qguiapplication_p.h>
class tst_QAction : public QObject
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 6e88c6e74e..710b81779a 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -83,8 +83,8 @@
#ifdef Q_OS_WIN
# include <QtCore/qt_windows.h>
# include <QtGui/private/qguiapplication_p.h>
-# include <QtGui/QPlatformNativeInterface>
-# include <QtGui/QPlatformIntegration>
+#include <qpa/qplatformnativeinterface.h>
+#include <qpa/qplatformintegration.h>
static HWND winHandleOf(const QWidget *w)
{
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 90b5a88805..18a8666f26 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -44,7 +44,7 @@
#include "qcombobox.h"
#include <private/qcombobox_p.h>
#include <private/qguiapplication_p.h>
-#include <qplatformtheme_qpa.h>
+#include <qpa/qplatformtheme.h>
#include <qfontcombobox.h>
#include <qdesktopwidget.h>
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 22e05a8871..91827eca6d 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -48,7 +48,7 @@
#include "qvalidator.h"
#include "qcompleter.h"
#include "qstandarditemmodel.h"
-#include "qplatformtheme_qpa.h"
+#include <qpa/qplatformtheme.h>
#include "qstylehints.h"
#include <private/qguiapplication_p.h>