summaryrefslogtreecommitdiffstats
path: root/krfb/srvloc/kserviceregistry.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /krfb/srvloc/kserviceregistry.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krfb/srvloc/kserviceregistry.cpp')
-rw-r--r--krfb/srvloc/kserviceregistry.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/krfb/srvloc/kserviceregistry.cpp b/krfb/srvloc/kserviceregistry.cpp
index 49e3de15..f8ab6b51 100644
--- a/krfb/srvloc/kserviceregistry.cpp
+++ b/krfb/srvloc/kserviceregistry.cpp
@@ -31,14 +31,14 @@
class KServiceRegistryPrivate {
public:
- KServiceRegistryPrivate(const QString &lang) :
+ KServiceRegistryPrivate(const TQString &lang) :
m_opened(false),
m_lang(lang) {
}
bool ensureOpen();
bool m_opened;
- QString m_lang;
+ TQString m_lang;
SLPHandle m_handle;
friend void KServiceRegistryRegReport(SLPHandle slp,
@@ -57,7 +57,7 @@ void KServiceRegistryRegReport(SLPHandle,
}
-KServiceRegistry::KServiceRegistry(const QString &lang) {
+KServiceRegistry::KServiceRegistry(const TQString &lang) {
d = new KServiceRegistryPrivate(lang);
}
@@ -86,8 +86,8 @@ bool KServiceRegistry::available() {
return d->ensureOpen();
}
-bool KServiceRegistry::registerService(const QString &serviceURL,
- QString attributes,
+bool KServiceRegistry::registerService(const TQString &serviceURL,
+ TQString attributes,
unsigned short lifetime) {
if (!d->ensureOpen())
return false;
@@ -108,24 +108,24 @@ bool KServiceRegistry::registerService(const QString &serviceURL,
return d->m_cbSuccess;
}
-bool KServiceRegistry::registerService(const QString &serviceURL,
- QMap<QString,QString> attributes,
+bool KServiceRegistry::registerService(const TQString &serviceURL,
+ TQMap<TQString,TQString> attributes,
unsigned short lifetime) {
if (!d->ensureOpen())
return false;
// TODO: encode strings in map?
- QString s;
- QMap<QString,QString>::iterator it = attributes.begin();
+ TQString s;
+ TQMap<TQString,TQString>::iterator it = attributes.begin();
while (it != attributes.end()) {
if (!s.isEmpty())
s += ",";
- s += QString("(%1=%2)").arg(it.key()).arg(it.data());
+ s += TQString("(%1=%2)").arg(it.key()).arg(it.data());
it++;
}
return registerService(serviceURL, s, lifetime);
}
-void KServiceRegistry::unregisterService(const QString &serviceURL) {
+void KServiceRegistry::unregisterService(const TQString &serviceURL) {
if (!d->m_opened)
return;
SLPDereg(d->m_handle, serviceURL.latin1(),
@@ -133,19 +133,19 @@ void KServiceRegistry::unregisterService(const QString &serviceURL) {
d);
}
-QString KServiceRegistry::encodeAttributeValue(const QString &value) {
+TQString KServiceRegistry::encodeAttributeValue(const TQString &value) {
char *n;
if (SLPEscape(value.latin1(), &n, SLP_TRUE) == SLP_OK) {
- QString r(n);
+ TQString r(n);
SLPFree(n);
return r;
}
- return QString::null;
+ return TQString::null;
}
#else
-KServiceRegistry::KServiceRegistry(const QString &lang) :
+KServiceRegistry::KServiceRegistry(const TQString &lang) :
d(0) {
}
@@ -156,24 +156,24 @@ bool KServiceRegistry::available() {
return false;
}
-bool KServiceRegistry::registerService(const QString &, QString, unsigned short ) {
+bool KServiceRegistry::registerService(const TQString &, TQString, unsigned short ) {
return false;
}
-bool KServiceRegistry::registerService(const QString &, QMap<QString,QString>, unsigned short) {
+bool KServiceRegistry::registerService(const TQString &, TQMap<TQString,TQString>, unsigned short) {
return false;
}
-void KServiceRegistry::unregisterService(const QString &) {
+void KServiceRegistry::unregisterService(const TQString &) {
}
-QString KServiceRegistry::encodeAttributeValue(const QString &value) {
+TQString KServiceRegistry::encodeAttributeValue(const TQString &value) {
return value;
}
#endif
-QString KServiceRegistry::createCommaList(const QStringList &values) {
+TQString KServiceRegistry::createCommaList(const TQStringList &values) {
return values.join(",");
}