summaryrefslogtreecommitdiffstats
path: root/kradio3/src/utils.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
commit70b9eea2ba01c3691497f49e4c45cb070c16193c (patch)
tree9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/src/utils.cpp
parent998c1384ace4ae4655997c181fa33242148cd0a4 (diff)
downloadtderadio-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.cpp36
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("&"), "&amp;");
- c.replace(QRegExp("<"), "&lt;");
- c.replace(QRegExp(">"), "&gt;");
- c.replace(QRegExp("\""), "&quot;");
- c.replace(QRegExp("'"), "&apos;");
+ TQString c = s;
+ c.tqreplace(TQRegExp("&"), "&amp;");
+ c.tqreplace(TQRegExp("<"), "&lt;");
+ c.tqreplace(TQRegExp(">"), "&gt;");
+ c.tqreplace(TQRegExp("\""), "&quot;");
+ c.tqreplace(TQRegExp("'"), "&apos;");
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());
}