diff options
Diffstat (limited to 'plugins/zeroconf/avahiservice.cpp')
-rw-r--r-- | plugins/zeroconf/avahiservice.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/zeroconf/avahiservice.cpp b/plugins/zeroconf/avahiservice.cpp index a190d8e..714d92a 100644 --- a/plugins/zeroconf/avahiservice.cpp +++ b/plugins/zeroconf/avahiservice.cpp @@ -19,7 +19,7 @@ #include <util/log.h> #include <torrent/peerid.h> #include <avahi-common/watch.h> -#include <avahi-qt3/qt-watch.h> +#include <avahi-qt3/tqt-watch.h> #include "localbrowser.h" #include "avahiservice.h" @@ -66,16 +66,16 @@ namespace kt } } - const char* name = avahi_strdup(QString("%1__%2%3").arg(service->id).arg((rand() % 26) + 65).arg((rand() % 26) + 65).ascii()); + const char* name = avahi_strdup(TQString("%1__%2%3").tqarg(service->id).tqarg((rand() % 26) + 65).tqarg((rand() % 26) + 65).ascii()); const char* type = avahi_strdup("_bittorrent._tcp"); - const char* subtype = avahi_strdup(QString("_" + service->infoHash + "._sub._bittorrent._tcp").ascii()); + const char* subtype = avahi_strdup(TQString("_" + service->infoHash + "._sub._bittorrent._tcp").ascii()); if (avahi_entry_group_add_service( service->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, (AvahiPublishFlags)0, name, type, NULL, NULL, service->port, NULL)) { if (avahi_client_errno(c) != -8) - Out(SYS_ZCO|LOG_DEBUG) << QString("ZC: Failed to add the service (%i).").arg(avahi_client_errno(c)) << endl; + Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service (%i).").tqarg(avahi_client_errno(c)) << endl; else publish_service(service, c); return; @@ -85,7 +85,7 @@ namespace kt service->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, (AvahiPublishFlags)0, name, type, NULL, subtype)) { - Out(SYS_ZCO|LOG_DEBUG) << QString("ZC: Failed to add the service subtype (%i).").arg( avahi_client_errno(c)) << endl; + Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service subtype (%i).").tqarg( avahi_client_errno(c)) << endl; return; } @@ -166,10 +166,10 @@ namespace kt { AvahiService* service = reinterpret_cast<AvahiService*>(userdata); - QString realname = QString(name); + TQString realname = TQString(name); realname.truncate(realname.length() - 5); - if (service->id != QString(realname)) + if (service->id != TQString(realname)) { char a[AVAHI_ADDRESS_STR_MAX]; avahi_address_snprint(a, sizeof(a), address); @@ -214,7 +214,7 @@ namespace kt } case AVAHI_BROWSER_REMOVE: { - QString realname = QString(name); + TQString realname = TQString(name); realname.truncate(realname.length() - 5); LocalBrowser::remove(bt::PeerID(realname.ascii())); @@ -317,7 +317,7 @@ namespace kt return false; } - if (!(browser = avahi_service_browser_new(listener, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, avahi_strdup(QString("_" + infoHash + "._sub._bittorrent._tcp").ascii()), NULL, (AvahiLookupFlags)0, browser_callback, this))) + if (!(browser = avahi_service_browser_new(listener, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, avahi_strdup(TQString("_" + infoHash + "._sub._bittorrent._tcp").ascii()), NULL, (AvahiLookupFlags)0, browser_callback, this))) { Out(SYS_ZCO|LOG_DEBUG) << "ZC: Failed to create a service browser." << endl; stop(); |