summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/smpppdcs
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/plugins/smpppdcs
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/smpppdcs')
-rw-r--r--kopete/plugins/smpppdcs/Changelog.smpppdcs2
-rw-r--r--kopete/plugins/smpppdcs/detector.h2
-rw-r--r--kopete/plugins/smpppdcs/detectornetstat.cpp12
-rw-r--r--kopete/plugins/smpppdcs/detectornetstat.h3
-rw-r--r--kopete/plugins/smpppdcs/detectornetworkstatus.cpp44
-rw-r--r--kopete/plugins/smpppdcs/detectornetworkstatus.h15
-rw-r--r--kopete/plugins/smpppdcs/detectorsmpppd.cpp12
-rw-r--r--kopete/plugins/smpppdcs/detectorsmpppd.h2
-rw-r--r--kopete/plugins/smpppdcs/iconnector.h4
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp2
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp4
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp8
-rw-r--r--kopete/plugins/smpppdcs/onlineinquiry.cpp6
-rw-r--r--kopete/plugins/smpppdcs/onlineinquiry.h6
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsplugin.cpp26
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsplugin.h9
-rw-r--r--kopete/plugins/smpppdcs/smpppdcspreferences.cpp8
-rw-r--r--kopete/plugins/smpppdcs/smpppdcspreferences.h5
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsprefs.ui34
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp6
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsprefsimpl.h3
-rw-r--r--kopete/plugins/smpppdcs/smpppdlocationui.ui18
-rw-r--r--kopete/plugins/smpppdcs/smpppdlocationwidget.cpp4
-rw-r--r--kopete/plugins/smpppdcs/smpppdlocationwidget.h3
-rw-r--r--kopete/plugins/smpppdcs/smpppdsearcher.cpp12
-rw-r--r--kopete/plugins/smpppdcs/smpppdsearcher.h7
-rw-r--r--kopete/plugins/smpppdcs/unittest/clienttest.cpp8
-rw-r--r--kopete/plugins/smpppdcs/unittest/clienttest.h1
28 files changed, 137 insertions, 129 deletions
diff --git a/kopete/plugins/smpppdcs/Changelog.smpppdcs b/kopete/plugins/smpppdcs/Changelog.smpppdcs
index 80854a86..4884da4f 100644
--- a/kopete/plugins/smpppdcs/Changelog.smpppdcs
+++ b/kopete/plugins/smpppdcs/Changelog.smpppdcs
@@ -19,7 +19,7 @@ Changelog
* using KConfigXT for configuration
* using dcopidl2cpp stub generated from kinternetiface.h (from kinternet package),
no more own implementation
-* experimental implementation of the the KDED-NetworkStatus (not active, yet)
+* experimental implementation of the the KDED-NetworktqStatus (not active, yet)
* significantly speeded up automatic detection of a SMPPPD
* BUGFIX: reloading the plugin in a already running Kopete will no more
result in an inactive plugin
diff --git a/kopete/plugins/smpppdcs/detector.h b/kopete/plugins/smpppdcs/detector.h
index 094de9e5..1889a84f 100644
--- a/kopete/plugins/smpppdcs/detector.h
+++ b/kopete/plugins/smpppdcs/detector.h
@@ -48,7 +48,7 @@ public:
*/
virtual ~Detector() {}
- virtual void checkStatus() const = 0;
+ virtual void checktqStatus() const = 0;
virtual void smpppdServerChange() {}
diff --git a/kopete/plugins/smpppdcs/detectornetstat.cpp b/kopete/plugins/smpppdcs/detectornetstat.cpp
index cb9a393a..a08f2c4f 100644
--- a/kopete/plugins/smpppdcs/detectornetstat.cpp
+++ b/kopete/plugins/smpppdcs/detectornetstat.cpp
@@ -21,13 +21,13 @@
#include "detectornetstat.h"
DetectorNetstat::DetectorNetstat(IConnector* connector)
- : Detector(connector), m_buffer(TQString::null), m_process(NULL) {}
+ : Detector(connector), m_buffer(TQString()), m_process(NULL) {}
DetectorNetstat::~DetectorNetstat() {
delete m_process;
}
-void DetectorNetstat::checkStatus() const {
+void DetectorNetstat::checktqStatus() const {
kdDebug(14312) << k_funcinfo << endl;
if(m_process) {
@@ -37,7 +37,7 @@ void DetectorNetstat::checkStatus() const {
return;
}
- m_buffer = TQString::null;
+ m_buffer = TQString();
// Use KProcess to run netstat -r. We'll then parse the output of
// netstat -r in slotProcessStdout() to see if it mentions the
@@ -59,15 +59,15 @@ void DetectorNetstat::checkStatus() const {
void DetectorNetstat::slotProcessStdout(KProcess *, char *buffer, int buflen) {
// Look for a default gateway
kdDebug(14312) << k_funcinfo << endl;
- m_buffer += TQString::fromLatin1(buffer, buflen);
+ m_buffer += TQString::tqfromLatin1(buffer, buflen);
kdDebug(14312) << m_buffer << endl;
}
void DetectorNetstat::slotProcessExited(KProcess *process) {
kdDebug(14312) << k_funcinfo << m_buffer << endl;
if(process == m_process) {
- m_connector->setConnectedStatus(m_buffer.contains("default"));
- m_buffer = TQString::null;
+ m_connector->setConnectedtqStatus(m_buffer.tqcontains("default"));
+ m_buffer = TQString();
delete m_process;
m_process = 0L;
}
diff --git a/kopete/plugins/smpppdcs/detectornetstat.h b/kopete/plugins/smpppdcs/detectornetstat.h
index bd41ae58..1f6d1161 100644
--- a/kopete/plugins/smpppdcs/detectornetstat.h
+++ b/kopete/plugins/smpppdcs/detectornetstat.h
@@ -29,6 +29,7 @@ class IConnector;
*/
class DetectorNetstat : protected TQObject, public Detector {
Q_OBJECT
+ TQ_OBJECT
DetectorNetstat(const DetectorNetstat&);
DetectorNetstat& operator=(const DetectorNetstat&);
@@ -37,7 +38,7 @@ public:
DetectorNetstat(IConnector* connector);
virtual ~DetectorNetstat();
- virtual void checkStatus() const;
+ virtual void checktqStatus() const;
private slots:
// Original cs-plugin code
diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp
index e2b1ae19..a6fd2cb6 100644
--- a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp
+++ b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp
@@ -22,45 +22,45 @@
#include "iconnector.h"
#include "detectornetworkstatus.h"
-DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector)
+DetectorNetworktqStatus::DetectorNetworktqStatus(IConnector* connector)
: Detector(connector), m_connManager(NULL) {
m_connManager = ConnectionManager::self();
- connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus)),
- this, TQT_SLOT(statusChanged(const TQString&, NetworkStatus::EnumStatus)));
+ connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworktqStatus::EnumtqStatus)),
+ this, TQT_SLOT(statusChanged(const TQString&, NetworktqStatus::EnumtqStatus)));
}
-DetectorNetworkStatus::~DetectorNetworkStatus() {}
+DetectorNetworktqStatus::~DetectorNetworktqStatus() {}
-void DetectorNetworkStatus::checkStatus() const {
+void DetectorNetworktqStatus::checktqStatus() const {
// needs to do nothing
}
-void DetectorNetworkStatus::statusChanged(const TQString& host, NetworkStatus::EnumStatus status) {
+void DetectorNetworktqStatus::statusChanged(const TQString& host, NetworktqStatus::EnumtqStatus status) {
switch(status) {
- case NetworkStatus::Offline:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl;
+ case NetworktqStatus::Offline:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Offline" << endl;
break;
- case NetworkStatus::OfflineFailed:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineFailed" << endl;
+ case NetworktqStatus::OfflineFailed:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::OfflineFailed" << endl;
break;
- case NetworkStatus::OfflineDisconnected:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineDisconnected" << endl;
+ case NetworktqStatus::OfflineDisconnected:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::OfflineDisconnected" << endl;
break;
- case NetworkStatus::ShuttingDown:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::ShuttingDown" << endl;
+ case NetworktqStatus::ShuttingDown:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::ShuttingDown" << endl;
break;
- case NetworkStatus::Establishing:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Establishing" << endl;
+ case NetworktqStatus::Establishing:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Establishing" << endl;
break;
- case NetworkStatus::Online:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Online" << endl;
+ case NetworktqStatus::Online:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Online" << endl;
break;
- case NetworkStatus::NoNetworks:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::NoNetworks" << endl;
+ case NetworktqStatus::NoNetworks:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::NoNetworks" << endl;
break;
- case NetworkStatus::Unreachable:
- kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Unreachable" << endl;
+ case NetworktqStatus::Unreachable:
+ kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Unreachable" << endl;
break;
}
}
diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.h b/kopete/plugins/smpppdcs/detectornetworkstatus.h
index dd3a7394..1c1896e6 100644
--- a/kopete/plugins/smpppdcs/detectornetworkstatus.h
+++ b/kopete/plugins/smpppdcs/detectornetworkstatus.h
@@ -27,21 +27,22 @@ class ConnectionManager;
/**
@author Heiko Sch&auml;fer <heiko@rangun.de>
*/
-class DetectorNetworkStatus : protected TQObject, public Detector
+class DetectorNetworktqStatus : protected TQObject, public Detector
{
Q_OBJECT
+ TQ_OBJECT
- DetectorNetworkStatus(const DetectorNetworkStatus&);
- DetectorNetworkStatus& operator=(const DetectorNetworkStatus&);
+ DetectorNetworktqStatus(const DetectorNetworktqStatus&);
+ DetectorNetworktqStatus& operator=(const DetectorNetworktqStatus&);
public:
- DetectorNetworkStatus(IConnector* connector);
- virtual ~DetectorNetworkStatus();
+ DetectorNetworktqStatus(IConnector* connector);
+ virtual ~DetectorNetworktqStatus();
- virtual void checkStatus() const;
+ virtual void checktqStatus() const;
protected slots:
- void statusChanged(const TQString& host, NetworkStatus::EnumStatus status);
+ void statusChanged(const TQString& host, NetworktqStatus::EnumtqStatus status);
private:
ConnectionManager * m_connManager;
diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.cpp b/kopete/plugins/smpppdcs/detectorsmpppd.cpp
index 772090d9..1b932d6d 100644
--- a/kopete/plugins/smpppdcs/detectorsmpppd.cpp
+++ b/kopete/plugins/smpppdcs/detectorsmpppd.cpp
@@ -31,9 +31,9 @@ DetectorSMPPPD::DetectorSMPPPD(IConnector * connector)
DetectorSMPPPD::~DetectorSMPPPD() {}
/*!
- \fn DetectorSMPPPD::checkStatus()
+ \fn DetectorSMPPPD::checktqStatus()
*/
-void DetectorSMPPPD::checkStatus() const {
+void DetectorSMPPPD::checktqStatus() const {
kdDebug(14312) << k_funcinfo << "Checking for online status..." << endl;
#ifndef NOKINTERNETDCOP
@@ -41,10 +41,10 @@ void DetectorSMPPPD::checkStatus() const {
if(kapp->dcopClient() && m_kinternetApp != "") {
switch(getConnectionStatusDCOP()) {
case CONNECTED:
- m_connector->setConnectedStatus(true);
+ m_connector->setConnectedtqStatus(true);
return;
case DISCONNECTED:
- m_connector->setConnectedStatus(false);
+ m_connector->setConnectedtqStatus(false);
return;
default:
break;
@@ -63,9 +63,9 @@ void DetectorSMPPPD::checkStatus() const {
c.setPassword(SMPPPDCSConfig::self()->password().utf8());
if(c.connect(server, port)) {
- m_connector->setConnectedStatus(c.isOnline());
+ m_connector->setConnectedtqStatus(c.isOnline());
} else {
kdDebug(14312) << k_funcinfo << "not connected to smpppd => I'll try again later" << endl;
- m_connector->setConnectedStatus(false);
+ m_connector->setConnectedtqStatus(false);
}
}
diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.h b/kopete/plugins/smpppdcs/detectorsmpppd.h
index 197fe65b..cba377e0 100644
--- a/kopete/plugins/smpppdcs/detectorsmpppd.h
+++ b/kopete/plugins/smpppdcs/detectorsmpppd.h
@@ -39,7 +39,7 @@ public:
DetectorSMPPPD(IConnector* connector);
virtual ~DetectorSMPPPD();
- virtual void checkStatus() const;
+ virtual void checktqStatus() const;
};
diff --git a/kopete/plugins/smpppdcs/iconnector.h b/kopete/plugins/smpppdcs/iconnector.h
index c4846862..ab63ec71 100644
--- a/kopete/plugins/smpppdcs/iconnector.h
+++ b/kopete/plugins/smpppdcs/iconnector.h
@@ -37,9 +37,9 @@ public:
* This method needs to get reimplemented at classes which implement
* this interface.
*
- * @param newStatus the status of the internet connection, <code>TRUE</code> if there is a connection, otherwise <code>FALSE</code>
+ * @param newtqStatus the status of the internet connection, <code>TRUE</code> if there is a connection, otherwise <code>FALSE</code>
*/
- virtual void setConnectedStatus(bool newStatus) = 0;
+ virtual void setConnectedtqStatus(bool newtqStatus) = 0;
};
#endif
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp
index 5ff1654b..2ba2b740 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp
@@ -22,7 +22,7 @@
using namespace SMPPPD;
Client::Client()
- : m_state(NULL), m_sock(NULL), m_serverID(TQString::null), m_serverVer(TQString::null), m_password(TQString::null) {
+ : m_state(NULL), m_sock(NULL), m_serverID(TQString()), m_serverVer(TQString()), m_password(TQString()) {
changeState(Unsettled::instance());
}
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp
index f51aa301..668496ef 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp
@@ -48,8 +48,8 @@ void Ready::disconnect(Client * client) {
delete socket(client);
setSocket(client, NULL);
- setServerID(client, TQString::null);
- setServerVersion(client, TQString::null);
+ setServerID(client, TQString());
+ setServerVersion(client, TQString());
}
changeState(client, Unsettled::instance());
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp
index 3d1f8a79..ef29d992 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp
@@ -86,17 +86,17 @@ bool Unsettled::connect(Client * client, const TQString& server, uint port) {
TQString response = read(client)[0];
- if(response != TQString::null &&
+ if(response != TQString() &&
ver.exactMatch(response)) {
setServerID(client, response);
setServerVersion(client, ver.cap(1));
changeState(client, Ready::instance());
return true;
- } else if(response != TQString::null &&
+ } else if(response != TQString() &&
clg.exactMatch(response)) {
- if(password(client) != TQString::null) {
+ if(password(client) != TQString()) {
// we are challenged, ok, respond
- write(client, TQString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1());
+ write(client, TQString("response = %1\n").tqarg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1());
response = read(client)[0];
if(ver.exactMatch(response)) {
setServerID(client, response);
diff --git a/kopete/plugins/smpppdcs/onlineinquiry.cpp b/kopete/plugins/smpppdcs/onlineinquiry.cpp
index 4cab45d7..99dc7d5c 100644
--- a/kopete/plugins/smpppdcs/onlineinquiry.cpp
+++ b/kopete/plugins/smpppdcs/onlineinquiry.cpp
@@ -35,11 +35,11 @@ bool OnlineInquiry::isOnline(bool useSMPPPD) {
m_detector = new DetectorNetstat(this);
}
- m_detector->checkStatus();
+ m_detector->checktqStatus();
return m_online;
}
-void OnlineInquiry::setConnectedStatus(bool newStatus) {
- m_online = newStatus;
+void OnlineInquiry::setConnectedtqStatus(bool newtqStatus) {
+ m_online = newtqStatus;
}
diff --git a/kopete/plugins/smpppdcs/onlineinquiry.h b/kopete/plugins/smpppdcs/onlineinquiry.h
index c9b5221a..7a0fcef2 100644
--- a/kopete/plugins/smpppdcs/onlineinquiry.h
+++ b/kopete/plugins/smpppdcs/onlineinquiry.h
@@ -14,8 +14,8 @@
*************************************************************************
*/
-#ifndef ONLINEINQUIRY_H
-#define ONLINEINQUIRY_H
+#ifndef ONLINEINTQUIRY_H
+#define ONLINEINTQUIRY_H
#include "iconnector.h"
@@ -35,7 +35,7 @@ public:
bool isOnline(bool useSMPPPD);
- virtual void setConnectedStatus(bool newStatus);
+ virtual void setConnectedtqStatus(bool newtqStatus);
private:
Detector * m_detector;
diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp
index f17f2ca9..14f133c1 100644
--- a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp
+++ b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp
@@ -37,9 +37,9 @@
typedef KGenericFactory<SMPPPDCSPlugin> SMPPPDCSPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kopete_smpppdcs, SMPPPDCSPluginFactory("kopete_smpppdcs"))
-SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *parent, const char * name, const TQStringList& /* args */)
- : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), parent, name),
- m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworkStatus(NULL), m_timer(NULL),
+SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *tqparent, const char * name, const TQStringList& /* args */)
+ : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), tqparent, name),
+ m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworktqStatus(NULL), m_timer(NULL),
m_onlineInquiry(NULL) {
kdDebug(14312) << k_funcinfo << endl;
@@ -51,7 +51,7 @@ m_onlineInquiry(NULL) {
m_detectorNetstat = new DetectorNetstat(this);
// experimental, not used yet
- m_detectorNetworkStatus = new DetectorNetworkStatus(this);
+ m_detectorNetworktqStatus = new DetectorNetworktqStatus(this);
// we wait for the allPluginsLoaded signal, to connect
// as early as possible after startup, but not before
@@ -72,7 +72,7 @@ SMPPPDCSPlugin::~SMPPPDCSPlugin() {
delete m_timer;
delete m_detectorSMPPPD;
delete m_detectorNetstat;
- delete m_detectorNetworkStatus;
+ delete m_detectorNetworktqStatus;
delete m_onlineInquiry;
}
@@ -80,7 +80,7 @@ void SMPPPDCSPlugin::allPluginsLoaded() {
if(Kopete::PluginManager::self()->isAllPluginsLoaded()) {
m_timer = new TQTimer();
- connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus()));
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotChecktqStatus()));
if(SMPPPDCSConfig::self()->useSmpppd()) {
m_timer->start(30000);
@@ -90,7 +90,7 @@ void SMPPPDCSPlugin::allPluginsLoaded() {
m_timer->start(60000);
}
- slotCheckStatus();
+ slotChecktqStatus();
}
}
@@ -98,19 +98,19 @@ bool SMPPPDCSPlugin::isOnline() const {
return m_onlineInquiry->isOnline(SMPPPDCSConfig::self()->useSmpppd());
}
-void SMPPPDCSPlugin::slotCheckStatus() {
+void SMPPPDCSPlugin::slotChecktqStatus() {
// reread config to get changes
SMPPPDCSConfig::self()->readConfig();
if(SMPPPDCSConfig::self()->useSmpppd()) {
- m_detectorSMPPPD->checkStatus();
+ m_detectorSMPPPD->checktqStatus();
} else {
- m_detectorNetstat->checkStatus();
+ m_detectorNetstat->checktqStatus();
}
}
-void SMPPPDCSPlugin::setConnectedStatus( bool connected ) {
+void SMPPPDCSPlugin::setConnectedtqStatus( bool connected ) {
kdDebug(14312) << k_funcinfo << connected << endl;
// We have to handle a few cases here. First is the machine is connected, and the plugin thinks
@@ -153,7 +153,7 @@ void SMPPPDCSPlugin::connectAllowed() {
}
#endif
- if(!list.contains(it.current()->protocol()->pluginId() + "_" + it.current()->
+ if(!list.tqcontains(it.current()->protocol()->pluginId() + "_" + it.current()->
accountId())) {
it.current()->connect();
}
@@ -178,7 +178,7 @@ void SMPPPDCSPlugin::disconnectAllowed() {
}
#endif
- if(!list.contains(it.current()->protocol()->pluginId() + "_" + it.current()->accountId())) {
+ if(!list.tqcontains(it.current()->protocol()->pluginId() + "_" + it.current()->accountId())) {
it.current()->disconnect();
}
}
diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.h b/kopete/plugins/smpppdcs/smpppdcsplugin.h
index 7b8bdb94..13cd8ec3 100644
--- a/kopete/plugins/smpppdcs/smpppdcsplugin.h
+++ b/kopete/plugins/smpppdcs/smpppdcsplugin.h
@@ -48,6 +48,7 @@ class OnlineInquiry;
*/
class SMPPPDCSPlugin : public Kopete::Plugin, public IConnector, virtual public SMPPPDCSIFace {
Q_OBJECT
+ TQ_OBJECT
SMPPPDCSPlugin(const SMPPPDCSPlugin&);
SMPPPDCSPlugin& operator=(const SMPPPDCSPlugin&);
@@ -55,7 +56,7 @@ public:
/**
* @brief Creates an <code>SMPPPDCSPlugin</code> instance
*/
- SMPPPDCSPlugin( TQObject *parent, const char *name, const TQStringList &args );
+ SMPPPDCSPlugin( TQObject *tqparent, const char *name, const TQStringList &args );
/**
* @brief Destroys an <code>SMPPPDCSPlugin</code> instance
@@ -76,7 +77,7 @@ public:
*
* @see SMPPPDCSPrefs
*/
- virtual void setConnectedStatus( bool newStatus );
+ virtual void setConnectedtqStatus( bool newtqStatus );
virtual TQString detectionMethod() const;
@@ -86,7 +87,7 @@ public slots:
void smpppdServerChanged(const TQString& server);
private slots:
- void slotCheckStatus();
+ void slotChecktqStatus();
void allPluginsLoaded();
private:
@@ -98,7 +99,7 @@ private:
Detector * m_detectorSMPPPD;
Detector * m_detectorNetstat;
- Detector * m_detectorNetworkStatus;
+ Detector * m_detectorNetworktqStatus;
bool m_pluginConnected;
TQTimer * m_timer;
OnlineInquiry * m_onlineInquiry;
diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp
index 671008bc..de950965 100644
--- a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp
+++ b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp
@@ -35,8 +35,8 @@
typedef KGenericFactory<SMPPPDCSPreferences> SMPPPDCSPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs"))
-SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name */, const TQStringList& args)
- : KCModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) {
+SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * tqparent, const char * /* name */, const TQStringList& args)
+ : KCModule(SMPPPDCSPreferencesFactory::instance(), tqparent, args), m_ui(NULL) {
Kopete::AccountManager * manager = Kopete::AccountManager::self();
(new TQVBoxLayout(this))->setAutoAdd(true);
@@ -54,7 +54,7 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name
}
if(it.current()->inherits("Kopete::ManagedConnectionAccount")) {
- protoName += TQString(", %1").arg(i18n("connection status is managed by Kopete"));
+ protoName += TQString(", %1").tqarg(i18n("connection status is managed by Kopete"));
}
TQCheckListItem * cli = new TQCheckListItem(m_ui->accountList,
@@ -134,7 +134,7 @@ void SMPPPDCSPreferences::load()
while(it.current()) {
TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current());
if(rex.search(cli->text(0)) > -1) {
- bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1));
+ bool isOn = list.tqcontains(rex.cap(2) + "Protocol_" + rex.cap(1));
// m_accountMapOld[cli->text(0)].m_on = isOn;
m_accountMapCur[cli->text(0)].m_on = isOn;
cli->setOn(isOn);
diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.h b/kopete/plugins/smpppdcs/smpppdcspreferences.h
index d521412d..3671d552 100644
--- a/kopete/plugins/smpppdcs/smpppdcspreferences.h
+++ b/kopete/plugins/smpppdcs/smpppdcspreferences.h
@@ -25,7 +25,7 @@ class SMPPPDCSPrefs;
class AccountPrivMap {
public:
- AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString::null)
+ AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString())
: m_on(isOn), m_id(id) {}
bool m_on;
TQString m_id;
@@ -38,6 +38,7 @@ public:
*/
class SMPPPDCSPreferences : public KCModule {
Q_OBJECT
+ TQ_OBJECT
SMPPPDCSPreferences(const SMPPPDCSPreferences&);
SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&);
@@ -48,7 +49,7 @@ public:
/**
* @brief Creates an <code>SMPPPDCSPreferences</code> instance
*/
- SMPPPDCSPreferences(TQWidget * parent = 0, const char * name = 0, const TQStringList &args = TQStringList());
+ SMPPPDCSPreferences(TQWidget * tqparent = 0, const char * name = 0, const TQStringList &args = TQStringList());
/**
* @brief Destroys an <code>SMPPPDCSPreferences</code> instance
diff --git a/kopete/plugins/smpppdcs/smpppdcsprefs.ui b/kopete/plugins/smpppdcs/smpppdcsprefs.ui
index 067c55a3..80e8e6ed 100644
--- a/kopete/plugins/smpppdcs/smpppdcsprefs.ui
+++ b/kopete/plugins/smpppdcs/smpppdcsprefs.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SMPPPDCSPrefsBase</class>
<author>Heiko Schaefer</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SMPPPDCSPrefsBase</cstring>
</property>
@@ -20,11 +20,11 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -35,9 +35,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
@@ -49,12 +49,12 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>csMethod</cstring>
</property>
<property name="title">
- <string>Method of Connection Status Detection</string>
+ <string>Method of Connection tqStatus Detection</string>
</property>
<vbox>
<property name="name">
@@ -66,7 +66,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>useNetstat</cstring>
</property>
@@ -80,7 +80,7 @@
<string>Uses the netstat command to find a gateway; suitable on dial-up computers</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>useSmpppd</cstring>
</property>
@@ -91,7 +91,7 @@
<string>Uses the smpppd on a gateway; suitable for a computer in a private network</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>autoCSLayout</cstring>
</property>
@@ -120,7 +120,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>341</width>
<height>20</height>
@@ -131,7 +131,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>smpppdPrefs</cstring>
</property>
@@ -168,7 +168,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -179,7 +179,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -203,14 +203,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>toIgnoreLabel</cstring>
</property>
@@ -275,7 +275,7 @@
<tabstop>useSmpppd</tabstop>
<tabstop>accountList</tabstop>
</tabstops>
-<layoutdefaults spacing="0" margin="0"/>
+<tqlayoutdefaults spacing="0" margin="0"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>smpppdlocationwidget.h</includehint>
diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp
index 4dbedc54..f66f9e47 100644
--- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp
+++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp
@@ -35,8 +35,8 @@
#include "smpppdcsprefsimpl.h"
#include "smpppdsearcher.h"
-SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl)
- : SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) {
+SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* tqparent, const char* name, WFlags fl)
+ : SMPPPDCSPrefsBase(tqparent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) {
// search for our main-plugin instance
Kopete::Plugin * p = Kopete::PluginManager::self()->plugin("kopete_smpppdcs");
@@ -55,7 +55,7 @@ SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl)
}
// if netstat is NOT available, disable the option and set to SMPPPD
- if(KStandardDirs::findExe("netstat") == TQString::null) {
+ if(KStandardDirs::findExe("netstat") == TQString()) {
autoCSTest->setEnabled(FALSE);
useNetstat->setEnabled(FALSE);
useNetstat->setChecked(FALSE);
diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h
index 4dcbe46b..607197c3 100644
--- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h
+++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h
@@ -32,13 +32,14 @@ class SMPPPDSearcher;
class SMPPPDCSPrefs : public SMPPPDCSPrefsBase
{
Q_OBJECT
+ TQ_OBJECT
SMPPPDCSPrefs(const SMPPPDCSPrefs&);
SMPPPDCSPrefs& operator=(const SMPPPDCSPrefs&);
public:
- SMPPPDCSPrefs(TQWidget* parent, const char* name = 0, WFlags fl = 0);
+ SMPPPDCSPrefs(TQWidget* tqparent, const char* name = 0, WFlags fl = 0);
~SMPPPDCSPrefs();
signals:
diff --git a/kopete/plugins/smpppdcs/smpppdlocationui.ui b/kopete/plugins/smpppdcs/smpppdlocationui.ui
index 0424f6f6..9452893f 100644
--- a/kopete/plugins/smpppdcs/smpppdlocationui.ui
+++ b/kopete/plugins/smpppdcs/smpppdlocationui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SMPPPDLocationWidgetBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SMPPPDLocationWidgetBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -47,7 +47,7 @@
<string>The server on which the SMPPPD is running</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -58,9 +58,9 @@
<cstring>port</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<hbox>
<property name="name">
@@ -83,7 +83,7 @@
<string>The port on which the SMPPPD is running on</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -101,7 +101,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>130</width>
<height>20</height>
@@ -110,7 +110,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_passwordLabel</cstring>
</property>
@@ -139,7 +139,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="0"/>
+<tqlayoutdefaults spacing="6" margin="0"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp
index 44de2552..a1f5f9a5 100644
--- a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp
+++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp
@@ -18,8 +18,8 @@
#include "smpppdlocationwidget.h"
-SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* parent, const char* name, WFlags fl)
- : SMPPPDLocationWidgetBase(parent, name, fl) {}
+SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* tqparent, const char* name, WFlags fl)
+ : SMPPPDLocationWidgetBase(tqparent, name, fl) {}
SMPPPDLocationWidget::~SMPPPDLocationWidget() {}
diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.h b/kopete/plugins/smpppdcs/smpppdlocationwidget.h
index 16d1edfb..3f0ba866 100644
--- a/kopete/plugins/smpppdcs/smpppdlocationwidget.h
+++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.h
@@ -25,12 +25,13 @@
class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
SMPPPDLocationWidget(const SMPPPDLocationWidget&);
SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&);
public:
- SMPPPDLocationWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ SMPPPDLocationWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0);
~SMPPPDLocationWidget();
void setServer(const TQString& serv);
diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.cpp b/kopete/plugins/smpppdcs/smpppdsearcher.cpp
index a06e30a9..4ec77196 100644
--- a/kopete/plugins/smpppdcs/smpppdsearcher.cpp
+++ b/kopete/plugins/smpppdcs/smpppdsearcher.cpp
@@ -64,7 +64,7 @@ void SMPPPDSearcher::searchNetwork() {
void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) {
kdDebug(14312) << k_funcinfo << endl;
- TQString myBuf = TQString::fromLatin1(buf,len);
+ TQString myBuf = TQString::tqfromLatin1(buf,len);
TQRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})");
// tokenize the string into lines
TQStringList toks = TQStringList::split("\n", myBuf);
@@ -82,7 +82,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf
kdDebug(14312) << k_funcinfo << endl;
TQRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*");
- TQString myBuf = TQString::fromLatin1(buf,len);
+ TQString myBuf = TQString::tqfromLatin1(buf,len);
if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) {
// if netstat -r found no gateway we search the network
@@ -105,8 +105,8 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf
/*!
\fn SMPPPDSearcher::scan() const
*/
-bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) {
- kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl;
+bool SMPPPDSearcher::scan(const TQString& ip, const TQString& tqmask) {
+ kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << tqmask << "..." << endl;
SMPPPD::Client client;
@@ -123,7 +123,7 @@ bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) {
uint min_range = 0;
uint max_range = 255;
- // calculate ip range (only last mask entry)
+ // calculate ip range (only last tqmask entry)
TQRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})");
if(lastRex.exactMatch(ip)) {
@@ -134,7 +134,7 @@ bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) {
ipToks.push_back(lastRex.cap(i));
}
- if(lastRex.exactMatch(mask)) {
+ if(lastRex.exactMatch(tqmask)) {
uint lastWordMask = lastRex.cap(4).toUInt();
if(lastWordMask == 0) {
diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.h b/kopete/plugins/smpppdcs/smpppdsearcher.h
index 81c9cb03..1e96f737 100644
--- a/kopete/plugins/smpppdcs/smpppdsearcher.h
+++ b/kopete/plugins/smpppdcs/smpppdsearcher.h
@@ -30,6 +30,7 @@ class KProcess;
*/
class SMPPPDSearcher : public TQObject {
Q_OBJECT
+ TQ_OBJECT
SMPPPDSearcher(const SMPPPDSearcher&);
SMPPPDSearcher& operator=(const SMPPPDSearcher&);
@@ -59,13 +60,13 @@ protected:
* @brief Scans a network for a smpppd
*
* Scans a network for a smpppd described by
- * ip and mask.
+ * ip and tqmask.
*
* @param ip the ntwork ip
- * @param mask the network mask
+ * @param tqmask the network tqmask
* @return <code>TRUE</code> if an smpppd was found
*/
- bool scan(const TQString& ip, const TQString& mask);
+ bool scan(const TQString& ip, const TQString& tqmask);
signals:
/**
diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.cpp b/kopete/plugins/smpppdcs/unittest/clienttest.cpp
index f668135f..7e19290d 100644
--- a/kopete/plugins/smpppdcs/unittest/clienttest.cpp
+++ b/kopete/plugins/smpppdcs/unittest/clienttest.cpp
@@ -53,12 +53,12 @@ void ClientTest::testCommunicationBeforeConnect() {
void ClientTest::testServerIDBeforeConnect() {
SMPPPD::Client c;
- CHECK(c.serverID(), TQString::null);
+ CHECK(c.serverID(), TQString());
}
void ClientTest::testServerVersionBeforeConnect() {
SMPPPD::Client c;
- CHECK(c.serverVersion(), TQString::null);
+ CHECK(c.serverVersion(), TQString());
}
void ClientTest::testCommunicationAfterConnect() {
@@ -102,7 +102,7 @@ void ClientTest::testServerIDAfterDisconnect() {
SMPPPD::Client c;
if(c.connect("warwar", 3185)) {
c.disconnect();
- CHECK(c.serverID(), TQString::null);
+ CHECK(c.serverID(), TQString());
} else {
SKIP("Test skipped because no smpppd at warwar:3185");
}
@@ -112,7 +112,7 @@ void ClientTest::testServerVersionAfterDisconnect() {
SMPPPD::Client c;
if(c.connect("warwar", 3185)) {
c.disconnect();
- CHECK(c.serverVersion(), TQString::null);
+ CHECK(c.serverVersion(), TQString());
} else {
SKIP("Test skipped because no smpppd at warwar:3185");
}
diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.h b/kopete/plugins/smpppdcs/unittest/clienttest.h
index 5db7ef7b..0da9d71e 100644
--- a/kopete/plugins/smpppdcs/unittest/clienttest.h
+++ b/kopete/plugins/smpppdcs/unittest/clienttest.h
@@ -24,6 +24,7 @@
*/
class ClientTest : public KUnitTest::SlotTester {
Q_OBJECT
+ TQ_OBJECT
ClientTest(const ClientTest&);
ClientTest& operator=(const ClientTest&);