diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
commit | 70b9eea2ba01c3691497f49e4c45cb070c16193c (patch) | |
tree | 9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/src/utils.cpp | |
parent | 998c1384ace4ae4655997c181fa33242148cd0a4 (diff) | |
download | tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip |
TQt4 port kradio
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/src/utils.cpp')
-rw-r--r-- | kradio3/src/utils.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kradio3/src/utils.cpp b/kradio3/src/utils.cpp index e54f19d..fa60b02 100644 --- a/kradio3/src/utils.cpp +++ b/kradio3/src/utils.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qregexp.h> +#include <tqregexp.h> #include "include/utils.h" #include <linux/soundcard.h> @@ -23,47 +23,47 @@ //const char *mixerChannelNames[] = SOUND_DEVICE_NAMES; -QString XMLEscape (const QString &s) +TQString XMLEscape (const TQString &s) { - QString c = s; - c.replace(QRegExp("&"), "&"); - c.replace(QRegExp("<"), "<"); - c.replace(QRegExp(">"), ">"); - c.replace(QRegExp("\""), """); - c.replace(QRegExp("'"), "'"); + TQString c = s; + c.tqreplace(TQRegExp("&"), "&"); + c.tqreplace(TQRegExp("<"), "<"); + c.tqreplace(TQRegExp(">"), ">"); + c.tqreplace(TQRegExp("\""), """); + c.tqreplace(TQRegExp("'"), "'"); return c; } -QString xmlOpenTag (const QString &tag, bool nl) +TQString xmlOpenTag (const TQString &tag, bool nl) { - return "<" + tag + ">" + (nl ? QString("\n") : QString::null); + return "<" + tag + ">" + (nl ? TQString("\n") : TQString()); } -QString xmlCloseTag (const QString &tag, bool nl) +TQString xmlCloseTag (const TQString &tag, bool nl) { - return "</" + tag + ">" + (nl ? QString("\n") : QString::null); + return "</" + tag + ">" + (nl ? TQString("\n") : TQString()); } -QString xmlTag (const QString &tag, int v, bool nl) +TQString xmlTag (const TQString &tag, int v, bool nl) { - return xmlTag (tag, QString().setNum(v), nl); + return xmlTag (tag, TQString().setNum(v), nl); } -QString xmlTag (const QString &tag, float f, bool nl) +TQString xmlTag (const TQString &tag, float f, bool nl) { - return xmlTag(tag, QString().setNum(f), nl); + return xmlTag(tag, TQString().setNum(f), nl); } -QString xmlTag (const QString &tag, const QString &data, bool nl) +TQString xmlTag (const TQString &tag, const TQString &data, bool nl) { return xmlOpenTag(tag, false) + XMLEscape(data) + xmlCloseTag(tag, false) - + (nl ? QString("\n") : QString::null); + + (nl ? TQString("\n") : TQString()); } |