From 5fd1d5d0dec6089322168d63472cab761db3a723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Fri, 30 Aug 2013 00:24:23 +0200 Subject: [PATCH] Improve porting scripts --- tools/port-plasma2.sh | 15 ++++++++++++--- tools/port-qtquick.sh | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tools/port-plasma2.sh b/tools/port-plasma2.sh index 2e6548913..6bfcceb59 100755 --- a/tools/port-plasma2.sh +++ b/tools/port-plasma2.sh @@ -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\.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 +#exit # Qt 4.7, QtQuick 1.0 and QtQuick 1.1 imports become QtQuick 2.0 @@ -94,8 +98,13 @@ for FS in `find $PWD -name '*.h' -o -name '*.cpp'`; do perl -p -i -e 's/Plasma\:\:Horizontal/Plasma::Types::Horizontal/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 - - + + # 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 perl -p -i -e 's/Plasma\:\:Floating/Plasma::Types::Floating/g' $FS perl -p -i -e 's/Plasma\:\:Desktop/Plasma::Types::Desktop/g' $FS diff --git a/tools/port-qtquick.sh b/tools/port-qtquick.sh index 7c20d115e..b894f1dbf 100755 --- a/tools/port-qtquick.sh +++ b/tools/port-qtquick.sh @@ -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/QGraphicsObject/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/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/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/QGraphicsSceneHoverEvent/QHoverEvent/g' $FS + perl -p -i -e 's/QWheelEventEvent/QWheelEvent/g' $FS # Fix up includes perl -p -i -e 's/\#include \/\#include \/g' $FS