summaryrefslogtreecommitdiffstats
path: root/krfb/srvloc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /krfb/srvloc
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krfb/srvloc')
-rw-r--r--krfb/srvloc/getifaddrs.cpp6
-rw-r--r--krfb/srvloc/getifaddrs.h2
-rw-r--r--krfb/srvloc/kinetinterfacewatcher.cpp2
-rw-r--r--krfb/srvloc/kinetinterfacewatcher.h13
-rw-r--r--krfb/srvloc/kserviceregistry.cpp4
-rw-r--r--krfb/srvloc/kserviceregistry.h8
6 files changed, 18 insertions, 17 deletions
diff --git a/krfb/srvloc/getifaddrs.cpp b/krfb/srvloc/getifaddrs.cpp
index 296ca19e..339c599c 100644
--- a/krfb/srvloc/getifaddrs.cpp
+++ b/krfb/srvloc/getifaddrs.cpp
@@ -53,7 +53,7 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
struct ifconf ifc;
int rq_len;
int nifs;
-# define RQ_IFS 4
+# define RTQ_IFS 4
if (fd < 0)
fd = socket (AF_INET, SOCK_DGRAM, 0);
@@ -74,13 +74,13 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
ifc.ifc_len = 0;
if (ioctl (fd, SIOCGIFCONF, &ifc) < 0 || ifc.ifc_len == 0)
{
- rq_len = RQ_IFS * sizeof (struct ifreq);
+ rq_len = RTQ_IFS * sizeof (struct ifreq);
}
else
rq_len = ifc.ifc_len;
}
else
- rq_len = RQ_IFS * sizeof (struct ifreq);
+ rq_len = RTQ_IFS * sizeof (struct ifreq);
/* Read all the interfaces out of the kernel. */
while (1)
diff --git a/krfb/srvloc/getifaddrs.h b/krfb/srvloc/getifaddrs.h
index d0514eca..d169b8e4 100644
--- a/krfb/srvloc/getifaddrs.h
+++ b/krfb/srvloc/getifaddrs.h
@@ -56,7 +56,7 @@ struct kde_ifaddrs
unsigned int ifa_flags; /* Flags as from SIOCGIFFLAGS ioctl. */
struct sockaddr *ifa_addr; /* Network address of this interface. */
- struct sockaddr *ifa_netmask; /* Netmask of this interface. */
+ struct sockaddr *ifa_netmask; /* Nettqmask of this interface. */
union
{
/* At most one of the following two is valid. If the IFF_BROADCAST
diff --git a/krfb/srvloc/kinetinterfacewatcher.cpp b/krfb/srvloc/kinetinterfacewatcher.cpp
index 1e0fa8e6..1963123d 100644
--- a/krfb/srvloc/kinetinterfacewatcher.cpp
+++ b/krfb/srvloc/kinetinterfacewatcher.cpp
@@ -39,7 +39,7 @@ public:
/*
* or all network interfaces.
* @param interface the name of the interface to watch (e.g.'eth0')
- * or TQString::null to watch all interfaces
+ * or TQString() to watch all interfaces
* @param minInterval the minimum interval between two checks in
* seconds. Be careful not to check too often, to
* avoid unneccessary wasting of CPU time
diff --git a/krfb/srvloc/kinetinterfacewatcher.h b/krfb/srvloc/kinetinterfacewatcher.h
index 75d72ef8..d767e597 100644
--- a/krfb/srvloc/kinetinterfacewatcher.h
+++ b/krfb/srvloc/kinetinterfacewatcher.h
@@ -45,23 +45,24 @@ class KInetInterfaceWatcherPrivate;
*/
class KInetInterfaceWatcher : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Creates a new KInetInterfaceWatcher. Before you can use it,
* you must @ref start() it.
*
* @param interface the name of the interface to watch (e.g.'eth0')
- * or TQString::null to watch all interfaces
+ * or TQString() to watch all interfaces
* @param minInterval the minimum interval between two checks in
* seconds. Be careful not to check too often, to
* avoid unneccessary wasting of CPU time
*/
- KInetInterfaceWatcher(const TQString &interface = TQString::null,
+ KInetInterfaceWatcher(const TQString &interface = TQString(),
int minInterval = 60);
/**
* Returns the name of the interface that is being watched.
- * @return the name of the interface, or TQString::null if all
+ * @return the name of the interface, or TQString() if all
* interfaces are watched
*/
TQString interface() const;
@@ -71,14 +72,14 @@ public:
* or all network interfaces. When one of them changed.
* it emits a @ref changed() signal.
* @param interface the name of the interface to watch (e.g.'eth0')
- * or TQString::null to watch all interfaces
+ * or TQString() to watch all interfaces
* @param minInterval the minimum interval between two checks in
* seconds. Be careful not to check too often, to
* avoid unneccessary wasting of CPU time
* @see changed()
* @see stop()
*/
- void start(const TQString &interface = TQString::null,
+ void start(const TQString &interface = TQString(),
int minInterval = 60);
/**
@@ -109,7 +110,7 @@ signals:
* address has changed.
*
* @param interfaceName the name of the interface that is watched,
- * by the emitter, or TQString::null if all
+ * by the emitter, or TQString() if all
* interfaces are being watched
* @see start()
*/
diff --git a/krfb/srvloc/kserviceregistry.cpp b/krfb/srvloc/kserviceregistry.cpp
index f8ab6b51..eac3ac18 100644
--- a/krfb/srvloc/kserviceregistry.cpp
+++ b/krfb/srvloc/kserviceregistry.cpp
@@ -119,7 +119,7 @@ bool KServiceRegistry::registerService(const TQString &serviceURL,
while (it != attributes.end()) {
if (!s.isEmpty())
s += ",";
- s += TQString("(%1=%2)").arg(it.key()).arg(it.data());
+ s += TQString("(%1=%2)").tqarg(it.key()).tqarg(it.data());
it++;
}
return registerService(serviceURL, s, lifetime);
@@ -140,7 +140,7 @@ TQString KServiceRegistry::encodeAttributeValue(const TQString &value) {
SLPFree(n);
return r;
}
- return TQString::null;
+ return TQString();
}
#else
diff --git a/krfb/srvloc/kserviceregistry.h b/krfb/srvloc/kserviceregistry.h
index 8cd965e6..05e88780 100644
--- a/krfb/srvloc/kserviceregistry.h
+++ b/krfb/srvloc/kserviceregistry.h
@@ -78,7 +78,7 @@ class KServiceRegistryPrivate;
* <pre>
* KServiceRegistry ksr;
* KInetAddress kia = KInetAddress->getLocalAddress();
- * ksr.registerService(TQString("service:remotedesktop.kde:vnc://%1:0").arg(kia->nodeName()),
+ * ksr.registerService(TQString("service:remotedesktop.kde:vnc://%1:0").tqarg(kia->nodeName()),
* "(type=shared)");
* delete kia;
* </pre>
@@ -91,10 +91,10 @@ class KServiceRegistry {
/**
* Creates a new service registration instance for the given
* language.
- * @param lang the language as two letter code, or TQString::null for the
+ * @param lang the language as two letter code, or TQString() for the
* system default
*/
- KServiceRegistry(const TQString &lang = TQString::null);
+ KServiceRegistry(const TQString &lang = TQString());
virtual ~KServiceRegistry();
/**
@@ -133,7 +133,7 @@ class KServiceRegistry {
* SA daemon (slpd) is running.
*/
bool registerService(const TQString &serviceURL,
- TQString attributes = TQString::null,
+ TQString attributes = TQString(),
unsigned short lifetime = 0);
/**