File: port-includes.sh

package info (click to toggle)
plasma-framework 5.28.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,168 kB
  • ctags: 3,945
  • sloc: cpp: 28,840; sh: 534; python: 477; ruby: 117; xml: 110; php: 27; makefile: 5
file content (8 lines) | stat: -rwxr-xr-x 349 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
#!/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
    perl -p -i -e 's/#include\s+<KDE\/(\w*)>/#include <\1>/g' $FS
done