Improve porting scripts

This commit is contained in:
Sebastian Kügler 2013-08-30 00:24:23 +02:00
parent 5ecaf1d08b
commit 5fd1d5d0de
2 changed files with 15 additions and 3 deletions

View File

@ -29,9 +29,13 @@ for FS in `find $PWD -name '*.qml'`; do
perl -p -i -e 's/org\.kde\.locale 0\.1/org.kde.locale 2.0/g' $FS perl -p -i -e 's/org\.kde\.locale 0\.1/org.kde.locale 2.0/g' $FS
perl -p -i -e 's/org\.kde\.draganddrop 1\.0/org.kde.draganddrop 2.0/g' $FS perl -p -i -e 's/org\.kde\.draganddrop 1\.0/org.kde.draganddrop 2.0/g' $FS
#perl -p -i -e 's/theme\.mSize/theme.defaultFont.mSize/g' $FS perl -p -i -e 's/theme\.mSize\./theme.mSize(theme.defaultFont)./g' $FS
perl -p -i -e 's/theme\.defaultFont\.mSize\./theme.mSize(theme.defaultFont)./g' $FS
perl -p -i -e 's/\(theme\.defaultFont\)\(theme\.defaultFont\)/(theme.defaultFont)/g' $FS
# perl -p -i -e 's/Plasma\.Types\./PlasmaCore.Types./g' $FS
done done
#exit
# Qt 4.7, QtQuick 1.0 and QtQuick 1.1 imports become QtQuick 2.0 # Qt 4.7, QtQuick 1.0 and QtQuick 1.1 imports become QtQuick 2.0
@ -95,6 +99,11 @@ for FS in `find $PWD -name '*.h' -o -name '*.cpp'`; do
perl -p -i -e 's/Plasma\:\:Vertical/Plasma::Types::Vertical/g' $FS perl -p -i -e 's/Plasma\:\:Vertical/Plasma::Types::Vertical/g' $FS
perl -p -i -e 's/Plasma\:\:Application/Plasma::Types::Application/g' $FS perl -p -i -e 's/Plasma\:\:Application/Plasma::Types::Application/g' $FS
# FormFactor
perl -p -i -e 's/Plasma\:\:ImmutabilityType/Plasma::Types::ImmutabilityType/g' $FS
perl -p -i -e 's/Plasma\:\:Mutable/Plasma::Types::Mutable/g' $FS
perl -p -i -e 's/Plasma\:\:UserImmutable/Plasma::Types::UserImmutable/g' $FS
perl -p -i -e 's/Plasma\:\:SystemImmutable/Plasma::Types::SystemImmutable/g' $FS
# Location # Location
perl -p -i -e 's/Plasma\:\:Floating/Plasma::Types::Floating/g' $FS perl -p -i -e 's/Plasma\:\:Floating/Plasma::Types::Floating/g' $FS

View File

@ -22,6 +22,7 @@ for FS in `find $PWD -name '*.h' -o -name '*.cpp'`; do
perl -p -i -e 's/QGraphicsWidget/QQuickItem/g' $FS perl -p -i -e 's/QGraphicsWidget/QQuickItem/g' $FS
perl -p -i -e 's/QGraphicsObject/QQuickItem/g' $FS
perl -p -i -e 's/QDeclarativeItem/QQuickItem/g' $FS perl -p -i -e 's/QDeclarativeItem/QQuickItem/g' $FS
perl -p -i -e 's/QDeclarativeView/QQuickView/g' $FS perl -p -i -e 's/QDeclarativeView/QQuickView/g' $FS
perl -p -i -e 's/QDeclarativeImageProvider/QQuickImageProvider/g' $FS perl -p -i -e 's/QDeclarativeImageProvider/QQuickImageProvider/g' $FS
@ -41,8 +42,10 @@ for FS in `find $PWD -name '*.h' -o -name '*.cpp'`; do
perl -p -i -e 's/QDeclarativeScriptString/QQmlScriptString/g' $FS perl -p -i -e 's/QDeclarativeScriptString/QQmlScriptString/g' $FS
perl -p -i -e 's/QGraphicsSceneMouseEvent/QMouseEvent/g' $FS perl -p -i -e 's/QGraphicsSceneMouseEvent/QMouseEvent/g' $FS
perl -p -i -e 's/QGraphicsSceneContextMenuEvent/QContextMenuEvent/g' $FS
perl -p -i -e 's/QGraphicsSceneWheel/QWheelEvent/g' $FS perl -p -i -e 's/QGraphicsSceneWheel/QWheelEvent/g' $FS
perl -p -i -e 's/QGraphicsSceneHoverEvent/QHoverEvent/g' $FS perl -p -i -e 's/QGraphicsSceneHoverEvent/QHoverEvent/g' $FS
perl -p -i -e 's/QWheelEventEvent/QWheelEvent/g' $FS
# Fix up includes # Fix up includes
perl -p -i -e 's/\#include \<QtGui\/QQuickItem\>/\#include \<QtQuick\/QQuickItem\>/g' $FS perl -p -i -e 's/\#include \<QtGui\/QQuickItem\>/\#include \<QtQuick\/QQuickItem\>/g' $FS