diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /dnssd | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dnssd')
-rw-r--r-- | dnssd/domainbrowser.cpp | 2 | ||||
-rw-r--r-- | dnssd/domainbrowser.h | 2 | ||||
-rw-r--r-- | dnssd/query.h | 2 | ||||
-rw-r--r-- | dnssd/remoteservice.cpp | 4 | ||||
-rw-r--r-- | dnssd/responder.cpp | 4 | ||||
-rw-r--r-- | dnssd/responder.h | 2 | ||||
-rw-r--r-- | dnssd/sdevent.h | 8 | ||||
-rw-r--r-- | dnssd/servicebase.cpp | 8 | ||||
-rw-r--r-- | dnssd/servicebrowser.cpp | 2 | ||||
-rw-r--r-- | dnssd/servicebrowser.h | 2 |
10 files changed, 18 insertions, 18 deletions
diff --git a/dnssd/domainbrowser.cpp b/dnssd/domainbrowser.cpp index 8a24f11b6..6cab652ac 100644 --- a/dnssd/domainbrowser.cpp +++ b/dnssd/domainbrowser.cpp @@ -125,7 +125,7 @@ void DomainBrowser::startBrowse() void DomainBrowser::gotNewDomain(const TQString& domain) { - if (d->m_domains.contains(domain)) return; + if (d->m_domains.tqcontains(domain)) return; d->m_domains.append(domain); emit domainAdded(domain); } diff --git a/dnssd/domainbrowser.h b/dnssd/domainbrowser.h index a77849240..199163cb1 100644 --- a/dnssd/domainbrowser.h +++ b/dnssd/domainbrowser.h @@ -38,7 +38,7 @@ class DomainBrowserPrivate; @short Class used to provide current list of domains for browsing. @author Jakub Stachowski */ -class KDNSSD_EXPORT DomainBrowser : public QObject +class KDNSSD_EXPORT DomainBrowser : public TQObject { Q_OBJECT public: diff --git a/dnssd/query.h b/dnssd/query.h index 90e9fe19d..42dae32e2 100644 --- a/dnssd/query.h +++ b/dnssd/query.h @@ -36,7 +36,7 @@ name, either multicast or unicast DNS will be used. @short Class that represents service query in one domain. @author Jakub Stachowski */ -class KDNSSD_EXPORT Query : public QObject +class KDNSSD_EXPORT Query : public TQObject { Q_OBJECT public: diff --git a/dnssd/remoteservice.cpp b/dnssd/remoteservice.cpp index 62ec01eb0..2f5bc5927 100644 --- a/dnssd/remoteservice.cpp +++ b/dnssd/remoteservice.cpp @@ -166,7 +166,7 @@ void RemoteService::virtual_hook(int, void*) TQDataStream & operator<< (TQDataStream & s, const RemoteService & a) { s << (static_cast<ServiceBase>(a)); - Q_INT8 resolved = a.d->m_resolved ? 1:0; + TQ_INT8 resolved = a.d->m_resolved ? 1:0; s << resolved; return s; } @@ -177,7 +177,7 @@ TQDataStream & operator>> (TQDataStream & s, RemoteService & a) #ifdef HAVE_DNSSD a.d->stop(); #endif - Q_INT8 resolved; + TQ_INT8 resolved; operator>>(s,(static_cast<ServiceBase&>(a))); s >> resolved; a.d->m_resolved = (resolved == 1); diff --git a/dnssd/responder.cpp b/dnssd/responder.cpp index d85358429..31f37598d 100644 --- a/dnssd/responder.cpp +++ b/dnssd/responder.cpp @@ -72,7 +72,7 @@ Responder& Responder::self() void Responder::process() { - qApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); + tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); } #ifdef HAVE_DNSSD @@ -88,7 +88,7 @@ AvahiClientState Responder::state() const bool domainIsLocal(const TQString& domain) { - return domain.section('.',-1,-1).lower()=="local"; + return TQString(domain.section('.',-1,-1)).lower()=="local"; } TQCString domainToDNS(const TQString &domain) diff --git a/dnssd/responder.h b/dnssd/responder.h index ae909b59b..187683c7b 100644 --- a/dnssd/responder.h +++ b/dnssd/responder.h @@ -41,7 +41,7 @@ This class should not be used directly. @author Jakub Stachowski @short Internal class wrapping avahi client */ -class Responder : public QObject +class Responder : public TQObject { Q_OBJECT diff --git a/dnssd/sdevent.h b/dnssd/sdevent.h index 90f4a64d5..e609a4901 100644 --- a/dnssd/sdevent.h +++ b/dnssd/sdevent.h @@ -30,13 +30,13 @@ namespace DNSSD enum Operation { SD_ERROR = 101,SD_ADDREMOVE, SD_PUBLISH, SD_RESOLVE}; -class ErrorEvent : public QCustomEvent +class ErrorEvent : public TQCustomEvent { public: ErrorEvent() : TQCustomEvent(TQEvent::User+SD_ERROR) {} }; -class AddRemoveEvent : public QCustomEvent +class AddRemoveEvent : public TQCustomEvent { public: enum Operation { Add, Remove }; @@ -51,7 +51,7 @@ public: const TQString m_domain; }; -class PublishEvent : public QCustomEvent +class PublishEvent : public TQCustomEvent { public: PublishEvent(bool ok) : TQCustomEvent(TQEvent::User+SD_PUBLISH), m_ok(ok) @@ -60,7 +60,7 @@ public: bool m_ok; }; -class ResolveEvent : public QCustomEvent +class ResolveEvent : public TQCustomEvent { public: ResolveEvent(const TQString& hostname, unsigned short port, diff --git a/dnssd/servicebase.cpp b/dnssd/servicebase.cpp index 52d18cca3..544b56fbb 100644 --- a/dnssd/servicebase.cpp +++ b/dnssd/servicebase.cpp @@ -51,14 +51,14 @@ void ServiceBase::decode(const TQString& name) } else { // normal service or domain TQString decoded_name=name; decoded_name=decoded_name.replace("\\\\","\\"); - int i = decoded_name.find(TQRegExp("[^\\\\]\\.")); + int i = decoded_name.tqfind(TQRegExp("[^\\\\]\\.")); if (i==-1) return; // first find service name rest = decoded_name.mid(i+2); m_serviceName=decoded_name.left(i+1).replace("\\.","."); } m_type = rest.section('.',0,1); // does it really have a type? - if (m_type[0]=='_' && m_type[m_type.find('.')+1]=='_') + if (m_type[0]=='_' && m_type[m_type.tqfind('.')+1]=='_') m_domain = rest.section('.',2,-1,TQString::SectionIncludeTrailingSep); else { m_type=""; @@ -100,13 +100,13 @@ void ServiceBase::virtual_hook(int, void*) TQDataStream & operator<< (TQDataStream & s, const ServiceBase & a) { - s << a.m_serviceName << a.m_type << a.m_domain << a.m_hostName << Q_INT16(a.m_port) << a.m_textData; + s << a.m_serviceName << a.m_type << a.m_domain << a.m_hostName << TQ_INT16(a.m_port) << a.m_textData; return s; } TQDataStream & operator>> (TQDataStream & s, ServiceBase & a) { - Q_INT16 port; + TQ_INT16 port; s >> a.m_serviceName >> a.m_type >> a.m_domain >> a.m_hostName >> port >> a.m_textData; a.m_port = port; return s; diff --git a/dnssd/servicebrowser.cpp b/dnssd/servicebrowser.cpp index 3c64ffe66..2ca87ef86 100644 --- a/dnssd/servicebrowser.cpp +++ b/dnssd/servicebrowser.cpp @@ -108,7 +108,7 @@ const DomainBrowser* ServiceBrowser::browsedDomains() const void ServiceBrowser::serviceResolved(bool success) { - TQObject* sender_obj = const_cast<TQObject*>(sender()); + TQObject* sender_obj = const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender())); RemoteService* svr = static_cast<RemoteService*>(sender_obj); disconnect(svr,TQT_SIGNAL(resolved(bool)),this,TQT_SLOT(serviceResolved(bool))); TQValueList<RemoteService::Ptr>::Iterator it = d->m_duringResolve.begin(); diff --git a/dnssd/servicebrowser.h b/dnssd/servicebrowser.h index fac4d407c..cb270dea8 100644 --- a/dnssd/servicebrowser.h +++ b/dnssd/servicebrowser.h @@ -51,7 +51,7 @@ to constructor, domains configured by user will be searched. @author Jakub Stachowski @short Browsing for specific type of services or all available service types */ -class KDNSSD_EXPORT ServiceBrowser : public QObject +class KDNSSD_EXPORT ServiceBrowser : public TQObject { Q_OBJECT public: |