diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:21:31 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:21:31 -0600 |
commit | ed6b24997e06a9a14d0f47cfbfafdd2473cf856d (patch) | |
tree | 404af184ad8c33a68131f32e4554e79b1b16c581 /src/knemod | |
parent | 70dd1b53b7f8026acd164c6e7dca3c2dcde9dd18 (diff) | |
download | knemo-ed6b24997e06a9a14d0f47cfbfafdd2473cf856d.tar.gz knemo-ed6b24997e06a9a14d0f47cfbfafdd2473cf856d.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'src/knemod')
-rw-r--r-- | src/knemod/backends/nettoolsbackend.cpp | 60 | ||||
-rw-r--r-- | src/knemod/backends/nettoolsbackend.h | 20 | ||||
-rw-r--r-- | src/knemod/interfaceicon.cpp | 8 | ||||
-rw-r--r-- | src/knemod/interfacestatisticsdialog.cpp | 4 | ||||
-rw-r--r-- | src/knemod/knemodaemon.cpp | 6 |
5 files changed, 49 insertions, 49 deletions
diff --git a/src/knemod/backends/nettoolsbackend.cpp b/src/knemod/backends/nettoolsbackend.cpp index 39de4e9..fbd6995 100644 --- a/src/knemod/backends/nettoolsbackend.cpp +++ b/src/knemod/backends/nettoolsbackend.cpp @@ -67,16 +67,16 @@ void NetToolsBackend::update() if ( !mIfconfigProcess ) { mIfconfigStdout = TQString(); - mIfconfigProcess = new KProcess(); + mIfconfigProcess = new TDEProcess(); mIfconfigProcess->setEnvironment( "LANG", "C" ); mIfconfigProcess->setEnvironment( "LC_ALL", "C" ); *mIfconfigProcess << PATH_IFCONFIG << "-a"; - connect( mIfconfigProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, TQT_SLOT( ifconfigProcessStdout( KProcess*, char*, int ) ) ); - connect( mIfconfigProcess, TQT_SIGNAL( processExited( KProcess* ) ), - this, TQT_SLOT( ifconfigProcessExited( KProcess* ) ) ); + connect( mIfconfigProcess, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), + this, TQT_SLOT( ifconfigProcessStdout( TDEProcess*, char*, int ) ) ); + connect( mIfconfigProcess, TQT_SIGNAL( processExited( TDEProcess* ) ), + this, TQT_SLOT( ifconfigProcessExited( TDEProcess* ) ) ); - if ( !mIfconfigProcess->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) + if ( !mIfconfigProcess->start( TDEProcess::NotifyOnExit, TDEProcess::Stdout ) ) { delete mIfconfigProcess; mIfconfigProcess = 0L; @@ -87,18 +87,18 @@ void NetToolsBackend::update() if ( !mIwconfigProcess ) { mIwconfigStdout = TQString(); - mIwconfigProcess = new KProcess(); + mIwconfigProcess = new TDEProcess(); mIwconfigProcess->setEnvironment( "LANG", "C" ); mIwconfigProcess->setEnvironment( "LC_ALL", "C" ); *mIwconfigProcess << PATH_IWCONFIG; - connect( mIwconfigProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, TQT_SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) ); - connect( mIwconfigProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, TQT_SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) ); - connect( mIwconfigProcess, TQT_SIGNAL( processExited( KProcess* ) ), - this, TQT_SLOT( iwconfigProcessExited( KProcess* ) ) ); - - if ( !mIwconfigProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) + connect( mIwconfigProcess, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), + this, TQT_SLOT( iwconfigProcessStdout( TDEProcess*, char*, int ) ) ); + connect( mIwconfigProcess, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), + this, TQT_SLOT( iwconfigProcessStdout( TDEProcess*, char*, int ) ) ); + connect( mIwconfigProcess, TQT_SIGNAL( processExited( TDEProcess* ) ), + this, TQT_SLOT( iwconfigProcessExited( TDEProcess* ) ) ); + + if ( !mIwconfigProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { delete mIwconfigProcess; mIwconfigProcess = 0L; @@ -110,18 +110,18 @@ void NetToolsBackend::update() if ( !mRouteProcess ) { mRouteStdout = TQString(); - mRouteProcess = new KProcess(); + mRouteProcess = new TDEProcess(); mRouteProcess->setEnvironment( "LANG", "C" ); mRouteProcess->setEnvironment( "LC_ALL", "C" ); *mRouteProcess << PATH_ROUTE << "-n"; - connect( mRouteProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, TQT_SLOT( routeProcessStdout( KProcess*, char*, int ) ) ); - connect( mRouteProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, TQT_SLOT( routeProcessStdout( KProcess*, char*, int ) ) ); - connect( mRouteProcess, TQT_SIGNAL( processExited( KProcess* ) ), - this, TQT_SLOT( routeProcessExited( KProcess* ) ) ); - - if ( !mRouteProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) + connect( mRouteProcess, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), + this, TQT_SLOT( routeProcessStdout( TDEProcess*, char*, int ) ) ); + connect( mRouteProcess, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), + this, TQT_SLOT( routeProcessStdout( TDEProcess*, char*, int ) ) ); + connect( mRouteProcess, TQT_SIGNAL( processExited( TDEProcess* ) ), + this, TQT_SLOT( routeProcessExited( TDEProcess* ) ) ); + + if ( !mRouteProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { delete mRouteProcess; mRouteProcess = 0L; @@ -130,7 +130,7 @@ void NetToolsBackend::update() #endif } -void NetToolsBackend::routeProcessExited( KProcess* process ) +void NetToolsBackend::routeProcessExited( TDEProcess* process ) { if ( process == mRouteProcess ) { @@ -140,12 +140,12 @@ void NetToolsBackend::routeProcessExited( KProcess* process ) } } -void NetToolsBackend::routeProcessStdout( KProcess*, char* buffer, int buflen ) +void NetToolsBackend::routeProcessStdout( TDEProcess*, char* buffer, int buflen ) { mRouteStdout += TQString::fromLatin1( buffer, buflen ); } -void NetToolsBackend::ifconfigProcessExited( KProcess* process ) +void NetToolsBackend::ifconfigProcessExited( TDEProcess* process ) { if ( process == mIfconfigProcess ) { @@ -155,12 +155,12 @@ void NetToolsBackend::ifconfigProcessExited( KProcess* process ) } } -void NetToolsBackend::ifconfigProcessStdout( KProcess*, char* buffer, int buflen ) +void NetToolsBackend::ifconfigProcessStdout( TDEProcess*, char* buffer, int buflen ) { mIfconfigStdout += TQString::fromLatin1( buffer, buflen ); } -void NetToolsBackend::iwconfigProcessExited( KProcess* process ) +void NetToolsBackend::iwconfigProcessExited( TDEProcess* process ) { if ( process == mIwconfigProcess ) { @@ -170,7 +170,7 @@ void NetToolsBackend::iwconfigProcessExited( KProcess* process ) } } -void NetToolsBackend::iwconfigProcessStdout( KProcess*, char* buffer, int buflen ) +void NetToolsBackend::iwconfigProcessStdout( TDEProcess*, char* buffer, int buflen ) { mIwconfigStdout += TQString::fromLatin1( buffer, buflen ); } diff --git a/src/knemod/backends/nettoolsbackend.h b/src/knemod/backends/nettoolsbackend.h index 86dee0a..7a6b4ff 100644 --- a/src/knemod/backends/nettoolsbackend.h +++ b/src/knemod/backends/nettoolsbackend.h @@ -24,7 +24,7 @@ #include "backendbase.h" -class KProcess; +class TDEProcess; /** * The nettools backend runs 'ifconfig', 'iwconfig' and 'route' @@ -48,12 +48,12 @@ public: void update(); private slots: - void routeProcessExited( KProcess* process ); - void routeProcessStdout( KProcess* process, char* buffer, int buflen ); - void ifconfigProcessExited( KProcess* process ); - void ifconfigProcessStdout( KProcess* process, char* buffer, int buflen ); - void iwconfigProcessExited( KProcess* process ); - void iwconfigProcessStdout( KProcess* process, char* buffer, int buflen ); + void routeProcessExited( TDEProcess* process ); + void routeProcessStdout( TDEProcess* process, char* buffer, int buflen ); + void ifconfigProcessExited( TDEProcess* process ); + void ifconfigProcessStdout( TDEProcess* process, char* buffer, int buflen ); + void iwconfigProcessExited( TDEProcess* process ); + void iwconfigProcessStdout( TDEProcess* process, char* buffer, int buflen ); private: void parseRouteOutput(); @@ -65,9 +65,9 @@ private: TQString mRouteStdout; TQString mIfconfigStdout; TQString mIwconfigStdout; - KProcess* mRouteProcess; - KProcess* mIfconfigProcess; - KProcess* mIwconfigProcess; + TDEProcess* mRouteProcess; + TDEProcess* mIfconfigProcess; + TDEProcess* mIwconfigProcess; }; #endif // NETTOOLSBACKEND_H diff --git a/src/knemod/interfaceicon.cpp b/src/knemod/interfaceicon.cpp index 518eaa3..0c081a6 100644 --- a/src/knemod/interfaceicon.cpp +++ b/src/knemod/interfaceicon.cpp @@ -285,9 +285,9 @@ void InterfaceIcon::showConfigDialog() { KNemoDaemon::sSelectedInterface = mInterface->getName(); - KProcess process; + TDEProcess process; process << "kcmshell" << "kcm_knemo"; - process.start( KProcess::DontCare ); + process.start( TDEProcess::DontCare ); } void InterfaceIcon::menuActivated( int id ) @@ -298,7 +298,7 @@ void InterfaceIcon::menuActivated( int id ) { if ( (*it).id == id ) { - KProcess process; + TDEProcess process; if ( (*it).runAsRoot ) { process << "tdesu"; @@ -307,7 +307,7 @@ void InterfaceIcon::menuActivated( int id ) else process << TQStringList::split( ' ', (*it).command ); - process.start( KProcess::DontCare ); + process.start( TDEProcess::DontCare ); break; } } diff --git a/src/knemod/interfacestatisticsdialog.cpp b/src/knemod/interfacestatisticsdialog.cpp index 7a317ac..327bc0f 100644 --- a/src/knemod/interfacestatisticsdialog.cpp +++ b/src/knemod/interfacestatisticsdialog.cpp @@ -61,7 +61,7 @@ void InterfaceStatisticsDialog::updateDays() while ( iterator ) { TQDate date( iterator->year, iterator->month, iterator->day ); - tableDaily->verticalHeader()->setLabel( row, KGlobal::locale()->formatDate( date, true ) ); + tableDaily->verticalHeader()->setLabel( row, TDEGlobal::locale()->formatDate( date, true ) ); tableDaily->setText( row, 0, KIO::convertSize( iterator->txBytes ) ); tableDaily->setText( row, 1, KIO::convertSize( iterator->rxBytes ) ); tableDaily->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) ); @@ -81,7 +81,7 @@ void InterfaceStatisticsDialog::updateMonths() int row = 0; while ( iterator ) { - const KCalendarSystem* calendar = KGlobal::locale()->calendar(); + const KCalendarSystem* calendar = TDEGlobal::locale()->calendar(); TQString monthName = calendar->monthName( iterator->month, iterator->year ) + " " + TQString::number( iterator->year ); tableMonthly->verticalHeader()->setLabel( row, monthName ); tableMonthly->setText( row, 0, KIO::convertSize( iterator->txBytes ) ); diff --git a/src/knemod/knemodaemon.cpp b/src/knemod/knemodaemon.cpp index add12c8..2957dc1 100644 --- a/src/knemod/knemodaemon.cpp +++ b/src/knemod/knemodaemon.cpp @@ -52,7 +52,7 @@ KNemoDaemon::KNemoDaemon( const TQCString& name ) mInstance( new TDEInstance( "knemo" ) ), mNotifyInstance( new KNotifyClient::Instance( mInstance ) ) { - KGlobal::locale()->insertCatalogue( "knemod" ); + TDEGlobal::locale()->insertCatalogue( "knemod" ); readConfig(); // select the backend from the config file @@ -108,7 +108,7 @@ void KNemoDaemon::readConfig() config->setGroup( "General" ); mGeneralData.pollInterval = config->readNumEntry( "PollInterval", 1 ); mGeneralData.saveInterval = config->readNumEntry( "SaveInterval", 60 ); - mGeneralData.statisticsDir = config->readEntry( "StatisticsDir", KGlobal::dirs()->saveLocation( "data", "knemo/" ) ); + mGeneralData.statisticsDir = config->readEntry( "StatisticsDir", TDEGlobal::dirs()->saveLocation( "data", "knemo/" ) ); mGeneralData.toolTipContent = config->readNumEntry( "ToolTipContent", 2 ); TQStrList list; int numEntries = config->readListEntry( "Interfaces", list ); @@ -188,7 +188,7 @@ void KNemoDaemon::reparseConfiguration() config->setGroup( "General" ); mGeneralData.pollInterval = config->readNumEntry( "PollInterval", 1 ); mGeneralData.saveInterval = config->readNumEntry( "SaveInterval", 60 ); - mGeneralData.statisticsDir = config->readEntry( "StatisticsDir", KGlobal::dirs()->saveLocation( "data", "knemo/" ) ); + mGeneralData.statisticsDir = config->readEntry( "StatisticsDir", TDEGlobal::dirs()->saveLocation( "data", "knemo/" ) ); mGeneralData.toolTipContent = config->readNumEntry( "ToolTipContent", 2 ); // restart the timer with the new interval |