diff options
Diffstat (limited to 'krfb/srvloc/kserviceregistry.cpp')
-rw-r--r-- | krfb/srvloc/kserviceregistry.cpp | 40 |
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(","); } |