summaryrefslogtreecommitdiffstats
path: root/krfb/kinetd/kinetd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krfb/kinetd/kinetd.cpp')
-rw-r--r--krfb/kinetd/kinetd.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/krfb/kinetd/kinetd.cpp b/krfb/kinetd/kinetd.cpp
index 2f4acadd..5e12ca08 100644
--- a/krfb/kinetd/kinetd.cpp
+++ b/krfb/kinetd/kinetd.cpp
@@ -102,7 +102,7 @@ void PortListener::loadConfig(KService::Ptr s) {
m_valid = true;
m_autoPortRange = 0;
m_enabled = true;
- m_argument = TQString::null;
+ m_argument = TQString();
m_multiInstance = false;
TQVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl,
@@ -154,7 +154,7 @@ void PortListener::loadConfig(KService::Ptr s) {
m_registerService = true;
}
else {
- m_serviceURL = TQString::null;
+ m_serviceURL = TQString();
m_registerService = false;
}
if (vsattributes.isValid()) {
@@ -181,7 +181,7 @@ void PortListener::loadConfig(KService::Ptr s) {
m_dnssdRegister = false;
- m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime);
+ m_slpLifetimeEnd = TQDateTime::tqcurrentDateTime().addSecs(m_serviceLifetime);
m_defaultPortBase = m_portBase;
m_defaultAutoPortRange = m_autoPortRange;
@@ -195,7 +195,7 @@ void PortListener::loadConfig(KService::Ptr s) {
TQDateTime nullTime;
m_expirationTime = m_config->readDateTimeEntry("enabled_expiration_"+m_serviceName,
&nullTime);
- if ((!m_expirationTime.isNull()) && (m_expirationTime < TQDateTime::currentDateTime()))
+ if ((!m_expirationTime.isNull()) && (m_expirationTime < TQDateTime::tqcurrentDateTime()))
m_enabled = false;
m_registerService = m_config->readBoolEntry("enabled_srvreg_"+m_serviceName,
m_registerService);
@@ -210,7 +210,7 @@ void PortListener::accepted(KSocket *sock) {
}
KExtendedSocket::resolve(ksa, host, port);
KNotifyClient::event("IncomingConnection",
- i18n("Connection from %1").arg(host));
+ i18n("Connection from %1").tqarg(host));
delete ksa;
if ((!m_enabled) ||
@@ -226,9 +226,9 @@ void PortListener::accepted(KSocket *sock) {
m_process << m_execPath << m_argument << TQString::number(sock->socket());
if (!m_process.start(KProcess::DontCare)) {
KNotifyClient::event("ProcessFailed",
- i18n("Call \"%1 %2 %3\" failed").arg(m_execPath)
- .arg(m_argument)
- .arg(sock->socket()));
+ i18n("Call \"%1 %2 %3\" failed").tqarg(m_execPath)
+ .tqarg(m_argument)
+ .tqarg(sock->socket()));
}
delete sock;
@@ -257,11 +257,11 @@ TQStringList PortListener::processServiceTemplate(const TQString &a) {
TQString hostName = address->nodeName();
KUser u;
TQString x = a; // replace does not work in const TQString. Why??
- l.append(x.replace(TQRegExp("%h"), KServiceRegistry::encodeAttributeValue(hostName))
- .replace(TQRegExp("%p"), TQString::number(m_port))
- .replace(TQRegExp("%u"), KServiceRegistry::encodeAttributeValue(u.loginName()))
- .replace(TQRegExp("%i"), KServiceRegistry::encodeAttributeValue(m_uuid))
- .replace(TQRegExp("%f"), KServiceRegistry::encodeAttributeValue(u.fullName())));
+ l.append(x.tqreplace(TQRegExp("%h"), KServiceRegistry::encodeAttributeValue(hostName))
+ .tqreplace(TQRegExp("%p"), TQString::number(m_port))
+ .tqreplace(TQRegExp("%u"), KServiceRegistry::encodeAttributeValue(u.loginName()))
+ .tqreplace(TQRegExp("%i"), KServiceRegistry::encodeAttributeValue(m_uuid))
+ .tqreplace(TQRegExp("%f"), KServiceRegistry::encodeAttributeValue(u.fullName())));
}
return l;
}
@@ -356,7 +356,7 @@ void PortListener::setServiceRegistrationEnabledInternal(bool e) {
}
m_serviceRegistered = true;
// make lifetime 30s shorter, because the timeout is not precise
- m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime-30);
+ m_slpLifetimeEnd = TQDateTime::tqcurrentDateTime().addSecs(m_serviceLifetime-30);
} else {
TQStringList::Iterator it = m_registeredServiceURLs.begin();
while (it != m_registeredServiceURLs.end())
@@ -383,7 +383,7 @@ void PortListener::dnssdRegister(bool e) {
}
void PortListener::refreshRegistration() {
- if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < TQDateTime::currentDateTime())) {
+ if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < TQDateTime::tqcurrentDateTime())) {
setServiceRegistrationEnabledInternal(false);
setServiceRegistrationEnabledInternal(true);
}
@@ -458,7 +458,7 @@ void KInetD::expirationTimer() {
void KInetD::setExpirationTimer() {
TQDateTime nextEx = getNextExpirationTime(); // disables expired portlistener!
if (!nextEx.isNull())
- m_expirationTimer.start(TQDateTime::currentDateTime().secsTo(nextEx)*1000 + 30000,
+ m_expirationTimer.start(TQDateTime::tqcurrentDateTime().secsTo(nextEx)*1000 + 30000,
false);
else
m_expirationTimer.stop();
@@ -475,7 +475,7 @@ void KInetD::setReregistrationTimer() {
while (pl) {
TQDateTime d2 = pl->serviceLifetimeEnd();
if (!d2.isNull()) {
- if (d2 < TQDateTime::currentDateTime()) {
+ if (d2 < TQDateTime::tqcurrentDateTime()) {
m_reregistrationTimer.start(0, true);
return;
}
@@ -486,7 +486,7 @@ void KInetD::setReregistrationTimer() {
}
if (!d.isNull()) {
- int s = TQDateTime::currentDateTime().secsTo(d);
+ int s = TQDateTime::tqcurrentDateTime().secsTo(d);
if (s < 30)
s = 30; // max frequency 30s
m_reregistrationTimer.start(s*1000, true);
@@ -544,7 +544,7 @@ TQDateTime KInetD::getNextExpirationTime()
while (pl) {
TQDateTime d2 = pl->expiration();
if (!d2.isNull()) {
- if (d2 < TQDateTime::currentDateTime())
+ if (d2 < TQDateTime::tqcurrentDateTime())
pl->setEnabled(false);
else if (d.isNull() || (d2 < d))
d = d2;