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)
commit6af65edcb644ea2eb87352a0784a188c1309e811
tree9fb5a41d9d22b35193ecd00f37455503e036c505
parentec2245158f27a04945d869cff8cdb8892d75784d
qpa api: replace QPA headers with something more benign

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