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

# Port all qDebug() statements to qCDebug()
# change all QDebug includes to QLoggingCategory

# Note: don't forget to put the right debug area here,
# i.e. replace SYSTEMTRAY with whatever you put into
# the Q_LOGGING_CATEGORY(SYSTEMTRAY, "systemtray") macro


for FS in `find $PWD  -name '*.h' -o -name '*.cpp'`; do
    perl -p -i -e 's/qDebug\(\)/qCDebug(SYSTEMTRAY)/g' $FS
    perl -p -i -e 's/\#include \<QDebug\>/\#include \<QLoggingCategory\>/g' $FS
done