File: port-kdebug.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 (18 lines) | stat: -rwxr-xr-x 763 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# kDebug() becomes qDebug() in cpp files

for FS in `find $PWD  -name '*.h' -o -name '*.cpp'`; do
     perl -p -i -e 's/\#include \<KDebug\>/\#include \<QDebug\>/g' $FS
     perl -p -i -e 's/\#include \<KDebug\>/\#include \<QDebug\>/g' $FS
     perl -p -i -e 's/\#include \<KDebug\>/\#include \<QDebug\>/g' $FS
     perl -p -i -e 's/\#include \<kdebug\.h\>/\#include \<QDebug\>/g' $FS
     perl -p -i -e 's/\#include \"kdebug\.h\"/\#include \<QDebug\>/g' $FS
     perl -p -i -e 's/kDebug\(\)/qDebug()/g' $FS
    perl -p -i -e 's/kWarning\(\)/qWarning()/g' $FS
#
#     perl -p -i -e 's/kDebug\(250\)/\/\/qDebug()/g' $FS
      perl -p -i -e 's/kDebug\(7024\)/qCDebug(KUISERVER)/g' $FS
#     perl -p -i -e 's/kDebug\(kdbg_code\)/\/\/qDebug()/g' $FS
done