summaryrefslogtreecommitdiffstats
path: root/krfb
diff options
context:
space:
mode:
Diffstat (limited to 'krfb')
-rw-r--r--krfb/kcm_krfb/kcm_krfb.cpp62
-rw-r--r--krfb/kcm_krfb/kcm_krfb.h8
-rw-r--r--krfb/kinetd/kinetd.cpp130
-rw-r--r--krfb/kinetd/kinetd.h74
-rw-r--r--krfb/krfb/configuration.cc98
-rw-r--r--krfb/krfb/configuration.h28
-rw-r--r--krfb/krfb/connectiondialog.cc8
-rw-r--r--krfb/krfb/connectiondialog.h4
-rw-r--r--krfb/krfb/invitation.cc34
-rw-r--r--krfb/krfb/invitation.h20
-rw-r--r--krfb/krfb/invitedialog.cc18
-rw-r--r--krfb/krfb/invitedialog.h2
-rw-r--r--krfb/krfb/krfbifaceimpl.h4
-rw-r--r--krfb/krfb/main.cpp66
-rw-r--r--krfb/krfb/manageinvitations.ui.h2
-rw-r--r--krfb/krfb/personalinvitedialog.cc12
-rw-r--r--krfb/krfb/personalinvitedialog.h10
-rw-r--r--krfb/krfb/rfbcontroller.cc82
-rw-r--r--krfb/krfb/rfbcontroller.h40
-rw-r--r--krfb/krfb/trayicon.cpp32
-rw-r--r--krfb/krfb/trayicon.h16
-rw-r--r--krfb/krfb/xupdatescanner.cc6
-rw-r--r--krfb/krfb/xupdatescanner.h8
-rw-r--r--krfb/libvncserver/main.c6
-rw-r--r--krfb/libvncserver/rfb.h6
-rw-r--r--krfb/libvncserver/rfbserver.c4
-rw-r--r--krfb/libvncserver/sockets.c2
-rw-r--r--krfb/srvloc/kinetinterface.cpp20
-rw-r--r--krfb/srvloc/kinetinterface.h14
-rw-r--r--krfb/srvloc/kinetinterfacewatcher.cpp10
-rw-r--r--krfb/srvloc/kinetinterfacewatcher.h26
-rw-r--r--krfb/srvloc/kserviceregistry.cpp40
-rw-r--r--krfb/srvloc/kserviceregistry.h28
-rw-r--r--krfb/srvloc/uuid.cpp4
-rw-r--r--krfb/srvloc/uuid.h4
35 files changed, 464 insertions, 464 deletions
diff --git a/krfb/kcm_krfb/kcm_krfb.cpp b/krfb/kcm_krfb/kcm_krfb.cpp
index 5647d557..50595505 100644
--- a/krfb/kcm_krfb/kcm_krfb.cpp
+++ b/krfb/kcm_krfb/kcm_krfb.cpp
@@ -19,14 +19,14 @@
#include "kcm_krfb.h"
#include "kcm_krfb.moc"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kapplication.h>
#include <kdialog.h>
#include <knuminput.h>
@@ -42,7 +42,7 @@
#define VERSION "0.7"
-typedef KGenericFactory<KcmKRfb, QWidget> KcmKRfbFactory;
+typedef KGenericFactory<KcmKRfb, TQWidget> KcmKRfbFactory;
// Can't use K_EXPORT_COMPONENT_FACTORY, since insertCatalogue necessary
extern "C" {
@@ -53,13 +53,13 @@ extern "C" {
}
-KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) :
+KcmKRfb::KcmKRfb(TQWidget *p, const char *name, const TQStringList &) :
KCModule(KcmKRfbFactory::instance(), p, name),
m_configuration(KRFB_CONFIGURATION_MODE) {
m_confWidget = new ConfigurationWidget(this);
- QVBoxLayout *l = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *l = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l->add(m_confWidget);
setButtons(Default|Apply|Reset);
@@ -74,19 +74,19 @@ KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) :
load();
- connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) );
- connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) );
- connect(m_confWidget->portInput, SIGNAL(valueChanged(int)), SLOT(configChanged()) );
- connect((QObject*)m_confWidget->manageInvitations, SIGNAL(clicked()),
- &m_configuration, SLOT(showManageInvitationsDialog()) );
- connect(&m_configuration, SIGNAL(invitationNumChanged(int)),
- this, SLOT(setInvitationNum(int)));
+ connect(m_confWidget->passwordInput, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->allowUninvitedCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->enableSLPCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->confirmConnectionsCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->allowDesktopControlCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->autoPortCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
+ connect(m_confWidget->portInput, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(configChanged()) );
+ connect((TQObject*)m_confWidget->manageInvitations, TQT_SIGNAL(clicked()),
+ &m_configuration, TQT_SLOT(showManageInvitationsDialog()) );
+ connect(&m_configuration, TQT_SIGNAL(invitationNumChanged(int)),
+ this, TQT_SLOT(setInvitationNum(int)));
setInvitationNum(m_configuration.invitations().size());
- connect(m_confWidget->disableBackgroundCB, SIGNAL(clicked()), SLOT(configChanged()) );
+ connect(m_confWidget->disableBackgroundCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) );
}
void KcmKRfb::configChanged() {
@@ -106,17 +106,17 @@ void KcmKRfb::checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) {
DCOPClient *d = KApplication::dcopClient();
- QByteArray sdata, rdata;
- QCString replyType;
- QDataStream arg(sdata, IO_WriteOnly);
- arg << QString("krfb");
- if (!d->call ("kded", "kinetd", "isInstalled(QString)", sdata, replyType, rdata))
+ TQByteArray sdata, rdata;
+ TQCString replyType;
+ TQDataStream arg(sdata, IO_WriteOnly);
+ arg << TQString("krfb");
+ if (!d->call ("kded", "kinetd", "isInstalled(TQString)", sdata, replyType, rdata))
return;
if (replyType != "bool")
return;
- QDataStream answer(rdata, IO_ReadOnly);
+ TQDataStream answer(rdata, IO_ReadOnly);
answer >> krfbAvailable;
kinetdAvailable = true;
}
@@ -152,7 +152,7 @@ void KcmKRfb::save() {
m_configuration.setPreferredPort(m_confWidget->portInput->value());
m_configuration.setDisableBackground(m_confWidget->disableBackgroundCB->isChecked());
m_configuration.save();
- kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", QByteArray());
+ kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", TQByteArray());
emit changed(false);
}
@@ -171,7 +171,7 @@ void KcmKRfb::defaults() {
emit changed(true);
}
-QString KcmKRfb::quickHelp() const
+TQString KcmKRfb::quickHelp() const
{
return i18n("<h1>Desktop Sharing</h1> This module allows you to configure"
" the KDE desktop sharing.");
diff --git a/krfb/kcm_krfb/kcm_krfb.h b/krfb/kcm_krfb/kcm_krfb.h
index e9271289..9fa81fc9 100644
--- a/krfb/kcm_krfb/kcm_krfb.h
+++ b/krfb/kcm_krfb/kcm_krfb.h
@@ -19,8 +19,8 @@
#ifndef _KCM_KRFB_H_
#define _KCM_KRFB_H_
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include <kcmodule.h>
#include "configurationwidget.h"
#include "../krfb/configuration.h"
@@ -32,12 +32,12 @@ private:
ConfigurationWidget *m_confWidget;
void checkKInetd(bool&, bool&);
public:
- KcmKRfb(QWidget *p, const char *name, const QStringList &);
+ KcmKRfb(TQWidget *p, const char *name, const TQStringList &);
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
private slots:
void setInvitationNum(int num);
void configChanged();
diff --git a/krfb/kinetd/kinetd.cpp b/krfb/kinetd/kinetd.cpp
index 5094712e..2f4acadd 100644
--- a/krfb/kinetd/kinetd.cpp
+++ b/krfb/kinetd/kinetd.cpp
@@ -21,7 +21,7 @@
#include "kinetinterface.h"
#include "kuser.h"
#include "uuid.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kservicetype.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -77,8 +77,8 @@ bool PortListener::acquirePort() {
delete m_socket;
m_socket = new KServerSocket(m_port, false);
}
- connect(m_socket, SIGNAL(accepted(KSocket*)),
- SLOT(accepted(KSocket*)));
+ connect(m_socket, TQT_SIGNAL(accepted(KSocket*)),
+ TQT_SLOT(accepted(KSocket*)));
bool s = m_registerService;
bool sd =m_dnssdRegister;
@@ -102,10 +102,10 @@ void PortListener::loadConfig(KService::Ptr s) {
m_valid = true;
m_autoPortRange = 0;
m_enabled = true;
- m_argument = QString::null;
+ m_argument = TQString::null;
m_multiInstance = false;
- QVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl,
+ TQVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl,
vsattributes, vslifetime, vdname, vdtype, vddata;
m_execPath = s->exec().utf8();
@@ -154,7 +154,7 @@ void PortListener::loadConfig(KService::Ptr s) {
m_registerService = true;
}
else {
- m_serviceURL = QString::null;
+ m_serviceURL = TQString::null;
m_registerService = false;
}
if (vsattributes.isValid()) {
@@ -163,11 +163,11 @@ void PortListener::loadConfig(KService::Ptr s) {
else
m_serviceAttributes = "";
if (vddata.isValid()) {
- QStringList attrs = vddata.toStringList();
- for (QStringList::iterator it=attrs.begin();
+ TQStringList attrs = vddata.toStringList();
+ for (TQStringList::iterator it=attrs.begin();
it!=attrs.end();it++) {
- QString key = (*it).section('=',0,0);
- QString value = processServiceTemplate((*it).section('=',1))[0];
+ TQString key = (*it).section('=',0,0);
+ TQString value = processServiceTemplate((*it).section('=',1))[0];
if (!key.isEmpty()) m_dnssdData[key]=value;
}
}
@@ -181,7 +181,7 @@ void PortListener::loadConfig(KService::Ptr s) {
m_dnssdRegister = false;
- m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime);
+ m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime);
m_defaultPortBase = m_portBase;
m_defaultAutoPortRange = m_autoPortRange;
@@ -192,17 +192,17 @@ void PortListener::loadConfig(KService::Ptr s) {
m_portBase);
m_autoPortRange = m_config->readNumEntry("auto_port_range_" + m_serviceName,
m_autoPortRange);
- QDateTime nullTime;
+ TQDateTime nullTime;
m_expirationTime = m_config->readDateTimeEntry("enabled_expiration_"+m_serviceName,
&nullTime);
- if ((!m_expirationTime.isNull()) && (m_expirationTime < QDateTime::currentDateTime()))
+ if ((!m_expirationTime.isNull()) && (m_expirationTime < TQDateTime::currentDateTime()))
m_enabled = false;
m_registerService = m_config->readBoolEntry("enabled_srvreg_"+m_serviceName,
m_registerService);
}
void PortListener::accepted(KSocket *sock) {
- QString host, port;
+ TQString host, port;
KSocketAddress *ksa = KExtendedSocket::peerAddress(sock->socket());
if ((!ksa) || !ksa->address()) {
delete sock;
@@ -223,7 +223,7 @@ void PortListener::accepted(KSocket *sock) {
fcntl(sock->socket(), F_SETFD, fcntl(sock->socket(), F_GETFD) & ~FD_CLOEXEC);
m_process.clearArguments();
- m_process << m_execPath << m_argument << QString::number(sock->socket());
+ 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)
@@ -246,22 +246,22 @@ int PortListener::port() {
return m_port;
}
-QStringList PortListener::processServiceTemplate(const QString &a) {
- QStringList l;
- QValueVector<KInetInterface> v = KInetInterface::getAllInterfaces(false);
- QValueVector<KInetInterface>::Iterator it = v.begin();
+TQStringList PortListener::processServiceTemplate(const TQString &a) {
+ TQStringList l;
+ TQValueVector<KInetInterface> v = KInetInterface::getAllInterfaces(false);
+ TQValueVector<KInetInterface>::Iterator it = v.begin();
while (it != v.end()) {
KInetSocketAddress *address = (*(it++)).address();
if (!address)
continue;
- QString hostName = address->nodeName();
+ TQString hostName = address->nodeName();
KUser u;
- QString x = a; // replace does not work in const QString. Why??
- l.append(x.replace(QRegExp("%h"), KServiceRegistry::encodeAttributeValue(hostName))
- .replace(QRegExp("%p"), QString::number(m_port))
- .replace(QRegExp("%u"), KServiceRegistry::encodeAttributeValue(u.loginName()))
- .replace(QRegExp("%i"), KServiceRegistry::encodeAttributeValue(m_uuid))
- .replace(QRegExp("%f"), KServiceRegistry::encodeAttributeValue(u.fullName())));
+ 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())));
}
return l;
}
@@ -294,10 +294,10 @@ bool PortListener::setPort(int port, int autoPortRange) {
}
void PortListener::setEnabled(bool e) {
- setEnabledInternal(e, QDateTime());
+ setEnabledInternal(e, TQDateTime());
}
-void PortListener::setEnabledInternal(bool e, const QDateTime &ex) {
+void PortListener::setEnabledInternal(bool e, const TQDateTime &ex) {
m_config->setGroup("ListenerConfig");
m_config->writeEntry("enabled_" + m_serviceName, e);
m_config->writeEntry("enabled_expiration_"+m_serviceName, ex);
@@ -317,7 +317,7 @@ void PortListener::setEnabledInternal(bool e, const QDateTime &ex) {
}
}
-void PortListener::setEnabled(const QDateTime &ex) {
+void PortListener::setEnabled(const TQDateTime &ex) {
setEnabledInternal(true, ex);
}
@@ -343,9 +343,9 @@ void PortListener::setServiceRegistrationEnabledInternal(bool e) {
if (m_enabled && e) {
m_registeredServiceURLs = processServiceTemplate(m_serviceURL);
- QStringList attributes = processServiceTemplate(m_serviceAttributes);
- QStringList::Iterator it = m_registeredServiceURLs.begin();
- QStringList::Iterator it2 = attributes.begin();
+ TQStringList attributes = processServiceTemplate(m_serviceAttributes);
+ TQStringList::Iterator it = m_registeredServiceURLs.begin();
+ TQStringList::Iterator it2 = attributes.begin();
while ((it != m_registeredServiceURLs.end()) &&
(it2 != attributes.end())) {
if (!m_srvreg->registerService(
@@ -356,9 +356,9 @@ void PortListener::setServiceRegistrationEnabledInternal(bool e) {
}
m_serviceRegistered = true;
// make lifetime 30s shorter, because the timeout is not precise
- m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime-30);
+ m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime-30);
} else {
- QStringList::Iterator it = m_registeredServiceURLs.begin();
+ TQStringList::Iterator it = m_registeredServiceURLs.begin();
while (it != m_registeredServiceURLs.end())
m_srvreg->unregisterService(*(it++));
m_serviceRegistered = false;
@@ -383,24 +383,24 @@ void PortListener::dnssdRegister(bool e) {
}
void PortListener::refreshRegistration() {
- if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < QDateTime::currentDateTime())) {
+ if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < TQDateTime::currentDateTime())) {
setServiceRegistrationEnabledInternal(false);
setServiceRegistrationEnabledInternal(true);
}
}
-QDateTime PortListener::expiration() {
+TQDateTime PortListener::expiration() {
return m_expirationTime;
}
-QDateTime PortListener::serviceLifetimeEnd() {
+TQDateTime PortListener::serviceLifetimeEnd() {
if (m_serviceRegistered)
return m_slpLifetimeEnd;
else
- return QDateTime();
+ return TQDateTime();
}
-QString PortListener::name() {
+TQString PortListener::name() {
return m_serviceName;
}
@@ -410,7 +410,7 @@ PortListener::~PortListener() {
}
-KInetD::KInetD(QCString &n) :
+KInetD::KInetD(TQCString &n) :
KDEDModule(n)
{
m_config = new KConfig("kinetdrc");
@@ -421,9 +421,9 @@ KInetD::KInetD(QCString &n) :
m_srvreg = 0;
}
m_portListeners.setAutoDelete(true);
- connect(&m_expirationTimer, SIGNAL(timeout()), SLOT(setExpirationTimer()));
- connect(&m_portRetryTimer, SIGNAL(timeout()), SLOT(portRetryTimer()));
- connect(&m_reregistrationTimer, SIGNAL(timeout()), SLOT(reregistrationTimer()));
+ connect(&m_expirationTimer, TQT_SIGNAL(timeout()), TQT_SLOT(setExpirationTimer()));
+ connect(&m_portRetryTimer, TQT_SIGNAL(timeout()), TQT_SLOT(portRetryTimer()));
+ connect(&m_reregistrationTimer, TQT_SIGNAL(timeout()), TQT_SLOT(reregistrationTimer()));
loadServiceList();
}
@@ -456,9 +456,9 @@ void KInetD::expirationTimer() {
}
void KInetD::setExpirationTimer() {
- QDateTime nextEx = getNextExpirationTime(); // disables expired portlistener!
+ TQDateTime nextEx = getNextExpirationTime(); // disables expired portlistener!
if (!nextEx.isNull())
- m_expirationTimer.start(QDateTime::currentDateTime().secsTo(nextEx)*1000 + 30000,
+ m_expirationTimer.start(TQDateTime::currentDateTime().secsTo(nextEx)*1000 + 30000,
false);
else
m_expirationTimer.stop();
@@ -470,12 +470,12 @@ void KInetD::portRetryTimer() {
}
void KInetD::setReregistrationTimer() {
- QDateTime d;
+ TQDateTime d;
PortListener *pl = m_portListeners.first();
while (pl) {
- QDateTime d2 = pl->serviceLifetimeEnd();
+ TQDateTime d2 = pl->serviceLifetimeEnd();
if (!d2.isNull()) {
- if (d2 < QDateTime::currentDateTime()) {
+ if (d2 < TQDateTime::currentDateTime()) {
m_reregistrationTimer.start(0, true);
return;
}
@@ -486,7 +486,7 @@ void KInetD::setReregistrationTimer() {
}
if (!d.isNull()) {
- int s = QDateTime::currentDateTime().secsTo(d);
+ int s = TQDateTime::currentDateTime().secsTo(d);
if (s < 30)
s = 30; // max frequency 30s
m_reregistrationTimer.start(s*1000, true);
@@ -525,7 +525,7 @@ void KInetD::setPortRetryTimer(bool retry) {
m_portRetryTimer.stop();
}
-PortListener *KInetD::getListenerByName(QString name)
+PortListener *KInetD::getListenerByName(TQString name)
{
PortListener *pl = m_portListeners.first();
while (pl) {
@@ -537,14 +537,14 @@ PortListener *KInetD::getListenerByName(QString name)
}
// gets next expiration timer, SIDEEFFECT: disables expired portlisteners while doing this
-QDateTime KInetD::getNextExpirationTime()
+TQDateTime KInetD::getNextExpirationTime()
{
PortListener *pl = m_portListeners.first();
- QDateTime d;
+ TQDateTime d;
while (pl) {
- QDateTime d2 = pl->expiration();
+ TQDateTime d2 = pl->expiration();
if (!d2.isNull()) {
- if (d2 < QDateTime::currentDateTime())
+ if (d2 < TQDateTime::currentDateTime())
pl->setEnabled(false);
else if (d.isNull() || (d2 < d))
d = d2;
@@ -554,9 +554,9 @@ QDateTime KInetD::getNextExpirationTime()
return d;
}
-QStringList KInetD::services()
+TQStringList KInetD::services()
{
- QStringList list;
+ TQStringList list;
PortListener *pl = m_portListeners.first();
while (pl) {
list.append(pl->name());
@@ -565,7 +565,7 @@ QStringList KInetD::services()
return list;
}
-bool KInetD::isEnabled(QString service)
+bool KInetD::isEnabled(TQString service)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -574,7 +574,7 @@ bool KInetD::isEnabled(QString service)
return pl->isEnabled();
}
-int KInetD::port(QString service)
+int KInetD::port(TQString service)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -583,7 +583,7 @@ int KInetD::port(QString service)
return pl->port();
}
-bool KInetD::setPort(QString service, int port, int autoPortRange)
+bool KInetD::setPort(TQString service, int port, int autoPortRange)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -595,13 +595,13 @@ bool KInetD::setPort(QString service, int port, int autoPortRange)
return s;
}
-bool KInetD::isInstalled(QString service)
+bool KInetD::isInstalled(TQString service)
{
PortListener *pl = getListenerByName(service);
return (pl != 0);
}
-void KInetD::setEnabled(QString service, bool enable)
+void KInetD::setEnabled(TQString service, bool enable)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -612,7 +612,7 @@ void KInetD::setEnabled(QString service, bool enable)
setReregistrationTimer();
}
-void KInetD::setEnabled(QString service, QDateTime expiration)
+void KInetD::setEnabled(TQString service, TQDateTime expiration)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -623,7 +623,7 @@ void KInetD::setEnabled(QString service, QDateTime expiration)
setReregistrationTimer();
}
-void KInetD::setServiceRegistrationEnabled(QString service, bool enable)
+void KInetD::setServiceRegistrationEnabled(TQString service, bool enable)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -633,7 +633,7 @@ void KInetD::setServiceRegistrationEnabled(QString service, bool enable)
setReregistrationTimer();
}
-bool KInetD::isServiceRegistrationEnabled(QString service)
+bool KInetD::isServiceRegistrationEnabled(TQString service)
{
PortListener *pl = getListenerByName(service);
if (!pl)
@@ -650,7 +650,7 @@ KInetD::~KInetD() {
}
extern "C" {
- KDE_EXPORT KDEDModule *create_kinetd(QCString &name)
+ KDE_EXPORT KDEDModule *create_kinetd(TQCString &name)
{
KGlobal::locale()->insertCatalogue("kinetd");
return new KInetD(name);
diff --git a/krfb/kinetd/kinetd.h b/krfb/kinetd/kinetd.h
index e6283e83..32bb2885 100644
--- a/krfb/kinetd/kinetd.h
+++ b/krfb/kinetd/kinetd.h
@@ -23,36 +23,36 @@
#include <kservice.h>
#include <ksock.h>
#include <kprocess.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include <dnssd/publicservice.h>
#include "kserviceregistry.h"
-class PortListener : public QObject {
+class PortListener : public TQObject {
Q_OBJECT
private:
bool m_valid;
- QString m_serviceName;
- QString m_serviceURL, m_serviceAttributes;
- QStringList m_registeredServiceURLs;
- QString m_dnssdName, m_dnssdType;
- QMap<QString,QString> m_dnssdData;
+ TQString m_serviceName;
+ TQString m_serviceURL, m_serviceAttributes;
+ TQStringList m_registeredServiceURLs;
+ TQString m_dnssdName, m_dnssdType;
+ TQMap<TQString,TQString> m_dnssdData;
int m_serviceLifetime;
int m_port;
int m_portBase, m_autoPortRange;
int m_defaultPortBase, m_defaultAutoPortRange;
bool m_multiInstance;
- QString m_execPath;
- QString m_argument;
+ TQString m_execPath;
+ TQString m_argument;
bool m_enabled;
bool m_serviceRegistered, m_registerService;
bool m_dnssdRegister, m_dnssdRegistered;
- QDateTime m_expirationTime;
- QDateTime m_slpLifetimeEnd;
- QString m_uuid;
+ TQDateTime m_expirationTime;
+ TQDateTime m_slpLifetimeEnd;
+ TQString m_uuid;
KServerSocket *m_socket;
KProcess m_process;
@@ -63,7 +63,7 @@ private:
void freePort();
void loadConfig(KService::Ptr s);
- void setEnabledInternal(bool e, const QDateTime &ex);
+ void setEnabledInternal(bool e, const TQDateTime &ex);
void dnssdRegister(bool enabled);
void setServiceRegistrationEnabledInternal(bool enabled);
@@ -73,16 +73,16 @@ public:
bool acquirePort();
bool isValid();
- QString name();
+ TQString name();
void setEnabled(bool enabled);
- void setEnabled(const QDateTime &expiration);
+ void setEnabled(const TQDateTime &expiration);
void setServiceRegistrationEnabled(bool enabled);
bool isServiceRegistrationEnabled();
- QDateTime expiration();
- QDateTime serviceLifetimeEnd();
+ TQDateTime expiration();
+ TQDateTime serviceLifetimeEnd();
bool isEnabled();
int port();
- QStringList processServiceTemplate(const QString &a);
+ TQStringList processServiceTemplate(const TQString &a);
bool setPort(int port = -1, int autoProbeRange = 1);
void refreshRegistration();
@@ -102,14 +102,14 @@ k_dcop:
* (see kinetdmodule.desktop in servicetypes dir).
* @return a list with the names of all services
*/
- QStringList services();
+ TQStringList services();
/**
* Returns true if the service exists and is available.
* @param service name of a service as specified in its .desktop file
* @return true if a service with the given name exists and is enabled
*/
- bool isEnabled(QString service);
+ bool isEnabled(TQString service);
/**
* Enables or disabled the given service. Ignored if the given service
@@ -117,7 +117,7 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @param enable true to enable, false to disable.
*/
- void setEnabled(QString service, bool enable);
+ void setEnabled(TQString service, bool enable);
/**
* Enables the given service until the given time. Ignored if the given
@@ -125,14 +125,14 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @param expiration the time the service will be disabled at
*/
- void setEnabled(QString service, QDateTime expiration);
+ void setEnabled(TQString service, TQDateTime expiration);
/**
* Returns the port of the service, or -1 if not listening.
* @param service name of a service as specified in its .desktop file
* @return the port or -1 if no port used or service does not exist
*/
- int port(QString service);
+ int port(TQString service);
/**
* Sets the port of the service, and possibly a range of ports to try.
@@ -144,14 +144,14 @@ k_dcop:
* @return true if a port could be found or service is disabled, false
* otherwise.
*/
- bool setPort(QString service, int port = -1, int autoPortRange = 1);
+ bool setPort(TQString service, int port = -1, int autoPortRange = 1);
/**
* Tests whether the given service is installed..
* @param service name of a service as specified in its .desktop file
* @return true if installed, false otherwise
*/
- bool isInstalled(QString service);
+ bool isInstalled(TQString service);
/**
* Enables or disables the SLP registration. Ignored if the service does
@@ -160,7 +160,7 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @param enable true to enable, false to disable.
*/
- void setServiceRegistrationEnabled(QString service, bool enabled);
+ void setServiceRegistrationEnabled(TQString service, bool enabled);
/**
* Returns true if service registration for the given service is enabled.
@@ -169,19 +169,19 @@ k_dcop:
* @param service name of a service as specified in its .desktop file
* @return true if service registration is enabled
*/
- bool isServiceRegistrationEnabled(QString service);
+ bool isServiceRegistrationEnabled(TQString service);
private:
- QDateTime getNextExpirationTime();
+ TQDateTime getNextExpirationTime();
void setPortRetryTimer(bool retry);
void setReregistrationTimer();
KConfig *m_config;
KServiceRegistry *m_srvreg;
- QPtrList<PortListener> m_portListeners;
- QTimer m_expirationTimer;
- QTimer m_portRetryTimer;
- QTimer m_reregistrationTimer;
+ TQPtrList<PortListener> m_portListeners;
+ TQTimer m_expirationTimer;
+ TQTimer m_portRetryTimer;
+ TQTimer m_reregistrationTimer;
private slots:
void setExpirationTimer();
@@ -190,10 +190,10 @@ k_dcop:
void reregistrationTimer();
public:
- KInetD(QCString &n);
+ KInetD(TQCString &n);
virtual ~KInetD();
void loadServiceList();
- PortListener *getListenerByName(QString name);
+ PortListener *getListenerByName(TQString name);
};
diff --git a/krfb/krfb/configuration.cc b/krfb/krfb/configuration.cc
index 75f8c31d..03439b9d 100644
--- a/krfb/krfb/configuration.cc
+++ b/krfb/krfb/configuration.cc
@@ -26,14 +26,14 @@
#include <ksockaddr.h>
#include <kactivelabel.h>
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <dcopclient.h>
#include <dcopref.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <krun.h>
@@ -58,29 +58,29 @@ Configuration::Configuration(krfb_mode mode) :
connectDCOPSignal( 0, "KRFB::ConfigChanged", "KRFB_ConfigChanged()",
"updateKConfig()", false );
- connect(invMngDlg.newPersonalInvitationButton, SIGNAL(clicked()),
- SLOT(showPersonalInvitationDialog()));
- connect(invMngDlg.newEmailInvitationButton, SIGNAL(clicked()), SLOT(inviteEmail()));
- connect(invMngDlg.deleteOneButton, SIGNAL(clicked()), SLOT(invMngDlgDeleteOnePressed()));
- connect(invMngDlg.deleteAllButton, SIGNAL(clicked()), SLOT(invMngDlgDeleteAllPressed()));
- invMngDlg.listView->setSelectionMode(QListView::Extended);
- invMngDlg.listView->setMinimumSize(QSize(400, 100)); // QTs size is much to small
-
- connect(&invDlg, SIGNAL(createInviteClicked()),
- SLOT(showPersonalInvitationDialog()));
- connect(&invDlg, SIGNAL(emailInviteClicked()),
- SLOT(inviteEmail()));
- connect(&invDlg, SIGNAL(manageInviteClicked()),
- SLOT(showManageInvitationsDialog()));
- connect(&invDlg, SIGNAL(configureClicked()),
- SLOT(showConfigurationModule()));
- connect(this, SIGNAL(invitationNumChanged(int)),
- &invDlg, SLOT(setInviteCount(int)));
- connect(this, SIGNAL(invitationNumChanged(int)),
- &invMngDlg, SLOT(listSizeChanged(int)));
+ connect(invMngDlg.newPersonalInvitationButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(showPersonalInvitationDialog()));
+ connect(invMngDlg.newEmailInvitationButton, TQT_SIGNAL(clicked()), TQT_SLOT(inviteEmail()));
+ connect(invMngDlg.deleteOneButton, TQT_SIGNAL(clicked()), TQT_SLOT(invMngDlgDeleteOnePressed()));
+ connect(invMngDlg.deleteAllButton, TQT_SIGNAL(clicked()), TQT_SLOT(invMngDlgDeleteAllPressed()));
+ invMngDlg.listView->setSelectionMode(TQListView::Extended);
+ invMngDlg.listView->setMinimumSize(TQSize(400, 100)); // QTs size is much to small
+
+ connect(&invDlg, TQT_SIGNAL(createInviteClicked()),
+ TQT_SLOT(showPersonalInvitationDialog()));
+ connect(&invDlg, TQT_SIGNAL(emailInviteClicked()),
+ TQT_SLOT(inviteEmail()));
+ connect(&invDlg, TQT_SIGNAL(manageInviteClicked()),
+ TQT_SLOT(showManageInvitationsDialog()));
+ connect(&invDlg, TQT_SIGNAL(configureClicked()),
+ TQT_SLOT(showConfigurationModule()));
+ connect(this, TQT_SIGNAL(invitationNumChanged(int)),
+ &invDlg, TQT_SLOT(setInviteCount(int)));
+ connect(this, TQT_SIGNAL(invitationNumChanged(int)),
+ &invMngDlg, TQT_SLOT(listSizeChanged(int)));
emit invitationNumChanged(invitationList.size());
- connect(&refreshTimer, SIGNAL(timeout()), SLOT(refreshTimeout()));
+ connect(&refreshTimer, TQT_SIGNAL(timeout()), TQT_SLOT(refreshTimeout()));
refreshTimer.start(1000*60);
}
@@ -94,24 +94,24 @@ void Configuration::updateKConfig()
}
void Configuration::setKInetdEnabled(bool enabled) {
- kinetdRef.send("setEnabled", QString("krfb"), enabled);
- kinetdRef.send("setEnabled", QString("krfb_httpd"), enabled);
+ kinetdRef.send("setEnabled", TQString("krfb"), enabled);
+ kinetdRef.send("setEnabled", TQString("krfb_httpd"), enabled);
}
-void Configuration::setKInetdEnabled(const QDateTime &date) {
- kinetdRef.send("setEnabled", QString("krfb"), date);
- kinetdRef.send("setEnabled", QString("krfb_httpd"), date);
+void Configuration::setKInetdEnabled(const TQDateTime &date) {
+ kinetdRef.send("setEnabled", TQString("krfb"), date);
+ kinetdRef.send("setEnabled", TQString("krfb_httpd"), date);
}
void Configuration::setKInetdServiceRegistrationEnabled(bool enabled) {
kinetdRef.send("setServiceRegistrationEnabled",
- QString("krfb"), enabled);
+ TQString("krfb"), enabled);
kinetdRef.send("setServiceRegistrationEnabled",
- QString("krfb_httpd"), enabled);
+ TQString("krfb_httpd"), enabled);
}
void Configuration::getPortFromKInetd() {
- DCOPReply r = kinetdRef.call("port", QString("krfb"));
+ DCOPReply r = kinetdRef.call("port", TQString("krfb"));
if (!r.isValid())
return; // nice error msg here?
r.get(portNum);
@@ -119,12 +119,12 @@ void Configuration::getPortFromKInetd() {
void Configuration::setKInetdPort(int p) {
DCOPReply r = kinetdRef.call("setPort",
- QString("krfb"), p, 1);
+ TQString("krfb"), p, 1);
// nice error msg here?
}
-void Configuration::removeInvitation(QValueList<Invitation>::iterator it) {
+void Configuration::removeInvitation(TQValueList<Invitation>::iterator it) {
invitationList.remove(it);
save();
}
@@ -139,16 +139,16 @@ void Configuration::doKinetdConf() {
return;
}
- QDateTime lastExpiration;
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQDateTime lastExpiration;
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
Invitation &ix = (*it);
- QDateTime t = ix.expirationTime();
+ TQDateTime t = ix.expirationTime();
if (t > lastExpiration)
lastExpiration = t;
it++;
}
- if (lastExpiration.isNull() || (lastExpiration < QDateTime::currentDateTime())) {
+ if (lastExpiration.isNull() || (lastExpiration < TQDateTime::currentDateTime())) {
setKInetdEnabled(false);
portNum = -1;
}
@@ -213,7 +213,7 @@ void Configuration::saveToKConfig() {
void Configuration::saveToDialogs() {
invalidateOldInvitations();
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
Invitation &inv = *(it++);
if (!inv.getViewItem())
@@ -242,7 +242,7 @@ Invitation Configuration::createInvitation() {
}
void Configuration::invalidateOldInvitations() {
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
if (!(*it).isValid())
it = invitationList.remove(it);
@@ -259,10 +259,10 @@ void Configuration::refreshTimeout() {
emit invitationNumChanged(invitationList.size());
}
-QString Configuration::hostname() const
+TQString Configuration::hostname() const
{
KInetSocketAddress *a = KInetInterface::getPublicInetAddress();
- QString hostName;
+ TQString hostName;
if (a) {
hostName = a->nodeName();
delete a;
@@ -294,11 +294,11 @@ bool Configuration::enableSLP() const {
return enableSLPFlag;
}
-QString Configuration::password() const {
+TQString Configuration::password() const {
return passwordString;
}
-QValueList<Invitation> &Configuration::invitations() {
+TQValueList<Invitation> &Configuration::invitations() {
return invitationList;
}
@@ -328,7 +328,7 @@ void Configuration::setAllowDesktopControl(bool allowDesktopControl)
allowDesktopControlFlag = allowDesktopControl;
}
-void Configuration::setPassword(QString password)
+void Configuration::setPassword(TQString password)
{
passwordString = password;
}
@@ -369,7 +369,7 @@ void Configuration::showManageInvitationsDialog() {
}
void Configuration::invMngDlgDeleteOnePressed() {
- QValueList<Invitation>::iterator it = invitationList.begin();
+ TQValueList<Invitation>::iterator it = invitationList.begin();
while (it != invitationList.end()) {
Invitation &ix = (*it);
KListViewItem *iv = ix.getViewItem();
@@ -439,7 +439,7 @@ void Configuration::inviteEmail() {
emit invitationNumChanged(invitationList.size());
KApplication *app = KApplication::kApplication();
- app->invokeMailer(QString::null, QString::null, QString::null,
+ app->invokeMailer(TQString::null, TQString::null, TQString::null,
i18n("Desktop Sharing (VNC) invitation"),
i18n("You have been invited to a VNC session. If you have the KDE Remote "
"Desktop Connection installed, just click on the link below.\n\n"
diff --git a/krfb/krfb/configuration.h b/krfb/krfb/configuration.h
index cec7a2ed..57e03385 100644
--- a/krfb/krfb/configuration.h
+++ b/krfb/krfb/configuration.h
@@ -26,10 +26,10 @@
#include <dcopref.h>
#include <kconfig.h>
-#include <qtimer.h>
-#include <qobject.h>
-#include <qvalidator.h>
-#include <qstring.h>
+#include <tqtimer.h>
+#include <tqobject.h>
+#include <tqvalidator.h>
+#include <tqstring.h>
#include <dcopobject.h>
@@ -46,7 +46,7 @@ enum krfb_mode {
* standalone-config-dialog and all the invitation dialogs
* @author Tim Jansen
*/
-class Configuration : public QObject, public DCOPObject {
+class Configuration : public TQObject, public DCOPObject {
K_DCOP
Q_OBJECT
public:
@@ -58,8 +58,8 @@ public:
bool allowDesktopControl() const;
bool allowUninvitedConnections() const;
bool enableSLP() const;
- QString password() const;
- QString hostname() const;
+ TQString password() const;
+ TQString hostname() const;
int port() const;
int preferredPort() const;
bool disableBackground() const;
@@ -68,15 +68,15 @@ public:
void setAllowUninvited(bool allowUninvited);
void setEnableSLP(bool e);
void setAskOnConnect(bool askOnConnect);
- void setPassword(QString password);
+ void setPassword(TQString password);
void setPreferredPort(int p);
void setDisableBackground(bool disable);
void setDisableXShm(bool disable);
void save();
void update();
- QValueList<Invitation> &invitations();
- void removeInvitation(QValueList<Invitation>::iterator it);
+ TQValueList<Invitation> &invitations();
+ void removeInvitation(TQValueList<Invitation>::iterator it);
signals:
void invitationFinished();
void invitationNumChanged(int num);
@@ -97,7 +97,7 @@ private:
Invitation createInvitation();
void closeInvDlg();
void invalidateOldInvitations();
- void setKInetdEnabled(const QDateTime &date);
+ void setKInetdEnabled(const TQDateTime &date);
void setKInetdEnabled(bool enabled);
void setKInetdServiceRegistrationEnabled(bool enabled);
void getPortFromKInetd();
@@ -109,7 +109,7 @@ private:
ManageInvitationsDialog invMngDlg;
InviteDialog invDlg;
PersonalInviteDialog persInvDlg;
- QTimer refreshTimer;
+ TQTimer refreshTimer;
bool askOnConnectFlag;
bool allowDesktopControlFlag;
@@ -120,8 +120,8 @@ private:
DCOPRef kinetdRef;
- QString passwordString;
- QValueList<Invitation> invitationList;
+ TQString passwordString;
+ TQValueList<Invitation> invitationList;
bool disableBackgroundFlag;
bool disableXShmFlag;
diff --git a/krfb/krfb/connectiondialog.cc b/krfb/krfb/connectiondialog.cc
index bc9f63c9..d767b5a2 100644
--- a/krfb/krfb/connectiondialog.cc
+++ b/krfb/krfb/connectiondialog.cc
@@ -20,13 +20,13 @@
#include "connectiondialog.h"
#include "connectionwidget.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kiconloader.h>
#include <klocale.h>
-ConnectionDialog::ConnectionDialog( QWidget *parent, const char *name )
+ConnectionDialog::ConnectionDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "New Connection" ),
Ok|Cancel, Cancel, true )
{
@@ -45,7 +45,7 @@ ConnectionDialog::ConnectionDialog( QWidget *parent, const char *name )
setMainWidget( m_connectWidget );
}
-void ConnectionDialog::setRemoteHost( const QString &host )
+void ConnectionDialog::setRemoteHost( const TQString &host )
{
m_connectWidget->remoteHost->setText( host );
}
diff --git a/krfb/krfb/connectiondialog.h b/krfb/krfb/connectiondialog.h
index c110d6db..c5f7e589 100644
--- a/krfb/krfb/connectiondialog.h
+++ b/krfb/krfb/connectiondialog.h
@@ -29,10 +29,10 @@ class ConnectionDialog : public KDialogBase
Q_OBJECT
public:
- ConnectionDialog( QWidget *parent, const char *name );
+ ConnectionDialog( TQWidget *parent, const char *name );
~ConnectionDialog() {};
- void setRemoteHost( const QString &host );
+ void setRemoteHost( const TQString &host );
void setAllowRemoteControl( bool b );
bool allowRemoteControl();
diff --git a/krfb/krfb/invitation.cc b/krfb/krfb/invitation.cc
index 75c4758a..e764036c 100644
--- a/krfb/krfb/invitation.cc
+++ b/krfb/krfb/invitation.cc
@@ -22,18 +22,18 @@
* Function for (en/de)crypting strings for config file, taken from KMail
* Author: Stefan Taferner <[email protected]>
*/
-QString cryptStr(const QString &aStr) {
- QString result;
+TQString cryptStr(const TQString &aStr) {
+ TQString result;
for (unsigned int i = 0; i < aStr.length(); i++)
result += (aStr[i].unicode() < 0x20) ? aStr[i] :
- QChar(0x1001F - aStr[i].unicode());
+ TQChar(0x1001F - aStr[i].unicode());
return result;
}
// a random string that doesn't contain i, I, o, O, 1, 0
// based on KApplication::randomString()
-static QString readableRandomString(int length) {
- QString str;
+static TQString readableRandomString(int length) {
+ TQString str;
while (length)
{
int r = KApplication::random() % 62;
@@ -59,8 +59,8 @@ static QString readableRandomString(int length) {
Invitation::Invitation() :
m_viewItem(0) {
m_password = readableRandomString(4)+"-"+readableRandomString(3);
- m_creationTime = QDateTime::currentDateTime();
- m_expirationTime = QDateTime::currentDateTime().addSecs(INVITATION_DURATION);
+ m_creationTime = TQDateTime::currentDateTime();
+ m_expirationTime = TQDateTime::currentDateTime().addSecs(INVITATION_DURATION);
}
Invitation::Invitation(const Invitation &x) :
@@ -71,9 +71,9 @@ Invitation::Invitation(const Invitation &x) :
}
Invitation::Invitation(KConfig* config, int num) {
- m_password = cryptStr(config->readEntry(QString("password%1").arg(num), ""));
- m_creationTime = config->readDateTimeEntry(QString("creation%1").arg(num));
- m_expirationTime = config->readDateTimeEntry(QString("expiration%1").arg(num));
+ m_password = cryptStr(config->readEntry(TQString("password%1").arg(num), ""));
+ m_creationTime = config->readDateTimeEntry(TQString("creation%1").arg(num));
+ m_expirationTime = config->readDateTimeEntry(TQString("expiration%1").arg(num));
m_viewItem = 0;
}
@@ -93,25 +93,25 @@ Invitation &Invitation::operator= (const Invitation&x) {
}
void Invitation::save(KConfig *config, int num) const {
- config->writeEntry(QString("password%1").arg(num), cryptStr(m_password));
- config->writeEntry(QString("creation%1").arg(num), m_creationTime);
- config->writeEntry(QString("expiration%1").arg(num), m_expirationTime);
+ config->writeEntry(TQString("password%1").arg(num), cryptStr(m_password));
+ config->writeEntry(TQString("creation%1").arg(num), m_creationTime);
+ config->writeEntry(TQString("expiration%1").arg(num), m_expirationTime);
}
-QString Invitation::password() const {
+TQString Invitation::password() const {
return m_password;
}
-QDateTime Invitation::expirationTime() const {
+TQDateTime Invitation::expirationTime() const {
return m_expirationTime;
}
-QDateTime Invitation::creationTime() const {
+TQDateTime Invitation::creationTime() const {
return m_creationTime;
}
bool Invitation::isValid() const {
- return m_expirationTime > QDateTime::currentDateTime();
+ return m_expirationTime > TQDateTime::currentDateTime();
}
void Invitation::setViewItem(KListViewItem *i) {
diff --git a/krfb/krfb/invitation.h b/krfb/krfb/invitation.h
index 4f1dd826..fe928d7f 100644
--- a/krfb/krfb/invitation.h
+++ b/krfb/krfb/invitation.h
@@ -21,14 +21,14 @@
#include <kapplication.h>
#include <klistview.h>
#include <kconfig.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
const int INVITATION_DURATION = 60*60;
-QString cryptStr(const QString &aStr);
+TQString cryptStr(const TQString &aStr);
class Invitation {
public:
@@ -38,18 +38,18 @@ public:
Invitation(const Invitation &x);
Invitation &operator= (const Invitation&x);
- QString password() const;
- QDateTime expirationTime() const;
- QDateTime creationTime() const;
+ TQString password() const;
+ TQDateTime expirationTime() const;
+ TQDateTime creationTime() const;
bool isValid() const;
void setViewItem(KListViewItem*);
KListViewItem* getViewItem() const;
void save(KConfig *config, int num) const;
private:
- QString m_password;
- QDateTime m_creationTime;
- QDateTime m_expirationTime;
+ TQString m_password;
+ TQDateTime m_creationTime;
+ TQDateTime m_expirationTime;
KListViewItem *m_viewItem;
};
diff --git a/krfb/krfb/invitedialog.cc b/krfb/krfb/invitedialog.cc
index fe01083a..f3b202a9 100644
--- a/krfb/krfb/invitedialog.cc
+++ b/krfb/krfb/invitedialog.cc
@@ -24,10 +24,10 @@
#include <klocale.h>
#include <kstdguiitem.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
-InviteDialog::InviteDialog( QWidget *parent, const char *name )
+InviteDialog::InviteDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Invitation" ),
User1|Close|Help, NoDefault, true )
{
@@ -38,12 +38,12 @@ InviteDialog::InviteDialog( QWidget *parent, const char *name )
setButtonGuiItem( User1, KStdGuiItem::configure() );
- connect( m_inviteWidget->btnCreateInvite, SIGNAL( clicked() ),
- SIGNAL( createInviteClicked() ) );
- connect( m_inviteWidget->btnEmailInvite, SIGNAL( clicked() ),
- SIGNAL( emailInviteClicked() ) );
- connect( m_inviteWidget->btnManageInvite, SIGNAL( clicked() ),
- SIGNAL( manageInviteClicked() ) );
+ connect( m_inviteWidget->btnCreateInvite, TQT_SIGNAL( clicked() ),
+ TQT_SIGNAL( createInviteClicked() ) );
+ connect( m_inviteWidget->btnEmailInvite, TQT_SIGNAL( clicked() ),
+ TQT_SIGNAL( emailInviteClicked() ) );
+ connect( m_inviteWidget->btnManageInvite, TQT_SIGNAL( clicked() ),
+ TQT_SIGNAL( manageInviteClicked() ) );
}
void InviteDialog::slotUser1()
diff --git a/krfb/krfb/invitedialog.h b/krfb/krfb/invitedialog.h
index dfb0e0f4..a1de109b 100644
--- a/krfb/krfb/invitedialog.h
+++ b/krfb/krfb/invitedialog.h
@@ -29,7 +29,7 @@ class InviteDialog : public KDialogBase
Q_OBJECT
public:
- InviteDialog( QWidget *parent, const char *name );
+ InviteDialog( TQWidget *parent, const char *name );
~InviteDialog() {}
void enableInviteButton( bool enable );
diff --git a/krfb/krfb/krfbifaceimpl.h b/krfb/krfb/krfbifaceimpl.h
index 430a0652..21f3a022 100644
--- a/krfb/krfb/krfbifaceimpl.h
+++ b/krfb/krfb/krfbifaceimpl.h
@@ -1,11 +1,11 @@
#ifndef __KRFB_IFACE_IMPL_H
#define __KRFB_IFACE_IMPL_H
-#include <qobject.h>
+#include <tqobject.h>
#include "rfbcontroller.h"
#include "krfbiface.h"
-class KRfbIfaceImpl : public QObject, public virtual krfbIface
+class KRfbIfaceImpl : public TQObject, public virtual krfbIface
{
Q_OBJECT
private:
diff --git a/krfb/krfb/main.cpp b/krfb/krfb/main.cpp
index 4428e983..0910b9d8 100644
--- a/krfb/krfb/main.cpp
+++ b/krfb/krfb/main.cpp
@@ -31,10 +31,10 @@
#include <kaboutapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qobject.h>
-#include <qwindowdefs.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqobject.h>
+#include <tqwindowdefs.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <dcopref.h>
#include <signal.h>
@@ -57,7 +57,7 @@ void checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) {
DCOPRef ref("kded", "kinetd");
ref.setDCOPClient(KApplication::dcopClient());
- DCOPReply r = ref.call("isInstalled", QString("krfb"));
+ DCOPReply r = ref.call("isInstalled", TQString("krfb"));
if (!r.isValid()) {
kinetdAvailable = false;
krfbAvailable = false;
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
Configuration *config;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString fdString;
+ TQString fdString;
if (!args->isSet(ARG_KINETD)) {
bool kinetdA, krfbA;
checkKInetd(kinetdA, krfbA);
@@ -145,33 +145,33 @@ int main(int argc, char *argv[])
RFBController controller(config);
KRfbIfaceImpl dcopiface(&controller);
- QObject::connect(&app, SIGNAL(lastWindowClosed()), // dont show passivepopup
- &trayicon, SLOT(prepareQuit()));
- QObject::connect(&app, SIGNAL(lastWindowClosed()),
- &controller, SLOT(closeConnection()));
-
- QObject::connect(&trayicon, SIGNAL(showManageInvitations()),
- config, SLOT(showManageInvitationsDialog()));
- QObject::connect(&trayicon, SIGNAL(enableDesktopControl(bool)),
- &controller, SLOT(enableDesktopControl(bool)));
- QObject::connect(&trayicon, SIGNAL(diconnectedMessageDisplayed()),
- &app, SLOT(quit()));
-
- QObject::connect(&dcopiface, SIGNAL(exitApp()),
- &controller, SLOT(closeConnection()));
- QObject::connect(&dcopiface, SIGNAL(exitApp()),
- &app, SLOT(quit()));
-
- QObject::connect(&controller, SIGNAL(sessionRefused()),
- &app, SLOT(quit()));
- QObject::connect(&controller, SIGNAL(sessionEstablished(QString)),
- &trayicon, SLOT(showConnectedMessage(QString)));
- QObject::connect(&controller, SIGNAL(sessionFinished()),
- &trayicon, SLOT(showDisconnectedMessage()));
- QObject::connect(&controller, SIGNAL(desktopControlSettingChanged(bool)),
- &trayicon, SLOT(setDesktopControlSetting(bool)));
- QObject::connect(&controller, SIGNAL(quitApp()),
- &app, SLOT(quit()));
+ TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()), // dont show passivepopup
+ &trayicon, TQT_SLOT(prepareQuit()));
+ TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()),
+ &controller, TQT_SLOT(closeConnection()));
+
+ TQObject::connect(&trayicon, TQT_SIGNAL(showManageInvitations()),
+ config, TQT_SLOT(showManageInvitationsDialog()));
+ TQObject::connect(&trayicon, TQT_SIGNAL(enableDesktopControl(bool)),
+ &controller, TQT_SLOT(enableDesktopControl(bool)));
+ TQObject::connect(&trayicon, TQT_SIGNAL(diconnectedMessageDisplayed()),
+ &app, TQT_SLOT(quit()));
+
+ TQObject::connect(&dcopiface, TQT_SIGNAL(exitApp()),
+ &controller, TQT_SLOT(closeConnection()));
+ TQObject::connect(&dcopiface, TQT_SIGNAL(exitApp()),
+ &app, TQT_SLOT(quit()));
+
+ TQObject::connect(&controller, TQT_SIGNAL(sessionRefused()),
+ &app, TQT_SLOT(quit()));
+ TQObject::connect(&controller, TQT_SIGNAL(sessionEstablished(TQString)),
+ &trayicon, TQT_SLOT(showConnectedMessage(TQString)));
+ TQObject::connect(&controller, TQT_SIGNAL(sessionFinished()),
+ &trayicon, TQT_SLOT(showDisconnectedMessage()));
+ TQObject::connect(&controller, TQT_SIGNAL(desktopControlSettingChanged(bool)),
+ &trayicon, TQT_SLOT(setDesktopControlSetting(bool)));
+ TQObject::connect(&controller, TQT_SIGNAL(quitApp()),
+ &app, TQT_SLOT(quit()));
sigset_t sigs;
sigemptyset(&sigs);
diff --git a/krfb/krfb/manageinvitations.ui.h b/krfb/krfb/manageinvitations.ui.h
index 86c1fa4b..74b7cb97 100644
--- a/krfb/krfb/manageinvitations.ui.h
+++ b/krfb/krfb/manageinvitations.ui.h
@@ -3,7 +3,7 @@ void ManageInvitationsDialog::listSizeChanged(int i) {
}
void ManageInvitationsDialog::listSelectionChanged() {
- QListViewItem *i = listView->firstChild();
+ TQListViewItem *i = listView->firstChild();
while(i) {
if (i->isSelected()) {
deleteOneButton->setEnabled(true);
diff --git a/krfb/krfb/personalinvitedialog.cc b/krfb/krfb/personalinvitedialog.cc
index 4be1c3de..a5664bcb 100644
--- a/krfb/krfb/personalinvitedialog.cc
+++ b/krfb/krfb/personalinvitedialog.cc
@@ -20,13 +20,13 @@
#include "personalinvitedialog.h"
#include "personalinvitewidget.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kactivelabel.h>
#include <kiconloader.h>
#include <klocale.h>
-PersonalInviteDialog::PersonalInviteDialog( QWidget *parent, const char *name )
+PersonalInviteDialog::PersonalInviteDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Personal Invitation" ),
Close, Close, true )
{
@@ -37,18 +37,18 @@ PersonalInviteDialog::PersonalInviteDialog( QWidget *parent, const char *name )
setMainWidget( m_inviteWidget );
}
-void PersonalInviteDialog::setHost( const QString &host, uint port )
+void PersonalInviteDialog::setHost( const TQString &host, uint port )
{
- m_inviteWidget->hostLabel->setText( QString( "%1:%2" )
+ m_inviteWidget->hostLabel->setText( TQString( "%1:%2" )
.arg( host ).arg( port ) );
}
-void PersonalInviteDialog::setPassword( const QString &passwd )
+void PersonalInviteDialog::setPassword( const TQString &passwd )
{
m_inviteWidget->passwordLabel->setText( passwd );
}
-void PersonalInviteDialog::setExpiration( const QDateTime &expire )
+void PersonalInviteDialog::setExpiration( const TQDateTime &expire )
{
m_inviteWidget->expirationLabel->setText( expire.toString( Qt::LocalDate ) );
}
diff --git a/krfb/krfb/personalinvitedialog.h b/krfb/krfb/personalinvitedialog.h
index 2951a93b..6f28a33d 100644
--- a/krfb/krfb/personalinvitedialog.h
+++ b/krfb/krfb/personalinvitedialog.h
@@ -22,19 +22,19 @@
class PersonalInviteWidget;
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdialogbase.h>
class PersonalInviteDialog : public KDialogBase
{
public:
- PersonalInviteDialog( QWidget *parent, const char *name );
+ PersonalInviteDialog( TQWidget *parent, const char *name );
virtual ~PersonalInviteDialog() {}
- void setHost( const QString &host, uint port );
- void setPassword( const QString &passwd );
- void setExpiration( const QDateTime &expire );
+ void setHost( const TQString &host, uint port );
+ void setPassword( const TQString &passwd );
+ void setExpiration( const TQDateTime &expire );
protected:
PersonalInviteWidget *m_inviteWidget;
diff --git a/krfb/krfb/rfbcontroller.cc b/krfb/krfb/rfbcontroller.cc
index 29f48278..51516683 100644
--- a/krfb/krfb/rfbcontroller.cc
+++ b/krfb/krfb/rfbcontroller.cc
@@ -42,18 +42,18 @@
#include <kmessagebox.h>
#include <klocale.h>
#include <kextsock.h>
-#include <qstring.h>
-#include <qcursor.h>
-#include <qwindowdefs.h>
-#include <qtimer.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qglobal.h>
-#include <qlabel.h>
-#include <qmutex.h>
-#include <qdeepcopy.h>
-#include <qclipboard.h>
-#include <qdesktopwidget.h>
+#include <tqstring.h>
+#include <tqcursor.h>
+#include <tqwindowdefs.h>
+#include <tqtimer.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqglobal.h>
+#include <tqlabel.h>
+#include <tqmutex.h>
+#include <tqdeepcopy.h>
+#include <tqclipboard.h>
+#include <tqdesktopwidget.h>
#include <X11/Xutil.h>
#include <X11/extensions/XTest.h>
@@ -167,7 +167,7 @@ static void inetdDisconnectHook()
static void clipboardHook(char* str,int len, rfbClientPtr)
{
- self->clipboardToServer(QString::fromUtf8(str, len));
+ self->clipboardToServer(TQString::fromUtf8(str, len));
}
VNCEvent::~VNCEvent() {
@@ -290,7 +290,7 @@ PointerEvent::PointerEvent(int b, int _x, int _y) :
}
void PointerEvent::exec() {
- QDesktopWidget *desktopWidget = QApplication::desktop();
+ TQDesktopWidget *desktopWidget = TQApplication::desktop();
int screen = desktopWidget->screenNumber();
if (screen < 0)
@@ -307,9 +307,9 @@ void PointerEvent::exec() {
}
-ClipboardEvent::ClipboardEvent(RFBController *c, const QString &ctext) :
+ClipboardEvent::ClipboardEvent(RFBController *c, const TQString &ctext) :
controller(c),
- text(QDeepCopy<QString>(ctext)) {
+ text(TQDeepCopy<TQString>(ctext)) {
}
void ClipboardEvent::exec() {
@@ -325,7 +325,7 @@ void ClipboardEvent::exec() {
}
-KNotifyEvent::KNotifyEvent(const QString &n, const QString &d) :
+KNotifyEvent::KNotifyEvent(const TQString &n, const TQString &d) :
name(n),
desc(d) {
}
@@ -356,14 +356,14 @@ RFBController::RFBController(Configuration *c) :
forcedClose(false)
{
self = this;
- connect(&dialog, SIGNAL(okClicked()), SLOT(dialogAccepted()));
- connect(&dialog, SIGNAL(cancelClicked()), SLOT(dialogRefused()));
- connect(&initIdleTimer, SIGNAL(timeout()), SLOT(checkAsyncEvents()));
- connect(&idleTimer, SIGNAL(timeout()), SLOT(idleSlot()));
+ connect(&dialog, TQT_SIGNAL(okClicked()), TQT_SLOT(dialogAccepted()));
+ connect(&dialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(dialogRefused()));
+ connect(&initIdleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAsyncEvents()));
+ connect(&idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(idleSlot()));
- clipboard = QApplication::clipboard();
- connect(clipboard, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
- connect(clipboard, SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+ clipboard = TQApplication::clipboard();
+ connect(clipboard, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
+ connect(clipboard, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged()));
asyncQueue.setAutoDelete(true);
@@ -386,11 +386,11 @@ RFBController::~RFBController()
void RFBController::startServer(int inetdFd, bool xtestGrab)
{
framebufferImage = XGetImage(qt_xdisplay(),
- QApplication::desktop()->winId(),
+ TQApplication::desktop()->winId(),
0,
0,
- QApplication::desktop()->width(),
- QApplication::desktop()->height(),
+ TQApplication::desktop()->width(),
+ TQApplication::desktop()->height(),
AllPlanes,
ZPixmap);
@@ -456,7 +456,7 @@ void RFBController::startServer(int inetdFd, bool xtestGrab)
passwordChanged();
scanner = new XUpdateScanner(qt_xdisplay(),
- QApplication::desktop()->winId(),
+ TQApplication::desktop()->winId(),
(unsigned char*)fb, w, h,
server->rfbServerFormat.bitsPerPixel,
server->paddedWidthInBytes,
@@ -484,7 +484,7 @@ void RFBController::stopServer(bool xtestUngrab)
if (xtestUngrab) {
disabler.disable = true;
- QTimer::singleShot(0, &disabler, SLOT(exec()));
+ TQTimer::singleShot(0, &disabler, TQT_SLOT(exec()));
}
}
@@ -613,9 +613,9 @@ void RFBController::idleSlot()
rfbUndrawCursor(server);
- QPtrList<Hint> v;
+ TQPtrList<Hint> v;
v.setAutoDelete(true);
- QPoint p = QCursor::pos();
+ TQPoint p = TQCursor::pos();
scanner->searchUpdates(v, p.y());
Hint *h;
@@ -647,7 +647,7 @@ void RFBController::dialogRefused()
emit sessionRefused();
}
-bool checkPassword(const QString &p,
+bool checkPassword(const TQString &p,
unsigned char *ochallenge,
const char *response,
int len) {
@@ -680,7 +680,7 @@ bool RFBController::handleCheckPassword(rfbClientPtr cl,
cl->authChallenge, response, len);
if (!authd) {
- QValueList<Invitation>::iterator it =
+ TQValueList<Invitation>::iterator it =
configuration->invitations().begin();
while (it != configuration->invitations().end()) {
if (checkPassword((*it).password(),
@@ -719,7 +719,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl)
int socket = cl->sock;
cl->negotiationFinishedHook = negotiationFinishedHook;
- QString host, port;
+ TQString host, port;
KSocketAddress *ksa = KExtendedSocket::peerAddress(socket);
if (ksa) {
hostent *he = 0;
@@ -730,7 +730,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl)
AF_INET);
if (he && he->h_name)
- host = QString(he->h_name);
+ host = TQString(he->h_name);
else
host = ksa->nodeName();
delete ksa;
@@ -799,7 +799,7 @@ void RFBController::handlePointerEvent(int button_mask, int x, int y) {
}
-void RFBController::clipboardToServer(const QString &ctext) {
+void RFBController::clipboardToServer(const TQString &ctext) {
if (!allowDesktopControl)
return;
@@ -814,7 +814,7 @@ void RFBController::clipboardChanged() {
if (clipboard->ownsClipboard())
return;
- QString text = clipboard->text(QClipboard::Clipboard);
+ TQString text = clipboard->text(QClipboard::Clipboard);
// avoid ping-pong between client&server
if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) &&
@@ -825,7 +825,7 @@ void RFBController::clipboardChanged() {
lastClipboardDirection = LAST_SYNC_TO_CLIENT;
lastClipboardText = text;
- QCString ctext = text.utf8();
+ TQCString ctext = text.utf8();
rfbSendServerCutText(server, ctext.data(), ctext.length());
}
@@ -835,7 +835,7 @@ void RFBController::selectionChanged() {
if (clipboard->ownsSelection())
return;
- QString text = clipboard->text(QClipboard::Selection);
+ TQString text = clipboard->text(QClipboard::Selection);
// avoid ping-pong between client&server
if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) &&
(lastClipboardText == text))
@@ -845,7 +845,7 @@ void RFBController::selectionChanged() {
lastClipboardDirection = LAST_SYNC_TO_CLIENT;
lastClipboardText = text;
- QCString ctext = text.utf8();
+ TQCString ctext = text.utf8();
rfbSendServerCutText(server, ctext.data(), ctext.length());
}
@@ -857,7 +857,7 @@ void RFBController::passwordChanged() {
server->rfbAuthPasswdData = (void*) (authRequired ? 1 : 0);
}
-void RFBController::sendKNotifyEvent(const QString &n, const QString &d)
+void RFBController::sendKNotifyEvent(const TQString &n, const TQString &d)
{
asyncMutex.lock();
asyncQueue.append(new KNotifyEvent(n, d));
diff --git a/krfb/krfb/rfbcontroller.h b/krfb/krfb/rfbcontroller.h
index 948456f2..c7646d91 100644
--- a/krfb/krfb/rfbcontroller.h
+++ b/krfb/krfb/rfbcontroller.h
@@ -27,9 +27,9 @@
#include "connectiondialog.h"
#include "xupdatescanner.h"
#include <ksock.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qmutex.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
#define HAVE_PTHREADS
#include "rfb.h"
@@ -89,17 +89,17 @@ public:
class ClipboardEvent : public VNCEvent {
RFBController *controller;
- QString text;
+ TQString text;
public:
- ClipboardEvent(RFBController *c, const QString &text);
+ ClipboardEvent(RFBController *c, const TQString &text);
virtual void exec();
};
class KNotifyEvent : public VNCEvent {
- QString name;
- QString desc;
+ TQString name;
+ TQString desc;
public:
- KNotifyEvent(const QString &n, const QString &d);
+ KNotifyEvent(const TQString &n, const TQString &d);
virtual ~KNotifyEvent();
virtual void exec();
};
@@ -120,7 +120,7 @@ public:
* set.
* @author Tim Jansen
*/
-class RFBController : public QObject {
+class RFBController : public TQObject {
Q_OBJECT
friend class SessionEstablishedEvent;
@@ -139,7 +139,7 @@ public:
void handleKeyEvent(bool down, KeySym keySym);
void handlePointerEvent(int button_mask, int x, int y);
enum rfbNewClientAction handleNewClient(rfbClientPtr cl);
- void clipboardToServer(const QString &text);
+ void clipboardToServer(const TQString &text);
void handleClientGone();
void handleNegotiationFinished(rfbClientPtr cl);
int getPort();
@@ -153,7 +153,7 @@ public slots:
void enableDesktopControl(bool c);
signals:
- void sessionEstablished(QString host);
+ void sessionEstablished(TQString host);
void sessionFinished();
void sessionRefused();
void quitApp();
@@ -161,35 +161,35 @@ signals:
private:
void stopServer(bool xtestUngrab = true);
- void sendKNotifyEvent(const QString &name, const QString &desc);
+ void sendKNotifyEvent(const TQString &name, const TQString &desc);
void sendSessionEstablished();
void disableBackground(bool state);
- QString remoteIp;
+ TQString remoteIp;
volatile bool allowDesktopControl;
- QTimer initIdleTimer;
- QTimer idleTimer;
+ TQTimer initIdleTimer;
+ TQTimer idleTimer;
enum {
LAST_SYNC_TO_SERVER,
LAST_SYNC_TO_CLIENT
} lastClipboardDirection;
- QString lastClipboardText;
+ TQString lastClipboardText;
QClipboard *clipboard;
Configuration *configuration;
XUpdateScanner *scanner;
ConnectionDialog dialog;
- QString desktopName;
+ TQString desktopName;
rfbScreenInfoPtr server;
XImage *framebufferImage;
- QMutex asyncMutex;
- QPtrList<VNCEvent> asyncQueue;
+ TQMutex asyncMutex;
+ TQPtrList<VNCEvent> asyncQueue;
bool disableBackgroundPending; // background, as desired by libvncserver
bool disableBackgroundState; // real background state
@@ -208,7 +208,7 @@ private slots:
* Class to call XTestDiscard at idle time (because otherwise
* it will not work with QT)
*/
-class XTestDisabler : public QObject {
+class XTestDisabler : public TQObject {
Q_OBJECT
public:
XTestDisabler();
diff --git a/krfb/krfb/trayicon.cpp b/krfb/krfb/trayicon.cpp
index 220ff7c0..f7d2c64a 100644
--- a/krfb/krfb/trayicon.cpp
+++ b/krfb/krfb/trayicon.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
#include "trayicon.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kstdaction.h>
#include <kapplication.h>
#include <klocale.h>
@@ -25,19 +25,19 @@
#include <kiconloader.h>
#include <kpopupmenu.h>
-KPassivePopup2::KPassivePopup2(QWidget *parent) :
+KPassivePopup2::KPassivePopup2(TQWidget *parent) :
KPassivePopup(parent){
}
-void KPassivePopup2::hideEvent( QHideEvent *e )
+void KPassivePopup2::hideEvent( TQHideEvent *e )
{
KPassivePopup::hideEvent(e);
emit hidden();
}
-KPassivePopup2 *KPassivePopup2::message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent)
+KPassivePopup2 *KPassivePopup2::message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent)
{
KPassivePopup2 *pop = new KPassivePopup2( parent);
pop->setView( caption, text, icon );
@@ -58,10 +58,10 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) :
trayIconOpen = loader->loadIcon("eyes-open24", KIcon::User);
trayIconClosed = loader->loadIcon("eyes-closed24", KIcon::User);
setPixmap(trayIconClosed);
- QToolTip::add(this, i18n("Desktop Sharing - connecting"));
+ TQToolTip::add(this, i18n("Desktop Sharing - connecting"));
- manageInvitationsAction = new KAction(i18n("Manage &Invitations"), QString::null,
- 0, this, SIGNAL(showManageInvitations()),
+ manageInvitationsAction = new KAction(i18n("Manage &Invitations"), TQString::null,
+ 0, this, TQT_SIGNAL(showManageInvitations()),
&actionCollection);
manageInvitationsAction->plug(contextMenu());
@@ -71,11 +71,11 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) :
enableControlAction->setCheckedState(i18n("Disable Remote Control"));
enableControlAction->plug(contextMenu());
enableControlAction->setEnabled(false);
- connect(enableControlAction, SIGNAL(toggled(bool)), SIGNAL(enableDesktopControl(bool)));
+ connect(enableControlAction, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(enableDesktopControl(bool)));
contextMenu()->insertSeparator();
- aboutAction = KStdAction::aboutApp(this, SLOT(showAbout()), &actionCollection);
+ aboutAction = KStdAction::aboutApp(this, TQT_SLOT(showAbout()), &actionCollection);
aboutAction->plug(contextMenu());
show();
@@ -94,27 +94,27 @@ void TrayIcon::prepareQuit() {
-void TrayIcon::showConnectedMessage(QString host) {
+void TrayIcon::showConnectedMessage(TQString host) {
setPixmap(trayIconOpen);
KPassivePopup2::message(i18n("Desktop Sharing"),
i18n("The remote user has been authenticated and is now connected."),
trayIconOpen,
this);
- QToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host));
+ TQToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host));
}
void TrayIcon::showDisconnectedMessage() {
if (quitting)
return;
- QToolTip::add(this, i18n("Desktop Sharing - disconnected"));
+ TQToolTip::add(this, i18n("Desktop Sharing - disconnected"));
setPixmap(trayIconClosed);
KPassivePopup2 *p = KPassivePopup2::message(i18n("Desktop Sharing"),
i18n("The remote user has closed the connection."),
trayIconClosed,
this);
- connect(p, SIGNAL(hidden()), this, SIGNAL(diconnectedMessageDisplayed()));
+ connect(p, TQT_SIGNAL(hidden()), this, TQT_SIGNAL(diconnectedMessageDisplayed()));
}
void TrayIcon::setDesktopControlSetting(bool b) {
@@ -122,7 +122,7 @@ void TrayIcon::setDesktopControlSetting(bool b) {
enableControlAction->setChecked(b);
}
-void TrayIcon::mousePressEvent(QMouseEvent *e)
+void TrayIcon::mousePressEvent(TQMouseEvent *e)
{
if (!rect().contains(e->pos()))
return;
diff --git a/krfb/krfb/trayicon.h b/krfb/krfb/trayicon.h
index 4e586efa..ea4e7132 100644
--- a/krfb/krfb/trayicon.h
+++ b/krfb/krfb/trayicon.h
@@ -20,7 +20,7 @@
#include "configuration.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
#include <kaction.h>
#include <ksystemtray.h>
@@ -31,10 +31,10 @@ class KDialog;
class KPassivePopup2 : public KPassivePopup {
Q_OBJECT
public:
- KPassivePopup2(QWidget *parent);
- static KPassivePopup2 *message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent);
+ KPassivePopup2(TQWidget *parent);
+ static KPassivePopup2 *message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent);
signals:
void hidden();
@@ -43,7 +43,7 @@ protected:
/**
* Reimplemented to detect hide events.
*/
- virtual void hideEvent( QHideEvent *e );
+ virtual void hideEvent( TQHideEvent *e );
};
/**
@@ -64,12 +64,12 @@ signals:
public slots:
void prepareQuit();
- void showConnectedMessage(QString host);
+ void showConnectedMessage(TQString host);
void showDisconnectedMessage();
void setDesktopControlSetting(bool);
protected:
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
private:
diff --git a/krfb/krfb/xupdatescanner.cc b/krfb/krfb/xupdatescanner.cc
index b2cd4f85..52519475 100644
--- a/krfb/krfb/xupdatescanner.cc
+++ b/krfb/krfb/xupdatescanner.cc
@@ -356,7 +356,7 @@ static void printStatistics(Hint &hint) {
}
void XUpdateScanner::flushHint(int x, int y, int &x0,
- Hint &hint, QPtrList<Hint> &hintList)
+ Hint &hint, TQPtrList<Hint> &hintList)
{
if (x0 < 0)
return;
@@ -371,7 +371,7 @@ void XUpdateScanner::flushHint(int x, int y, int &x0,
hintList.append(new Hint(hint));
}
-void XUpdateScanner::createHints(QPtrList<Hint> &hintList)
+void XUpdateScanner::createHints(TQPtrList<Hint> &hintList)
{
Hint hint;
int x0 = -1;
@@ -441,7 +441,7 @@ void XUpdateScanner::testScanline(int y, bool rememberHits) {
recentHitScanlines[MAX_RECENT_HITS-1] = y;
}
-void XUpdateScanner::searchUpdates(QPtrList<Hint> &hintList, int ptrY)
+void XUpdateScanner::searchUpdates(TQPtrList<Hint> &hintList, int ptrY)
{
count++;
count %= SCANLINES;
diff --git a/krfb/krfb/xupdatescanner.h b/krfb/krfb/xupdatescanner.h
index 00cbec82..fdd02e30 100644
--- a/krfb/krfb/xupdatescanner.h
+++ b/krfb/krfb/xupdatescanner.h
@@ -21,7 +21,7 @@
#ifndef _hexonet_rfb_XUpdateScanner_h_
#define _hexonet_rfb_XUpdateScanner_h_
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <X11/Xlib.h>
#include <X11/extensions/XShm.h>
@@ -76,15 +76,15 @@ class XUpdateScanner
// hitList: returns list of changes
// ptrY: ptrY: position of the cursor
- void searchUpdates( QPtrList<Hint> &hintList, int ptrY);
+ void searchUpdates( TQPtrList<Hint> &hintList, int ptrY);
private:
void testScanline(int y, bool rememberHits);
bool copyTile(int x, int y, int tx, int ty);
void copyAllTiles();
void flushHint(int x, int y, int &x0, Hint &hint,
- QPtrList<Hint> &hintList);
- void createHints(QPtrList<Hint> &hintList);
+ TQPtrList<Hint> &hintList);
+ void createHints(TQPtrList<Hint> &hintList);
void addTileToHint(int x, int y, int th, Hint &hint);
void createHintFromTile(int x, int y, int th, Hint &hint);
diff --git a/krfb/libvncserver/main.c b/krfb/libvncserver/main.c
index 207e512d..5b318b8b 100644
--- a/krfb/libvncserver/main.c
+++ b/krfb/libvncserver/main.c
@@ -150,7 +150,7 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
} else {
sraRgnOr(cl->modifiedRegion,copyRegion);
}
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
}
@@ -208,7 +208,7 @@ void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion)
while((cl=rfbClientIteratorNext(iterator))) {
LOCK(cl->updateMutex);
sraRgnOr(cl->modifiedRegion,modRegion);
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
}
@@ -308,7 +308,7 @@ clientInput(void *data)
/* Get rid of the output thread. */
LOCK(cl->updateMutex);
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
IF_PTHREADS(pthread_join(output_thread, NULL));
diff --git a/krfb/libvncserver/rfb.h b/krfb/libvncserver/rfb.h
index 1d62aca5..7f613300 100644
--- a/krfb/libvncserver/rfb.h
+++ b/krfb/libvncserver/rfb.h
@@ -144,7 +144,7 @@ typedef unsigned long KeySym;
#define MUTEX(mutex) int mutex
#define INIT_MUTEX(mutex) fprintf(stderr,"%s:%d INIT_MUTEX(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex))
#define TINI_MUTEX(mutex) fprintf(stderr,"%s:%d TINI_MUTEX(%s)\n",__FILE__,__LINE__,#mutex)
-#define SIGNAL(cond) fprintf(stderr,"%s:%d SIGNAL(%s)\n",__FILE__,__LINE__,#cond)
+#define VSIGNAL(cond) fprintf(stderr,"%s:%d VSIGNAL(%s)\n",__FILE__,__LINE__,#cond)
#define WAIT(cond,mutex) /* fprintf(stderr,"%s:%d WAIT(%s,%s)\n",__FILE__,__LINE__,#cond,#mutex) */
#define COND(cond)
#define INIT_COND(cond) fprintf(stderr,"%s:%d INIT_COND(%s)\n",__FILE__,__LINE__,#cond)
@@ -156,7 +156,7 @@ typedef unsigned long KeySym;
#define MUTEX(mutex) pthread_mutex_t (mutex)
#define INIT_MUTEX(mutex) pthread_mutex_init(&(mutex),NULL)
#define TINI_MUTEX(mutex) pthread_mutex_destroy(&(mutex))
-#define TSIGNAL(cond) pthread_cond_signal(&(cond))
+#define VSIGNAL(cond) pthread_cond_signal(&(cond))
#define WAIT(cond,mutex) pthread_cond_wait(&(cond),&(mutex))
#define TIMEDWAIT(cond,mutex,t) {struct timeval tv;\
tv.tv_sec = (t) / 1000;\
@@ -173,7 +173,7 @@ typedef unsigned long KeySym;
#define MUTEX(mutex)
#define INIT_MUTEX(mutex)
#define TINI_MUTEX(mutex)
-#define TSIGNAL(cond)
+#define VSIGNAL(cond)
#define WAIT(cond,mutex) this_is_unsupported
#define COND(cond)
#define INIT_COND(cond)
diff --git a/krfb/libvncserver/rfbserver.c b/krfb/libvncserver/rfbserver.c
index 66cc4ee3..baf21bb1 100644
--- a/krfb/libvncserver/rfbserver.c
+++ b/krfb/libvncserver/rfbserver.c
@@ -71,7 +71,7 @@ void rfbDecrClientRef(rfbClientPtr cl)
LOCK(cl->refCountMutex);
cl->refCount--;
if(cl->refCount<=0) /* just to be sure also < 0 */
- TSIGNAL(cl->deleteCond);
+ TQT_SIGNAL(cl->deleteCond);
UNLOCK(cl->refCountMutex);
}
#else
@@ -837,7 +837,7 @@ rfbProcessClientNormalMessage(cl)
sraRgnOr(cl->modifiedRegion,tmpRegion);
sraRgnSubtract(cl->copyRegion,tmpRegion);
}
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
sraRgnDestroy(tmpRegion);
diff --git a/krfb/libvncserver/sockets.c b/krfb/libvncserver/sockets.c
index 68025b3d..c375e928 100644
--- a/krfb/libvncserver/sockets.c
+++ b/krfb/libvncserver/sockets.c
@@ -318,7 +318,7 @@ rfbCloseClient(cl)
close(cl->sock);
cl->sock = -1;
}
- TSIGNAL(cl->updateCond);
+ TQT_SIGNAL(cl->updateCond);
UNLOCK(cl->updateMutex);
}
diff --git a/krfb/srvloc/kinetinterface.cpp b/krfb/srvloc/kinetinterface.cpp
index 0599dfa7..d1f45652 100644
--- a/krfb/srvloc/kinetinterface.cpp
+++ b/krfb/srvloc/kinetinterface.cpp
@@ -30,7 +30,7 @@
class KInetInterfacePrivate {
public:
- QString name;
+ TQString name;
int flags;
KInetSocketAddress *address;
KInetSocketAddress *netmask;
@@ -45,7 +45,7 @@ public:
destination(0) {
}
- KInetInterfacePrivate(const QString _name,
+ KInetInterfacePrivate(const TQString _name,
int _flags,
KInetSocketAddress *_address,
KInetSocketAddress *_netmask,
@@ -99,7 +99,7 @@ KInetInterface::KInetInterface() :
d(0) {
}
-KInetInterface::KInetInterface(const QString &_name,
+KInetInterface::KInetInterface(const TQString &_name,
int _flags,
KInetSocketAddress *_address,
KInetSocketAddress *_netmask,
@@ -143,11 +143,11 @@ bool KInetInterface::isValid() const {
return d == 0;
}
-QString KInetInterface::displayName() const {
+TQString KInetInterface::displayName() const {
return d->name;
}
-QString KInetInterface::name() const {
+TQString KInetInterface::name() const {
return d->name;
}
@@ -172,13 +172,13 @@ KInetSocketAddress *KInetInterface::destinationAddress() const {
}
KInetSocketAddress *KInetInterface::getPublicInetAddress() {
- QValueVector<KInetInterface> v = getAllInterfaces(true);
+ TQValueVector<KInetInterface> v = getAllInterfaces(true);
// TODO: first step: take the default route interface
// try to find point-2-point interface, because it may be
// a dial-up connection. Take it.
- QValueVector<KInetInterface>::const_iterator it = v.begin();
+ TQValueVector<KInetInterface>::const_iterator it = v.begin();
while (it != v.end()) {
if (((*it).flags() & (PointToPoint | Up | Running)) &&
(!((*it).flags() & Loopback)) &&
@@ -247,10 +247,10 @@ namespace {
}
}
-QValueVector<KInetInterface> KInetInterface::getAllInterfaces(bool includeLoopback) {
+TQValueVector<KInetInterface> KInetInterface::getAllInterfaces(bool includeLoopback) {
struct kde_ifaddrs *ads;
struct kde_ifaddrs *a;
- QValueVector<KInetInterface> r;
+ TQValueVector<KInetInterface> r;
if (kde_getifaddrs(&ads))
return r;
@@ -260,7 +260,7 @@ QValueVector<KInetInterface> KInetInterface::getAllInterfaces(bool includeLoopba
a = a->ifa_next;
continue;
}
- r.push_back(KInetInterface(QString::fromUtf8(a->ifa_name),
+ r.push_back(KInetInterface(TQString::fromUtf8(a->ifa_name),
convertFlags(a->ifa_flags),
createAddress(a->ifa_addr),
createAddress(a->ifa_netmask),
diff --git a/krfb/srvloc/kinetinterface.h b/krfb/srvloc/kinetinterface.h
index fe3899cb..e3f0328b 100644
--- a/krfb/srvloc/kinetinterface.h
+++ b/krfb/srvloc/kinetinterface.h
@@ -22,9 +22,9 @@
#ifndef KINETINTERFACE_H
#define KINETINTERFACE_H
-#include <qvaluevector.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqvaluevector.h>
+#include <tqcstring.h>
+#include <tqstring.h>
class KInetInterfacePrivate;
@@ -48,7 +48,7 @@ class KInetSocketAddress;
*/
class KInetInterface {
private:
- KInetInterface(const QString &name,
+ KInetInterface(const TQString &name,
int flags,
KInetSocketAddress *address,
KInetSocketAddress *netmask,
@@ -93,14 +93,14 @@ public:
* @return the display name of the interface
* @see name()
*/
- QString displayName() const;
+ TQString displayName() const;
/**
* Returns the name of the interface, e.g. 'eth0'.
* @return the name of the interface
* @see displayName()
*/
- QString name() const;
+ TQString name() const;
/**
* Flags describing the interface. These flags
@@ -177,7 +177,7 @@ public:
* name
* @return the list of IP addresses
*/
- static QValueVector<KInetInterface> getAllInterfaces(bool includeLoopback = false);
+ static TQValueVector<KInetInterface> getAllInterfaces(bool includeLoopback = false);
private:
KInetInterfacePrivate* d;
diff --git a/krfb/srvloc/kinetinterfacewatcher.cpp b/krfb/srvloc/kinetinterfacewatcher.cpp
index 02f21c6c..1e0fa8e6 100644
--- a/krfb/srvloc/kinetinterfacewatcher.cpp
+++ b/krfb/srvloc/kinetinterfacewatcher.cpp
@@ -25,11 +25,11 @@
class KInetInterfaceWatcherPrivate {
public:
- QString interface;
+ TQString interface;
int minInterval; // not used yet, but my be when a daemon watches
- KInetInterfaceWatcherPrivate(const QString &iface,
+ KInetInterfaceWatcherPrivate(const TQString &iface,
int minIntv) :
interface(iface),
minInterval(minIntv) {
@@ -39,17 +39,17 @@ public:
/*
* or all network interfaces.
* @param interface the name of the interface to watch (e.g.'eth0')
- * or QString::null to watch all interfaces
+ * or TQString::null 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::KInetInterfaceWatcher(const QString &interface,
+KInetInterfaceWatcher::KInetInterfaceWatcher(const TQString &interface,
int minInterval) {
d = new KInetInterfaceWatcherPrivate(interface, minInterval);
}
-QString KInetInterfaceWatcher::interface() const {
+TQString KInetInterfaceWatcher::interface() const {
return d->interface;
}
diff --git a/krfb/srvloc/kinetinterfacewatcher.h b/krfb/srvloc/kinetinterfacewatcher.h
index 399aa3fc..75d72ef8 100644
--- a/krfb/srvloc/kinetinterfacewatcher.h
+++ b/krfb/srvloc/kinetinterfacewatcher.h
@@ -23,10 +23,10 @@
#define KINETINTERFACEWATCHER_H
#include <kinetinterface.h>
-#include <qobject.h>
-#include <qvaluevector.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqcstring.h>
+#include <tqstring.h>
class KInetInterfaceWatcherPrivate;
@@ -43,7 +43,7 @@ class KInetInterfaceWatcherPrivate;
* @see KInetInterface
* @since 3.2
*/
-class KInetInterfaceWatcher : public QObject {
+class KInetInterfaceWatcher : public TQObject {
Q_OBJECT
public:
/**
@@ -51,34 +51,34 @@ public:
* you must @ref start() it.
*
* @param interface the name of the interface to watch (e.g.'eth0')
- * or QString::null to watch all interfaces
+ * or TQString::null 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 QString &interface = QString::null,
+ KInetInterfaceWatcher(const TQString &interface = TQString::null,
int minInterval = 60);
/**
* Returns the name of the interface that is being watched.
- * @return the name of the interface, or QString::null if all
+ * @return the name of the interface, or TQString::null if all
* interfaces are watched
*/
- QString interface() const;
+ TQString interface() const;
/**
* Starts the KInetInterfaceWatcher. It watches either one
* 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 QString::null to watch all interfaces
+ * or TQString::null 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 QString &interface = QString::null,
+ void start(const TQString &interface = TQString::null,
int minInterval = 60);
/**
@@ -109,11 +109,11 @@ signals:
* address has changed.
*
* @param interfaceName the name of the interface that is watched,
- * by the emitter, or QString::null if all
+ * by the emitter, or TQString::null if all
* interfaces are being watched
* @see start()
*/
- void changed(QString interfaceName);
+ void changed(TQString interfaceName);
private:
KInetInterfaceWatcherPrivate* d;
diff --git a/krfb/srvloc/kserviceregistry.cpp b/krfb/srvloc/kserviceregistry.cpp
index 49e3de15..f8ab6b51 100644
--- a/krfb/srvloc/kserviceregistry.cpp
+++ b/krfb/srvloc/kserviceregistry.cpp
@@ -31,14 +31,14 @@
class KServiceRegistryPrivate {
public:
- KServiceRegistryPrivate(const QString &lang) :
+ KServiceRegistryPrivate(const TQString &lang) :
m_opened(false),
m_lang(lang) {
}
bool ensureOpen();
bool m_opened;
- QString m_lang;
+ TQString m_lang;
SLPHandle m_handle;
friend void KServiceRegistryRegReport(SLPHandle slp,
@@ -57,7 +57,7 @@ void KServiceRegistryRegReport(SLPHandle,
}
-KServiceRegistry::KServiceRegistry(const QString &lang) {
+KServiceRegistry::KServiceRegistry(const TQString &lang) {
d = new KServiceRegistryPrivate(lang);
}
@@ -86,8 +86,8 @@ bool KServiceRegistry::available() {
return d->ensureOpen();
}
-bool KServiceRegistry::registerService(const QString &serviceURL,
- QString attributes,
+bool KServiceRegistry::registerService(const TQString &serviceURL,
+ TQString attributes,
unsigned short lifetime) {
if (!d->ensureOpen())
return false;
@@ -108,24 +108,24 @@ bool KServiceRegistry::registerService(const QString &serviceURL,
return d->m_cbSuccess;
}
-bool KServiceRegistry::registerService(const QString &serviceURL,
- QMap<QString,QString> attributes,
+bool KServiceRegistry::registerService(const TQString &serviceURL,
+ TQMap<TQString,TQString> attributes,
unsigned short lifetime) {
if (!d->ensureOpen())
return false;
// TODO: encode strings in map?
- QString s;
- QMap<QString,QString>::iterator it = attributes.begin();
+ TQString s;
+ TQMap<TQString,TQString>::iterator it = attributes.begin();
while (it != attributes.end()) {
if (!s.isEmpty())
s += ",";
- s += QString("(%1=%2)").arg(it.key()).arg(it.data());
+ s += TQString("(%1=%2)").arg(it.key()).arg(it.data());
it++;
}
return registerService(serviceURL, s, lifetime);
}
-void KServiceRegistry::unregisterService(const QString &serviceURL) {
+void KServiceRegistry::unregisterService(const TQString &serviceURL) {
if (!d->m_opened)
return;
SLPDereg(d->m_handle, serviceURL.latin1(),
@@ -133,19 +133,19 @@ void KServiceRegistry::unregisterService(const QString &serviceURL) {
d);
}
-QString KServiceRegistry::encodeAttributeValue(const QString &value) {
+TQString KServiceRegistry::encodeAttributeValue(const TQString &value) {
char *n;
if (SLPEscape(value.latin1(), &n, SLP_TRUE) == SLP_OK) {
- QString r(n);
+ TQString r(n);
SLPFree(n);
return r;
}
- return QString::null;
+ return TQString::null;
}
#else
-KServiceRegistry::KServiceRegistry(const QString &lang) :
+KServiceRegistry::KServiceRegistry(const TQString &lang) :
d(0) {
}
@@ -156,24 +156,24 @@ bool KServiceRegistry::available() {
return false;
}
-bool KServiceRegistry::registerService(const QString &, QString, unsigned short ) {
+bool KServiceRegistry::registerService(const TQString &, TQString, unsigned short ) {
return false;
}
-bool KServiceRegistry::registerService(const QString &, QMap<QString,QString>, unsigned short) {
+bool KServiceRegistry::registerService(const TQString &, TQMap<TQString,TQString>, unsigned short) {
return false;
}
-void KServiceRegistry::unregisterService(const QString &) {
+void KServiceRegistry::unregisterService(const TQString &) {
}
-QString KServiceRegistry::encodeAttributeValue(const QString &value) {
+TQString KServiceRegistry::encodeAttributeValue(const TQString &value) {
return value;
}
#endif
-QString KServiceRegistry::createCommaList(const QStringList &values) {
+TQString KServiceRegistry::createCommaList(const TQStringList &values) {
return values.join(",");
}
diff --git a/krfb/srvloc/kserviceregistry.h b/krfb/srvloc/kserviceregistry.h
index a1c439ae..8cd965e6 100644
--- a/krfb/srvloc/kserviceregistry.h
+++ b/krfb/srvloc/kserviceregistry.h
@@ -25,9 +25,9 @@
#ifndef __KSERVICEREGISTRY_H
#define __KSERVICEREGISTRY_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class KServiceRegistryPrivate;
@@ -78,7 +78,7 @@ class KServiceRegistryPrivate;
* <pre>
* KServiceRegistry ksr;
* KInetAddress kia = KInetAddress->getLocalAddress();
- * ksr.registerService(QString("service:remotedesktop.kde:vnc://%1:0").arg(kia->nodeName()),
+ * ksr.registerService(TQString("service:remotedesktop.kde:vnc://%1:0").arg(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 QString::null for the
+ * @param lang the language as two letter code, or TQString::null for the
* system default
*/
- KServiceRegistry(const QString &lang = QString::null);
+ KServiceRegistry(const TQString &lang = TQString::null);
virtual ~KServiceRegistry();
/**
@@ -110,17 +110,17 @@ class KServiceRegistry {
* @param map the items of this list will be converted
* @return the comma-separated list
*/
- static QString createCommaList(const QStringList &values);
+ static TQString createCommaList(const TQStringList &values);
/**
- * Encodes an QString for use as a attribute value. This will escape
+ * Encodes an TQString for use as a attribute value. This will escape
* all characters that are not allowed. This method is only available
* when a SLP library is available, otherwise it will return the
* given value.
* @param value the value string to encode
* @return the encoded value string
*/
- static QString encodeAttributeValue(const QString &value);
+ static TQString encodeAttributeValue(const TQString &value);
/**
* Registers the given service.
@@ -132,8 +132,8 @@ class KServiceRegistry {
* @return true if successful, false otherwise. False usually means that no
* SA daemon (slpd) is running.
*/
- bool registerService(const QString &serviceURL,
- QString attributes = QString::null,
+ bool registerService(const TQString &serviceURL,
+ TQString attributes = TQString::null,
unsigned short lifetime = 0);
/**
@@ -144,15 +144,15 @@ class KServiceRegistry {
* @return true if successful, false otherwise. False usually means that no
* SA daemon is running (slpd).
*/
- bool registerService(const QString &serviceURL,
- QMap<QString,QString> attributes,
+ bool registerService(const TQString &serviceURL,
+ TQMap<TQString,TQString> attributes,
unsigned short lifetime = 0);
/**
* Unregisters the given service.
* @param serviceURL the service URL to unregister
*/
- void unregisterService(const QString &serviceURL);
+ void unregisterService(const TQString &serviceURL);
private:
KServiceRegistryPrivate *d;
diff --git a/krfb/srvloc/uuid.cpp b/krfb/srvloc/uuid.cpp
index 61f78d86..931f0aa8 100644
--- a/krfb/srvloc/uuid.cpp
+++ b/krfb/srvloc/uuid.cpp
@@ -235,11 +235,11 @@ static void uuid_unparse(const uuid_t uu, char *out)
uuid.node[3], uuid.node[4], uuid.node[5]);
}
-QString createUUID() {
+TQString createUUID() {
char s[37];
uuid_t uu;
uuid_generate_time(uu);
uuid_unparse(uu, s);
- return QString(s);
+ return TQString(s);
}
diff --git a/krfb/srvloc/uuid.h b/krfb/srvloc/uuid.h
index d63f2cf5..eed91de5 100644
--- a/krfb/srvloc/uuid.h
+++ b/krfb/srvloc/uuid.h
@@ -22,8 +22,8 @@
#ifndef UUID_H
#define UUID_H
-#include <qstring.h>
+#include <tqstring.h>
-QString createUUID();
+TQString createUUID();
#endif /* UUID_H */