plasma-framework/tools/port-includes.sh
Aleix Pol d44b5684ce Improve porting to Qt/KF5 scripts
Improve the porting scripts in plasma-framework (maybe they should be in
kdesdk?).
- Add a script to remove the Qt module part of an include (<QtGui/QLabel>
becomes <QLabel>).
- Add more cases when porting cmake files, adding the Qt libraries as well.

REVIEW: 113300
2013-10-19 00:33:04 +02:00

8 lines
283 B
Bash
Executable File

#!/bin/sh
# it will remove the module prefix in Qt includes, it's usually a problem
# since many classes have changed module between Qt4 and Qt5
for FS in `find $PWD -type f -name '*.h' -or -name '*.cpp'`; do
perl -p -i -e 's/#include\s+<Qt\w+\/(\w*)>/#include <\1>/g' $FS
done