summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGirish Ramakrishnan <[email protected]>2012-06-19 13:21:35 -0700
committerQt by Nokia <[email protected]>2012-07-03 01:55:37 +0200
commit037238022f3a91a5619709b2c7cf4b38cd4d294b (patch)
treec33f6c04d69e32765649b5ae2cb7f8e09131966d
parentfe37ae066fdfad313215937aab2428b74892b746 (diff)
Make QWindowSystemInterface part of QPA API
As discussed on mailing list and QtCS 2012. Any file starting with qwindowsystem is now marked as QPA API. This change drops _qpa from the filenames and adds gui-private where required for the code to compile. This change is backward compatible otherwise and compat headers are created for the old inclusion headers. Change-Id: I72ea0f394dee74f46e614fcf11ab5500ac9fef2a Reviewed-by: Samuel Rødal <[email protected]>
-rwxr-xr-xbin/syncqt14
-rw-r--r--src/gui/kernel/kernel.pri4
-rw-r--r--src/gui/kernel/qguiapplication_p.h4
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h (renamed from src/gui/kernel/qwindowsysteminterface_qpa.h)9
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h (renamed from src/gui/kernel/qwindowsysteminterface_qpa_p.h)8
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp4
-rw-r--r--src/testlib/qtestkeyboard.h2
-rw-r--r--src/testlib/qtestmouse.h2
-rw-r--r--src/testlib/qtesttouch.h2
-rw-r--r--sync.profile6
10 files changed, 39 insertions, 16 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 5f8bbe248a0..23230c2c4bf 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -88,6 +88,7 @@ normalizePath(\$qtbasedir) if (defined $qtbasedir);
# will be defined based on the modules sync.profile
our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %modulepris, %explicitheaders, %deprecatedheaders);
+our @qpa_headers = ();
# global variables (modified by options)
my $isunix = 0;
@@ -584,6 +585,15 @@ sub locateSyncProfile
}
}
+sub isQpaHeader
+{
+ my ($header) = @_;
+ foreach my $qpa_header (@qpa_headers) {
+ return 1 if ($header =~ $qpa_header);
+ }
+ return 0;
+}
+
# check if this is an in-source build, and if so use that as the basedir too
$basedir = locateSyncProfile($out_basedir);
if ($basedir) {
@@ -910,7 +920,7 @@ foreach my $lib (@modules_to_sync) {
#figure out if it is a public header
my $public_header = $header;
my $qpa_header = 0;
- if($public_header =~ /^qplatform/) {
+ if(isQpaHeader($public_header)) {
$public_header = 0;
$qpa_header = 1;
} elsif($allheadersprivate || $public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
@@ -1200,7 +1210,7 @@ if($check_includes) {
my $public_header = $header;
if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
$public_header = 0;
- } elsif ($public_header =~ /^qplatform/) {
+ } elsif (isQpaHeader($public_header)) {
$public_header = 0;
} else {
foreach (@ignore_for_master_contents) {
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 98256333581..efa79b5cc01 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -8,8 +8,8 @@ KERNEL_P= kernel
HEADERS += \
kernel/qgenericpluginfactory_qpa.h \
kernel/qgenericplugin_qpa.h \
- kernel/qwindowsysteminterface_qpa.h \
- kernel/qwindowsysteminterface_qpa_p.h \
+ kernel/qwindowsysteminterface.h \
+ kernel/qwindowsysteminterface_p.h \
kernel/qplatformintegration.h \
kernel/qplatformdrag.h \
kernel/qplatformscreen.h \
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index a9fe118f2b2..857dc5390ea 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -49,8 +49,8 @@
#include <QtCore/private/qthread_p.h>
-#include <QWindowSystemInterface>
-#include "private/qwindowsysteminterface_qpa_p.h"
+#include <qpa/qwindowsysteminterface.h>
+#include <qpa/qwindowsysteminterface_p.h>
#include "private/qshortcutmap_p.h"
#include <qicon.h>
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.h b/src/gui/kernel/qwindowsysteminterface.h
index b55f3e3f334..0382ac6dbf2 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -41,6 +41,15 @@
#ifndef QWINDOWSYSTEMINTERFACE_H
#define QWINDOWSYSTEMINTERFACE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is part of the QPA API and is not meant to be used
+// in applications. Usage of this API may make your code
+// source and binary incompatible with future versions of Qt.
+//
+
#include <QtCore/QTime>
#include <QtGui/qwindowdefs.h>
#include <QtCore/QEvent>
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index 8fb0652eb6a..26f4cd68bba 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QWINDOWSYSTEMINTERFACE_QPA_P_H
-#define QWINDOWSYSTEMINTERFACE_QPA_P_H
+#ifndef QWINDOWSYSTEMINTERFACE_P_H
+#define QWINDOWSYSTEMINTERFACE_P_H
-#include "qwindowsysteminterface_qpa.h"
+#include "qwindowsysteminterface.h"
#include <QElapsedTimer>
#include <QPointer>
@@ -338,4 +338,4 @@ public:
QT_END_HEADER
QT_END_NAMESPACE
-#endif // QWINDOWSYSTEMINTERFACE_QPA_P_H
+#endif // QWINDOWSYSTEMINTERFACE_P_H
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
index 139df98dafa..e884d7caf91 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -38,9 +38,9 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qwindowsysteminterface_qpa.h"
+#include "qwindowsysteminterface.h"
#include <qpa/qplatformwindow.h>
-#include "qwindowsysteminterface_qpa_p.h"
+#include "qwindowsysteminterface_p.h"
#include "private/qguiapplication_p.h"
#include "private/qevent_p.h"
#include "private/qtouchdevice_p.h"
diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h
index 2e43e864d57..7c37d07a0ba 100644
--- a/src/testlib/qtestkeyboard.h
+++ b/src/testlib/qtestkeyboard.h
@@ -56,7 +56,7 @@
#include <QtGui/qguiapplication.h>
#include <QtGui/qwindow.h>
#include <QtGui/qevent.h>
-#include <QtGui/qwindowsysteminterface_qpa.h>
+#include <qpa/qwindowsysteminterface.h>
#ifdef QT_WIDGETS_LIB
#include <QtWidgets/qwidget.h>
diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h
index 4ee31ff47f6..910914bdbc4 100644
--- a/src/testlib/qtestmouse.h
+++ b/src/testlib/qtestmouse.h
@@ -54,7 +54,7 @@
#include <QtCore/qpoint.h>
#include <QtCore/qstring.h>
#include <QtGui/qevent.h>
-#include <QtGui/qwindowsysteminterface_qpa.h>
+#include <qpa/qwindowsysteminterface.h>
#ifdef QT_WIDGETS_LIB
#include <QtWidgets/qapplication.h>
diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h
index 6e456f375ce..e19c60f812e 100644
--- a/src/testlib/qtesttouch.h
+++ b/src/testlib/qtesttouch.h
@@ -51,7 +51,7 @@
#include <QtTest/qtestassert.h>
#include <QtTest/qtestsystem.h>
#include <QtTest/qtestspontaneevent.h>
-#include <QtGui/QWindowSystemInterface>
+#include <qpa/qwindowsysteminterface.h>
#include <QtCore/qmap.h>
#include <QtGui/qevent.h>
#ifdef QT_WIDGETS_LIB
diff --git a/sync.profile b/sync.profile
index 460e7083bdb..d5c897ac723 100644
--- a/sync.profile
+++ b/sync.profile
@@ -87,7 +87,10 @@
"qplatformthemeplugin_qpa.h" => "qpa/qplatformthemeplugin.h",
"QPlatformThemePlugin" => "qpa/qplatformthemeplugin.h",
"qplatformwindow_qpa.h" => "qpa/qplatformwindow.h",
- "QPlatformWindow" => "qpa/qplatformwindow.h"
+ "QPlatformWindow" => "qpa/qplatformwindow.h",
+ "qwindowsysteminterface_qpa.h" => "qpa/qwindowsysteminterface.h",
+ "QWindowSystemInterface" => "qpa/qwindowsysteminterface.h",
+ "qwindowsysteminterface_qpa_p.h" => "qpa/qwindowsysteminterface_p.h"
},
"QtWidgets" => {
"qplatformmenu_qpa.h" => "qpa/qplatformmenu.h",
@@ -120,6 +123,7 @@
}
);
+@qpa_headers = ( qr/^qplatform/, qr/^qwindowsystem/ );
@ignore_for_include_check = ( "qsystemdetection.h", "qcompilerdetection.h", "qprocessordetection.h" );
@ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
@ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" );