qt5base-lts/examples
Girish Ramakrishnan 36547f4eff 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>
2012-05-07 20:25:24 +02:00
..
animation examples: use QVector<QPointF> instead of QList<QPointF> 2012-03-08 05:31:40 +01:00
dbus Use org.example instead of com.trolltech for the D-Bus examples 2012-04-22 21:32:33 +02:00
desktop Change remaining uses of {to,from}Ascii to {to,from}Latin1 [platformsupport] 2012-05-04 15:27:59 +02:00
dialogs Change remaining uses of {to,from}Ascii to {to,from}Latin1 [platformsupport] 2012-05-04 15:27:59 +02:00
draganddrop Use QRect::united(), QRect::unite() is deprecated. 2012-03-14 11:37:18 +01:00
effects Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
embedded clean up qmake-generated projects 2012-02-24 05:18:30 +01:00
gestures Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
graphicsview Examples: Don't use deprecated methods 2012-04-21 17:29:40 +02:00
ipc Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
itemviews Rename setResizeMode to setSectionResizeMode. 2012-05-07 17:55:47 +02:00
ja_JP/linguist/hellotr Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
layouts Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
linguist Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
mainwindows Compile fix if QT_NO_CLIPBOARD defined 2012-04-19 16:20:28 +02:00
network Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtNetwork] 2012-05-04 12:46:05 +02:00
opengl Expose QPA API under qpa/* 2012-05-07 20:25:24 +02:00
painting examples: compile w/o opengl 2012-02-24 22:39:40 +01:00
qmake Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qpa Got rid of Map / Unmap events in favor of Expose event. 2012-03-22 11:43:36 +01:00
qtconcurrent clean up qmake-generated projects 2012-02-24 05:18:30 +01:00
qtestlib Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
richtext Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
scroller Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
sql Rename setResizeMode to setSectionResizeMode. 2012-05-07 17:55:47 +02:00
statemachine Disable some tests and examples when --no-widgets is specified 2012-03-19 20:16:04 +01:00
threads clean up qmake-generated projects 2012-02-24 05:18:30 +01:00
tools Examples: Don't use deprecated methods 2012-04-21 17:29:40 +02:00
touch examples: compile w/QT_NO_CAST_FROM_BYTEARRAY, at least on Unix 2012-03-08 09:58:26 +01:00
tutorials Move QtConcurrent into its own module 2012-02-05 17:49:16 +01:00
webkit/webkit-guide Change bugreports.qt.nokia.com -> bugreports.qt-project.org 2012-03-02 23:16:25 +01:00
widgets Examples: Don't use deprecated methods 2012-04-21 17:29:40 +02:00
xml Rename setResizeMode to setSectionResizeMode. 2012-05-07 17:55:47 +02:00
examples.pro Disable some tests and examples when --no-widgets is specified 2012-03-19 20:16:04 +01:00
README Remove more references to demos. 2011-07-08 15:36:26 +02:00

Qt is supplied with a number of example applications that have been
written to provide developers with examples of the Qt API in use,
highlight good programming practice, and showcase features found in each of
Qt's core technologies.


Documentation for examples can be found in the Examples section
of the Qt documentation.