qpa api: replace QPA headers with something more benign
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Tue, 22 May 2012 06:09:16 +0000 (23:09 -0700)
committerQt by Nokia <qt-info@nokia.com>
Tue, 22 May 2012 18:56:38 +0000 (20:56 +0200)
The current 'we mean it' headers are considered too aggressive for QPA.

Replaced using the following script.
for file in `find -type f -name "qplatform*.h" -and -not -name "*_p.h"`; do
    LINE_NO_1=`grep -n -m 1 "W A R N I N G" $file | awk -F ':' '{print $1}'`
    LINE_NO_2=`grep -n -m 1 "We mean it." $file | awk -F ':' '{print $1}'`
    if [ -z "$LINE_NO_1" ]; then
        LINE_NO_1=`grep -n -m 1 "#define " $file | awk -F ':' '{print $1}'`
        LINE_NO_2=$((1+$LINE_NO_1))
    else
        LINE_NO_1=$(($LINE_NO_1-2))
        LINE_NO_2=$(($LINE_NO_2+2))
    fi
    head -n $LINE_NO_1 $file > $file.new
    cat >> $file.new <<EOF
//
//  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.
//
EOF
    tail -n +$LINE_NO_2 $file >> $file.new
    mv $file.new $file
done

Change-Id: I8a974c9bf8942647b7ad950afb372c1f738aa725
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
25 files changed:
src/gui/accessible/qplatformaccessibility.h
src/gui/image/qplatformpixmap.h
src/gui/kernel/qplatformclipboard.h
src/gui/kernel/qplatformcursor.h
src/gui/kernel/qplatformdialoghelper.h
src/gui/kernel/qplatformdrag.h
src/gui/kernel/qplatforminputcontext.h
src/gui/kernel/qplatformintegration.h
src/gui/kernel/qplatformintegrationplugin.h
src/gui/kernel/qplatformmenu.h [changed mode: 0755->0644]
src/gui/kernel/qplatformnativeinterface.h
src/gui/kernel/qplatformopenglcontext.h
src/gui/kernel/qplatformscreen.h
src/gui/kernel/qplatformscreenpageflipper.h
src/gui/kernel/qplatformservices.h
src/gui/kernel/qplatformsharedgraphicscache.h
src/gui/kernel/qplatformsurface.h
src/gui/kernel/qplatformtheme.h
src/gui/kernel/qplatformthemeplugin.h
src/gui/kernel/qplatformwindow.h
src/gui/painting/qplatformbackingstore.h
src/gui/text/qplatformfontdatabase.h
src/plugins/platforms/windows/qplatformfunctions_wince.h
src/printsupport/kernel/qplatformprintersupport.h
src/printsupport/kernel/qplatformprintplugin.h

index b1efd7c..ed4380a 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qobject.h>
index 154c507..21bcfcd 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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 <QtGui/qpixmap.h>
index fd9a5a9..8f292de 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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 <qplatformdefs.h>
index 1d46cd7..3f6067b 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/QList>
index 010957c..d1e627d 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/QtGlobal>
index 14282c5..b74fcbc 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qglobal.h>
index 696146b..f6ff9f9 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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 <QtGui/qinputpanel.h>
index fb62daf..2c67664 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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 <QtGui/qwindowdefs.h>
index d70569c..8b36a7d 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qplugin.h>
old mode 100755 (executable)
new mode 100644 (file)
index 8779d02..4e36f5a
 
 #ifndef QPLATFORMMENU_H
 #define QPLATFORMMENU_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/qglobal.h>
 #include <QtCore/qpointer.h>
index 7b8ef55..37339f4 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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 <QtGui/qwindowdefs.h>
index ddcb87a..466c81d 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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.
 //
 
 #ifndef QT_NO_OPENGL
index 1743024..5628fe7 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qmetatype.h>
index 5c36958..987eba5 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/QObject>
index b7c5a75..ab8211f 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/QtGlobal>
index 449e5e2..83752fb 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qobject.h>
index f64a697..a10ae6f 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qnamespace.h>
index 4a30898..971c010 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/QtGlobal>
index 3ce7cc5..970eb36 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qplugin.h>
index 0b4c675..50efe88 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qscopedpointer.h>
index 90d6b12..b4d2d96 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qrect.h>
index 5081c52..89090fd 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qconfig.h>
index 0e6a859..b04c359 100644 (file)
 
 #ifndef QPLATFORMFUNCTIONS_WCE_H
 #define QPLATFORMFUNCTIONS_WCE_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.
+//
 
 #ifdef Q_OS_WINCE
 #include <QtCore/qfunctions_wince.h>
index 5dba565..f0efa3d 100644 (file)
 
 #ifndef QPLATFORMPRINTINGSUPPORT_H
 #define QPLATFORMPRINTINGSUPPORT_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 <QtPrintSupport/qprinter.h>
 
index aec3e02..597a5f4 100644 (file)
 //  W A R N I N G
 //  -------------
 //
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
+// 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/qplugin.h>