From 082e6c65e5507649e2b188f40dd6d1e55456cfdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Wed, 20 Nov 2013 04:37:47 +0100 Subject: [PATCH] Small example how to dumb-port from qDebug to qCDebug --- tools/port-qcdebug.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tools/port-qcdebug.sh diff --git a/tools/port-qcdebug.sh b/tools/port-qcdebug.sh new file mode 100755 index 000000000..99b7f7c63 --- /dev/null +++ b/tools/port-qcdebug.sh @@ -0,0 +1,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 \/\#include \/g' $FS +done