diff options
author | Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> | 2012-06-19 13:21:35 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-03 01:55:37 +0200 |
commit | 037238022f3a91a5619709b2c7cf4b38cd4d294b (patch) | |
tree | c33f6c04d69e32765649b5ae2cb7f8e09131966d | |
parent | fe37ae066fdfad313215937aab2428b74892b746 (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 <samuel.rodal@nokia.com>
-rwxr-xr-x | bin/syncqt | 14 | ||||
-rw-r--r-- | src/gui/kernel/kernel.pri | 4 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 4 | ||||
-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.cpp | 4 | ||||
-rw-r--r-- | src/testlib/qtestkeyboard.h | 2 | ||||
-rw-r--r-- | src/testlib/qtestmouse.h | 2 | ||||
-rw-r--r-- | src/testlib/qtesttouch.h | 2 | ||||
-rw-r--r-- | sync.profile | 6 |
10 files changed, 39 insertions, 16 deletions
diff --git a/bin/syncqt b/bin/syncqt index 5f8bbe248a..23230c2c4b 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 9825633358..efa79b5cc0 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 a9fe118f2b..857dc5390e 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 b55f3e3f33..0382ac6dbf 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 8fb0652eb6..26f4cd68bb 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 139df98daf..e884d7caf9 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 2e43e864d5..7c37d07a0b 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 4ee31ff47f..910914bdbc 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 6e456f375c..e19c60f812 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 460e7083bd..d5c897ac72 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" ); |