diff options
author | Timothy Pearson <[email protected]> | 2013-01-24 13:48:31 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-24 13:48:31 -0600 |
commit | c48e769eb275917717e2b55eb869f7e559293ac8 (patch) | |
tree | 8f650b907e21c918b826f854dbe1c8174cc2c0c6 /kopete/plugins/smpppdcs | |
parent | 8011d84f483f3628f3f04ea5cb2c1c3c86b2dba7 (diff) | |
download | tdenetwork-c48e769eb275917717e2b55eb869f7e559293ac8.tar.gz tdenetwork-c48e769eb275917717e2b55eb869f7e559293ac8.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'kopete/plugins/smpppdcs')
-rw-r--r-- | kopete/plugins/smpppdcs/detectornetstat.cpp | 14 | ||||
-rw-r--r-- | kopete/plugins/smpppdcs/detectornetstat.h | 8 | ||||
-rw-r--r-- | kopete/plugins/smpppdcs/smpppdsearcher.cpp | 18 | ||||
-rw-r--r-- | kopete/plugins/smpppdcs/smpppdsearcher.h | 10 |
4 files changed, 25 insertions, 25 deletions
diff --git a/kopete/plugins/smpppdcs/detectornetstat.cpp b/kopete/plugins/smpppdcs/detectornetstat.cpp index f1ed21b5..6cb85d0e 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.cpp +++ b/kopete/plugins/smpppdcs/detectornetstat.cpp @@ -39,16 +39,16 @@ void DetectorNetstat::checkStatus() const { m_buffer = TQString(); - // Use KProcess to run netstat -r. We'll then parse the output of + // Use TDEProcess to run netstat -r. We'll then parse the output of // netstat -r in slotProcessStdout() to see if it mentions the // default gateway. If so, we're connected, if not, we're offline - m_process = new KProcess; + m_process = new TDEProcess; *m_process << "netstat" << "-r"; - connect(m_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotProcessStdout( KProcess *, char *, int))); - connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *))); + connect(m_process, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, TQT_SLOT(slotProcessStdout( TDEProcess *, char *, int))); + connect(m_process, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessExited(TDEProcess *))); - if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stdout)) { + if(!m_process->start(TDEProcess::NotifyOnExit, TDEProcess::Stdout)) { kdWarning(14312) << k_funcinfo << "Unable to start netstat process!" << endl; delete m_process; @@ -56,14 +56,14 @@ void DetectorNetstat::checkStatus() const { } } -void DetectorNetstat::slotProcessStdout(KProcess *, char *buffer, int buflen) { +void DetectorNetstat::slotProcessStdout(TDEProcess *, char *buffer, int buflen) { // Look for a default gateway kdDebug(14312) << k_funcinfo << endl; m_buffer += TQString::fromLatin1(buffer, buflen); kdDebug(14312) << m_buffer << endl; } -void DetectorNetstat::slotProcessExited(KProcess *process) { +void DetectorNetstat::slotProcessExited(TDEProcess *process) { kdDebug(14312) << k_funcinfo << m_buffer << endl; if(process == m_process) { m_connector->setConnectedStatus(m_buffer.contains("default")); diff --git a/kopete/plugins/smpppdcs/detectornetstat.h b/kopete/plugins/smpppdcs/detectornetstat.h index 959cf7fc..9542c58b 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.h +++ b/kopete/plugins/smpppdcs/detectornetstat.h @@ -21,7 +21,7 @@ #include "detector.h" -class KProcess; +class TDEProcess; class IConnector; /** @@ -42,16 +42,16 @@ public: private slots: // Original cs-plugin code - void slotProcessStdout(KProcess * process, char * buffer, int len); + void slotProcessStdout(TDEProcess * process, char * buffer, int len); /** * Notify when the netstat process has exited */ - void slotProcessExited(KProcess *process); + void slotProcessExited(TDEProcess *process); private: mutable TQString m_buffer; - mutable KProcess * m_process; + mutable TDEProcess * m_process; }; #endif diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.cpp b/kopete/plugins/smpppdcs/smpppdsearcher.cpp index a06e30a9..8f4c92de 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.cpp +++ b/kopete/plugins/smpppdcs/smpppdsearcher.cpp @@ -42,12 +42,12 @@ void SMPPPDSearcher::searchNetwork() { // the first point to search is localhost if(!scan("127.0.0.1", "255.0.0.0")) { - m_procNetstat = new KProcess; + m_procNetstat = new TDEProcess; m_procNetstat->setEnvironment("LANG", "C"); // we want to force english output *m_procNetstat << "/bin/netstat" << "-rn"; - connect(m_procNetstat, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int))); - if(!m_procNetstat->start(KProcess::Block, KProcess::Stdout)) { + connect(m_procNetstat, TQT_SIGNAL(receivedStdout(TDEProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedNetstat(TDEProcess *,char *,int))); + if(!m_procNetstat->start(TDEProcess::Block, TDEProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/netstat -rn" << endl << "Perhaps the package net-tools isn't installed." << endl; emit smpppdNotFound(); @@ -59,9 +59,9 @@ void SMPPPDSearcher::searchNetwork() { } /*! - \fn SMPPPDSearcher::slotStdoutReceived(KProcess * proc, char * buf, int len) + \fn SMPPPDSearcher::slotStdoutReceived(TDEProcess * proc, char * buf, int len) */ -void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) { +void SMPPPDSearcher::slotStdoutReceivedIfconfig(TDEProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; TQString myBuf = TQString::fromLatin1(buf,len); @@ -78,7 +78,7 @@ void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * bu emit smpppdNotFound(); } -void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf, int len) { +void SMPPPDSearcher::slotStdoutReceivedNetstat(TDEProcess * /* proc */, char * buf, int len) { 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}).*"); @@ -86,12 +86,12 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) { // if netstat -r found no gateway we search the network - m_procIfconfig = new KProcess; + m_procIfconfig = new TDEProcess; m_procIfconfig->setEnvironment("LANG", "C"); // we want to force english output *m_procIfconfig << "/sbin/ifconfig"; - connect(m_procIfconfig, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int))); - if(!m_procIfconfig->start(KProcess::Block, KProcess::Stdout)) { + connect(m_procIfconfig, TQT_SIGNAL(receivedStdout(TDEProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedIfconfig(TDEProcess *,char *,int))); + if(!m_procIfconfig->start(TDEProcess::Block, TDEProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/ifconfig" << endl << "Perhaps the package net-tools isn't installed." << endl; emit smpppdNotFound(); diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.h b/kopete/plugins/smpppdcs/smpppdsearcher.h index 36c4ac9c..e6c0b8ea 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.h +++ b/kopete/plugins/smpppdcs/smpppdsearcher.h @@ -20,7 +20,7 @@ #include <kresolver.h> -class KProcess; +class TDEProcess; /** * @brief Searches a network for a smpppd @@ -86,13 +86,13 @@ signals: void scanFinished(); protected slots: - void slotStdoutReceivedIfconfig(KProcess * proc, char * buf, int len); - void slotStdoutReceivedNetstat (KProcess * proc, char * buf, int len); + void slotStdoutReceivedIfconfig(TDEProcess * proc, char * buf, int len); + void slotStdoutReceivedNetstat (TDEProcess * proc, char * buf, int len); private: bool m_cancelSearchNow; - KProcess * m_procIfconfig; - KProcess * m_procNetstat; + TDEProcess * m_procIfconfig; + TDEProcess * m_procNetstat; }; inline void SMPPPDSearcher::cancelSearch() { |