diff options
author | Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> | 2012-04-27 01:33:35 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-07 20:25:24 +0200 |
commit | 36547f4eff44361f7a6acd0cff107c0e47561f93 (patch) | |
tree | aafbf1b22400bbaf90046b415490667164a2d93a /src/plugins/platforms/xcb | |
parent | 30a424543858a14a649624e8ce21e4506c8d9532 (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/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qdri2context.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qglxintegration.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbclipboard.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbcursor.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbdrag.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.h | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbkeyboard.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbscreen.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.h | 2 |
14 files changed, 19 insertions, 19 deletions
diff --git a/src/plugins/platforms/xcb/main.cpp b/src/plugins/platforms/xcb/main.cpp index 50c5a1a017..4474a474fd 100644 --- a/src/plugins/platforms/xcb/main.cpp +++ b/src/plugins/platforms/xcb/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <QtGui/QPlatformIntegrationPlugin> +#include <qpa/qplatformintegrationplugin.h> #include "qxcbintegration.h" QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qdri2context.h b/src/plugins/platforms/xcb/qdri2context.h index d0a1b469a9..8945744b22 100644 --- a/src/plugins/platforms/xcb/qdri2context.h +++ b/src/plugins/platforms/xcb/qdri2context.h @@ -42,7 +42,7 @@ #ifndef QDRI2CONTEXT_H #define QDRI2CONTEXT_H -#include <QtGui/QPlatformOpenGLContext> +#include <qpa/qplatformopenglcontext.h> struct xcb_dri2_dri2_buffer_t; diff --git a/src/plugins/platforms/xcb/qglxintegration.h b/src/plugins/platforms/xcb/qglxintegration.h index dce9193eba..8d114b75db 100644 --- a/src/plugins/platforms/xcb/qglxintegration.h +++ b/src/plugins/platforms/xcb/qglxintegration.h @@ -45,7 +45,7 @@ #include "qxcbwindow.h" #include "qxcbscreen.h" -#include <QtGui/QPlatformOpenGLContext> +#include <qpa/qplatformopenglcontext.h> #include <QtGui/QSurfaceFormat> #include <QtCore/QMutex> diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h index e02c6eb15b..b66a27470e 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.h +++ b/src/plugins/platforms/xcb/qxcbbackingstore.h @@ -42,7 +42,7 @@ #ifndef QXCBBACKINGSTORE_H #define QXCBBACKINGSTORE_H -#include <qplatformbackingstore_qpa.h> +#include <qpa/qplatformbackingstore.h> #include <xcb/xcb.h> diff --git a/src/plugins/platforms/xcb/qxcbclipboard.h b/src/plugins/platforms/xcb/qxcbclipboard.h index a43518e80b..1b3f12b279 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.h +++ b/src/plugins/platforms/xcb/qxcbclipboard.h @@ -42,7 +42,7 @@ #ifndef QXCBCLIPBOARD_H #define QXCBCLIPBOARD_H -#include <QPlatformClipboard> +#include <qpa/qplatformclipboard.h> #include <qxcbobject.h> #include <xcb/xcb.h> #include <xcb/xfixes.h> diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h index da243424d5..80fb88b39d 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.h +++ b/src/plugins/platforms/xcb/qxcbcursor.h @@ -42,7 +42,7 @@ #ifndef QXCBCURSOR_H #define QXCBCURSOR_H -#include <QtGui/QPlatformCursor> +#include <qpa/qplatformcursor.h> #include "qxcbscreen.h" QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h index 710a07a5a4..2f74b3eaf7 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.h +++ b/src/plugins/platforms/xcb/qxcbdrag.h @@ -42,7 +42,7 @@ #ifndef QXCBDRAG_H #define QXCBDRAG_H -#include <qplatformdrag_qpa.h> +#include <qpa/qplatformdrag.h> #include <QtPlatformSupport/private/qsimpledrag_p.h> #include <qxcbobject.h> #include <xcb/xcb.h> diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 2d3971de69..8dba6e1464 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -68,9 +68,9 @@ #include <X11/Xlib.h> #endif -#include <private/qplatforminputcontextfactory_qpa_p.h> +#include <qpa/qplatforminputcontextfactory_p.h> #include <private/qgenericunixthemes_p.h> -#include <qplatforminputcontext_qpa.h> +#include <qpa/qplatforminputcontext.h> #if defined(XCB_USE_GLX) #include "qglxintegration.h" @@ -82,7 +82,7 @@ #include <QtGui/QOpenGLContext> #include <QtGui/QScreen> #ifndef QT_NO_ACCESSIBILITY -#include <QtGui/QPlatformAccessibility> +#include <qpa/qplatformaccessibility.h> #endif QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index 6170232d1e..b2245e4de0 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -42,8 +42,8 @@ #ifndef QXCBINTEGRATION_H #define QXCBINTEGRATION_H -#include <QtGui/QPlatformIntegration> -#include <QtGui/QPlatformScreen> +#include <qpa/qplatformintegration.h> +#include <qpa/qplatformscreen.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index ef98f82e97..9bd4c9ccdf 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -49,8 +49,8 @@ #include <private/qguiapplication_p.h> #include <stdio.h> -#include <qplatforminputcontext_qpa.h> -#include <qplatformintegration_qpa.h> +#include <qpa/qplatforminputcontext.h> +#include <qpa/qplatformintegration.h> #ifndef XK_ISO_Left_Tab #define XK_ISO_Left_Tab 0xFE20 diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h index c6835ff9e0..354ef76799 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -42,7 +42,7 @@ #ifndef QXCBNATIVEINTERFACE_H #define QXCBNATIVEINTERFACE_H -#include <QtGui/QPlatformNativeInterface> +#include <qpa/qplatformnativeinterface.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index ac4ecb1c8d..ba3f4aff8d 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -42,7 +42,7 @@ #ifndef QXCBSCREEN_H #define QXCBSCREEN_H -#include <QtGui/QPlatformScreen> +#include <qpa/qplatformscreen.h> #include <QtCore/QString> #include <xcb/xcb.h> diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index ffce2f3956..2355043c56 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -50,7 +50,7 @@ #include "qxcbkeyboard.h" #include "qxcbwmsupport.h" -#include <qplatformintegration_qpa.h> +#include <qpa/qplatformintegration.h> #ifdef XCB_USE_DRI2 #include "qdri2context.h" @@ -87,7 +87,7 @@ #include <private/qguiapplication_p.h> #include <private/qwindow_p.h> -#include <QtGui/QPlatformBackingStore> +#include <qpa/qplatformbackingstore.h> #include <QtGui/QWindowSystemInterface> #include <stdio.h> diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 523dd559c1..0b82196c27 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -42,7 +42,7 @@ #ifndef QXCBWINDOW_H #define QXCBWINDOW_H -#include <QtGui/QPlatformWindow> +#include <qpa/qplatformwindow.h> #include <QtGui/QSurfaceFormat> #include <QtGui/QImage> |