From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- dnssd/Mainpage.dox | 4 ++-- dnssd/Makefile.am | 2 +- dnssd/README | 2 +- dnssd/domainbrowser.cpp | 2 +- dnssd/domainbrowser.h | 2 +- dnssd/query.h | 2 +- dnssd/remoteservice.cpp | 4 ++-- dnssd/responder.cpp | 2 +- dnssd/responder.h | 2 +- dnssd/servicebase.cpp | 16 ++++++++-------- dnssd/servicebrowser.cpp | 6 +++--- dnssd/servicebrowser.h | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) (limited to 'dnssd') diff --git a/dnssd/Mainpage.dox b/dnssd/Mainpage.dox index 81ab7c98b..5132ce0db 100644 --- a/dnssd/Mainpage.dox +++ b/dnssd/Mainpage.dox @@ -11,12 +11,12 @@ Apple's developer documentation provides lots of information about Bonjour in its Bonjour overview. If you are writing an application that wants to discover services on the network, -use DNSSD::ServiceBrowser. You can also find available service types using ServiceTypeBrowser. +use DNSSD::ServiceBrowser. You can also tqfind available service types using ServiceTypeBrowser. If you want to announce the availability of a service provided by your application, use DNSSD::PublicService. -DNSSD::DomainBrowser allows you to find domains (other than the local one) recommended +DNSSD::DomainBrowser allows you to tqfind domains (other than the local one) recommended for browsing or publishing to. Note that DNSSD::ServiceBrowser::isAvailable() provides information about the availability diff --git a/dnssd/Makefile.am b/dnssd/Makefile.am index 268e72a5d..19701045b 100644 --- a/dnssd/Makefile.am +++ b/dnssd/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = -I$(top_srcdir) $(all_includes) $(AVAHI_CFLAGS) # these are the headers for your project noinst_HEADERS = sdevent.h -# let automoc handle all of the meta source files (moc) +# let autotqmoc handle all of the meta source files (tqmoc) METASOURCES = AUTO lib_LTLIBRARIES = libkdnssd.la diff --git a/dnssd/README b/dnssd/README index c797b2939..d30b70745 100644 --- a/dnssd/README +++ b/dnssd/README @@ -1,7 +1,7 @@ Checklist to ensure that zeroconf will work: 1) Install Avahi, at least version 0.3 -2) compile kdnssd-avahi and install it to replace 'stub' libkdnssd.so provided by kdelibs +2) compile kdnssd-avahi and install it to tqreplace 'stub' libkdnssd.so provided by kdelibs 3) check /etc/nsswitch.conf and ensure that there is 'mdns' before 'dns' in line starting with 'host:'. It should be something like: host: files mdns dns 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(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(a))); s >> resolved; a.d->m_resolved = (resolved == 1); diff --git a/dnssd/responder.cpp b/dnssd/responder.cpp index d85358429..afa4b83c5 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 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/servicebase.cpp b/dnssd/servicebase.cpp index 52d18cca3..d15b6c0d2 100644 --- a/dnssd/servicebase.cpp +++ b/dnssd/servicebase.cpp @@ -34,7 +34,7 @@ ServiceBase::~ServiceBase() TQString ServiceBase::encode() { - return m_serviceName.replace(".","\\.").replace("\\","\\\\") + TQString(".") + m_type + + return m_serviceName.tqreplace(".","\\.").tqreplace("\\","\\\\") + TQString(".") + m_type + TQString(".") + m_domain; } @@ -50,15 +50,15 @@ void ServiceBase::decode(const TQString& name) rest=name; } else { // normal service or domain TQString decoded_name=name; - decoded_name=decoded_name.replace("\\\\","\\"); - int i = decoded_name.find(TQRegExp("[^\\\\]\\.")); - if (i==-1) return; // first find service name + decoded_name=decoded_name.tqreplace("\\\\","\\"); + int i = decoded_name.tqfind(TQRegExp("[^\\\\]\\.")); + if (i==-1) return; // first tqfind service name rest = decoded_name.mid(i+2); - m_serviceName=decoded_name.left(i+1).replace("\\.","."); + m_serviceName=decoded_name.left(i+1).tqreplace("\\.","."); } 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..340053622 100644 --- a/dnssd/servicebrowser.cpp +++ b/dnssd/servicebrowser.cpp @@ -138,7 +138,7 @@ void ServiceBrowser::startBrowse() void ServiceBrowser::gotNewService(RemoteService::Ptr svr) { - if (findDuplicate(svr)==(d->m_services.end())) { + if (tqfindDuplicate(svr)==(d->m_services.end())) { if (d->m_flags & AutoResolve) { connect(svr,TQT_SIGNAL(resolved(bool )),this,TQT_SLOT(serviceResolved(bool ))); d->m_duringResolve+=svr; @@ -152,7 +152,7 @@ void ServiceBrowser::gotNewService(RemoteService::Ptr svr) void ServiceBrowser::gotRemoveService(RemoteService::Ptr svr) { - TQValueList::Iterator it = findDuplicate(svr); + TQValueList::Iterator it = tqfindDuplicate(svr); if (it!=(d->m_services.end())) { emit serviceRemoved(*it); d->m_services.remove(it); @@ -212,7 +212,7 @@ const TQValueList& ServiceBrowser::services() const void ServiceBrowser::virtual_hook(int, void*) {} -TQValueList::Iterator ServiceBrowser::findDuplicate(RemoteService::Ptr src) +TQValueList::Iterator ServiceBrowser::tqfindDuplicate(RemoteService::Ptr src) { TQValueList::Iterator itEnd = d->m_services.end(); for (TQValueList::Iterator it = d->m_services.begin(); it!=itEnd; ++it) diff --git a/dnssd/servicebrowser.h b/dnssd/servicebrowser.h index fac4d407c..80fd4695b 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: @@ -213,7 +213,7 @@ private: bool allFinished(); void init(const TQStringList&, DomainBrowser*, int); - TQValueList::Iterator findDuplicate(RemoteService::Ptr src); + TQValueList::Iterator tqfindDuplicate(RemoteService::Ptr src); private slots: void serviceResolved(bool success); void gotNewService(DNSSD::RemoteService::Ptr); -- cgit v1.2.1