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>
This commit is contained in:
Girish Ramakrishnan 2012-06-19 13:21:35 -07:00 committed by Qt by Nokia
parent fe37ae066f
commit 037238022f
10 changed files with 39 additions and 16 deletions

View File

@ -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) {

View File

@ -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 \

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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" );