diff options
Diffstat (limited to 'src/knemod/backends')
-rw-r--r-- | src/knemod/backends/backendbase.cpp | 4 | ||||
-rw-r--r-- | src/knemod/backends/backendbase.h | 10 | ||||
-rw-r--r-- | src/knemod/backends/daemonregistry.h | 8 | ||||
-rw-r--r-- | src/knemod/backends/kcmregistry.h | 8 | ||||
-rw-r--r-- | src/knemod/backends/nettoolsbackend.cpp | 124 | ||||
-rw-r--r-- | src/knemod/backends/nettoolsbackend.h | 19 | ||||
-rw-r--r-- | src/knemod/backends/sysbackend.cpp | 56 | ||||
-rw-r--r-- | src/knemod/backends/sysbackend.h | 12 |
8 files changed, 121 insertions, 120 deletions
diff --git a/src/knemod/backends/backendbase.cpp b/src/knemod/backends/backendbase.cpp index 82da372..a097ff4 100644 --- a/src/knemod/backends/backendbase.cpp +++ b/src/knemod/backends/backendbase.cpp @@ -19,7 +19,7 @@ #include "backendbase.h" -BackendBase::BackendBase( QDict<Interface>& interfaces ) +BackendBase::BackendBase( TQDict<Interface>& interfaces ) : mInterfaces( interfaces ) { } @@ -30,7 +30,7 @@ BackendBase::~BackendBase() void BackendBase::updateComplete() { - QDictIterator<Interface> ifIt( mInterfaces ); + TQDictIterator<Interface> ifIt( mInterfaces ); for ( ; ifIt.current(); ++ifIt ) { ifIt.current()->activateMonitor(); diff --git a/src/knemod/backends/backendbase.h b/src/knemod/backends/backendbase.h index 183e40a..06fbb4d 100644 --- a/src/knemod/backends/backendbase.h +++ b/src/knemod/backends/backendbase.h @@ -20,8 +20,8 @@ #ifndef BACKENDBASE_H #define BACKENDBASE_H -#include <qdict.h> -#include <qstring.h> +#include <tqdict.h> +#include <tqstring.h> #include <klocale.h> @@ -39,7 +39,7 @@ class BackendBase { public: - BackendBase( QDict<Interface>& interfaces ); + BackendBase( TQDict<Interface>& interfaces ); virtual ~BackendBase(); /** @@ -50,7 +50,7 @@ public: /** * This function is called from KNemo whenever the * backend shall update the information of the - * interfaces in the QDict. + * interfaces in the TQDict. */ virtual void update() = 0; @@ -62,7 +62,7 @@ protected: */ void updateComplete(); - const QDict<Interface>& mInterfaces; + const TQDict<Interface>& mInterfaces; }; #endif // BACKENDBASE_H diff --git a/src/knemod/backends/daemonregistry.h b/src/knemod/backends/daemonregistry.h index ba4638d..7e811f5 100644 --- a/src/knemod/backends/daemonregistry.h +++ b/src/knemod/backends/daemonregistry.h @@ -20,7 +20,7 @@ #ifndef DAEMONREGISTRY_H #define DAEMONREGISTRY_H -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> @@ -40,15 +40,15 @@ struct DaemonRegistryEntry { - QString name; - BackendBase* (*function) ( QDict<Interface>& ); + TQString name; + BackendBase* (*function) ( TQDict<Interface>& ); }; DaemonRegistryEntry DaemonRegistry[] = { { "Nettools", NetToolsBackend::createInstance }, { "Sys", SysBackend::createInstance }, - { QString::null, 0 } + { TQString(), 0 } }; #endif // DAEMONREGISTRY_H diff --git a/src/knemod/backends/kcmregistry.h b/src/knemod/backends/kcmregistry.h index 23820ac..08efe4a 100644 --- a/src/knemod/backends/kcmregistry.h +++ b/src/knemod/backends/kcmregistry.h @@ -20,7 +20,7 @@ #ifndef KCMREGISTRY_H #define KCMREGISTRY_H -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> @@ -36,8 +36,8 @@ struct KCMRegistryEntry { - QString name; - QString description; + TQString name; + TQString description; }; KCMRegistryEntry KCMRegistry[] = @@ -55,7 +55,7 @@ KCMRegistryEntry KCMRegistry[] = "As an advantage this backend should reduce the CPU load " \ "and should not access the harddisc while gathering " \ "information." ) }, - { QString::null, QString::null } + { TQString(), TQString() } }; #endif // KCMREGISTRY_H diff --git a/src/knemod/backends/nettoolsbackend.cpp b/src/knemod/backends/nettoolsbackend.cpp index dca42e1..c89d47c 100644 --- a/src/knemod/backends/nettoolsbackend.cpp +++ b/src/knemod/backends/nettoolsbackend.cpp @@ -17,9 +17,9 @@ Boston, MA 02110-1301, USA. */ -#include <qmap.h> -#include <qregexp.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqregexp.h> +#include <tqstringlist.h> #include <kdebug.h> #include <kprocess.h> @@ -29,8 +29,8 @@ #include "config.h" -NetToolsBackend::NetToolsBackend( QDict<Interface>& interfaces ) - : QObject(), +NetToolsBackend::NetToolsBackend( TQDict<Interface>& interfaces ) + : TQObject(), BackendBase( interfaces ), mRouteProcess(0L), mIfconfigProcess(0L), @@ -57,7 +57,7 @@ NetToolsBackend::~NetToolsBackend() } } -BackendBase* NetToolsBackend::createInstance( QDict<Interface>& interfaces ) +BackendBase* NetToolsBackend::createInstance( TQDict<Interface>& interfaces ) { return new NetToolsBackend( interfaces ); } @@ -66,15 +66,15 @@ void NetToolsBackend::update() { if ( !mIfconfigProcess ) { - mIfconfigStdout = QString::null; + mIfconfigStdout = TQString(); mIfconfigProcess = new KProcess(); mIfconfigProcess->setEnvironment( "LANG", "C" ); mIfconfigProcess->setEnvironment( "LC_ALL", "C" ); *mIfconfigProcess << PATH_IFCONFIG << "-a"; - connect( mIfconfigProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, SLOT( ifconfigProcessStdout( KProcess*, char*, int ) ) ); - connect( mIfconfigProcess, SIGNAL( processExited( KProcess* ) ), - this, SLOT( ifconfigProcessExited( KProcess* ) ) ); + 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* ) ) ); if ( !mIfconfigProcess->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) { @@ -86,17 +86,17 @@ void NetToolsBackend::update() #ifdef PATH_IWCONFIG if ( !mIwconfigProcess ) { - mIwconfigStdout = QString::null; + mIwconfigStdout = TQString(); mIwconfigProcess = new KProcess(); mIwconfigProcess->setEnvironment( "LANG", "C" ); mIwconfigProcess->setEnvironment( "LC_ALL", "C" ); *mIwconfigProcess << PATH_IWCONFIG; - connect( mIwconfigProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) ); - connect( mIwconfigProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) ); - connect( mIwconfigProcess, SIGNAL( processExited( KProcess* ) ), - this, SLOT( iwconfigProcessExited( KProcess* ) ) ); + 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 ) ) { @@ -109,17 +109,17 @@ void NetToolsBackend::update() #ifdef PATH_ROUTE if ( !mRouteProcess ) { - mRouteStdout = QString::null; + mRouteStdout = TQString(); mRouteProcess = new KProcess(); mRouteProcess->setEnvironment( "LANG", "C" ); mRouteProcess->setEnvironment( "LC_ALL", "C" ); *mRouteProcess << PATH_ROUTE << "-n"; - connect( mRouteProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, SLOT( routeProcessStdout( KProcess*, char*, int ) ) ); - connect( mRouteProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, SLOT( routeProcessStdout( KProcess*, char*, int ) ) ); - connect( mRouteProcess, SIGNAL( processExited( KProcess* ) ), - this, SLOT( routeProcessExited( KProcess* ) ) ); + 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 ) ) { @@ -142,7 +142,7 @@ void NetToolsBackend::routeProcessExited( KProcess* process ) void NetToolsBackend::routeProcessStdout( KProcess*, char* buffer, int buflen ) { - mRouteStdout += QString::fromLatin1( buffer, buflen ); + mRouteStdout += TQString::tqfromLatin1( buffer, buflen ); } void NetToolsBackend::ifconfigProcessExited( KProcess* process ) @@ -157,7 +157,7 @@ void NetToolsBackend::ifconfigProcessExited( KProcess* process ) void NetToolsBackend::ifconfigProcessStdout( KProcess*, char* buffer, int buflen ) { - mIfconfigStdout += QString::fromLatin1( buffer, buflen ); + mIfconfigStdout += TQString::tqfromLatin1( buffer, buflen ); } void NetToolsBackend::iwconfigProcessExited( KProcess* process ) @@ -172,7 +172,7 @@ void NetToolsBackend::iwconfigProcessExited( KProcess* process ) void NetToolsBackend::iwconfigProcessStdout( KProcess*, char* buffer, int buflen ) { - mIwconfigStdout += QString::fromLatin1( buffer, buflen ); + mIwconfigStdout += TQString::tqfromLatin1( buffer, buflen ); } void NetToolsBackend::parseIfconfigOutput() @@ -180,15 +180,15 @@ void NetToolsBackend::parseIfconfigOutput() /* mIfconfigStdout contains the complete output of 'ifconfig' which we * are going to parse here. */ - QMap<QString, QString> configs; - QStringList ifList = QStringList::split( "\n\n", mIfconfigStdout ); - QStringList::Iterator it; + TQMap<TQString, TQString> configs; + TQStringList ifList = TQStringList::split( "\n\n", mIfconfigStdout ); + TQStringList::Iterator it; for ( it = ifList.begin(); it != ifList.end(); ++it ) { - int index = ( *it ).find( ' ' ); + int index = ( *it ).tqfind( ' ' ); if ( index == -1 ) continue; - QString key = ( *it ).left( index ); + TQString key = ( *it ).left( index ); configs[key] = ( *it ).mid( index ); } @@ -197,13 +197,13 @@ void NetToolsBackend::parseIfconfigOutput() * we update its data, otherwise we mark it as * 'not existing'. */ - QDictIterator<Interface> ifIt( mInterfaces ); + TQDictIterator<Interface> ifIt( mInterfaces ); for ( ; ifIt.current(); ++ifIt ) { - QString key = ifIt.currentKey(); + TQString key = ifIt.currentKey(); Interface* interface = ifIt.current(); - if ( configs.find( key ) == configs.end() ) + if ( configs.tqfind( key ) == configs.end() ) { // The interface does not exist. Meaning the driver // isn't loaded and/or the interface has not been created. @@ -211,8 +211,8 @@ void NetToolsBackend::parseIfconfigOutput() interface->getData().available = false; } // JJ 2005-07-18: use RUNNING instead of UP to detect whether interface is connected - else if ( !configs[key].contains( "inet " ) || - !configs[key].contains( "RUNNING" ) ) + else if ( !configs[key].tqcontains( "inet " ) || + !configs[key].tqcontains( "RUNNING" ) ) { // The interface is up or has an IP assigned but not both interface->getData().existing = true; @@ -221,7 +221,7 @@ void NetToolsBackend::parseIfconfigOutput() else { // ...determine the type of the interface - if ( configs[key].contains( "Ethernet" ) ) + if ( configs[key].tqcontains( "Ethernet" ) ) interface->setType( Interface::ETHERNET ); else interface->setType( Interface::PPP ); @@ -235,9 +235,9 @@ void NetToolsBackend::parseIfconfigOutput() updateComplete(); } -void NetToolsBackend::updateInterfaceData( QString& config, InterfaceData& data, int type ) +void NetToolsBackend::updateInterfaceData( TQString& config, InterfaceData& data, int type ) { - QRegExp regExp( ".*RX.*:(\\d+).*:\\d+.*:\\d+.*:\\d+" ); + TQRegExp regExp( ".*RX.*:(\\d+).*:\\d+.*:\\d+.*:\\d+" ); if ( regExp.search( config ) > -1 ) data.rxPackets = regExp.cap( 1 ).toULong(); @@ -345,15 +345,15 @@ void NetToolsBackend::parseIwconfigOutput() /* mIwconfigStdout contains the complete output of 'iwconfig' which we * are going to parse here. */ - QMap<QString, QString> configs; - QStringList ifList = QStringList::split( "\n\n", mIwconfigStdout ); - QStringList::Iterator it; + TQMap<TQString, TQString> configs; + TQStringList ifList = TQStringList::split( "\n\n", mIwconfigStdout ); + TQStringList::Iterator it; for ( it = ifList.begin(); it != ifList.end(); ++it ) { - int index = ( *it ).find( ' ' ); + int index = ( *it ).tqfind( ' ' ); if ( index == -1 ) continue; - QString key = ( *it ).left( index ); + TQString key = ( *it ).left( index ); configs[key] = ( *it ).mid( index ); } @@ -361,18 +361,18 @@ void NetToolsBackend::parseIwconfigOutput() * If we find the interface in the output of 'iwconfig' * we update its data. */ - QDictIterator<Interface> ifIt( mInterfaces ); + TQDictIterator<Interface> ifIt( mInterfaces ); for ( ; ifIt.current(); ++ifIt ) { - QString key = ifIt.currentKey(); + TQString key = ifIt.currentKey(); Interface* interface = ifIt.current(); - if ( configs.find( key ) == configs.end() ) + if ( configs.tqfind( key ) == configs.end() ) { // The interface was not found. continue; } - else if ( configs[key].contains( "no wireless extensions" ) ) + else if ( configs[key].tqcontains( "no wireless extensions" ) ) { // The interface isn't a wireless device. interface->getData().wirelessDevice = false; @@ -386,9 +386,9 @@ void NetToolsBackend::parseIwconfigOutput() } } -void NetToolsBackend::updateWirelessData( QString& config, WirelessData& data ) +void NetToolsBackend::updateWirelessData( TQString& config, WirelessData& data ) { - QRegExp regExp( "ESSID:([^\"][\\S]*)" ); + TQRegExp regExp( "ESSID:([^\"][\\S]*)" ); if ( regExp.search( config ) > -1 ) data.essid = regExp.cap( 1 ); else @@ -397,7 +397,7 @@ void NetToolsBackend::updateWirelessData( QString& config, WirelessData& data ) if ( regExp.search( config ) > -1 ) data.essid = regExp.cap( 1 ); else - data.essid = QString::null; + data.essid = TQString(); } regExp.setPattern( "Mode:(\\w*)" ); @@ -460,12 +460,12 @@ void NetToolsBackend::parseRouteOutput() /* mRouteStdout contains the complete output of 'route' which we * are going to parse here. */ - QMap<QString, QStringList> configs; - QStringList routeList = QStringList::split( "\n", mRouteStdout ); - QStringList::Iterator it; + TQMap<TQString, TQStringList> configs; + TQStringList routeList = TQStringList::split( "\n", mRouteStdout ); + TQStringList::Iterator it; for ( it = routeList.begin(); it != routeList.end(); ++it ) { - QStringList routeParameter = QStringList::split( " ", *it ); + TQStringList routeParameter = TQStringList::split( " ", *it ); if ( routeParameter.count() < 8 ) // no routing entry continue; if ( routeParameter[0] != "0.0.0.0" ) // no default route @@ -477,22 +477,22 @@ void NetToolsBackend::parseRouteOutput() * If we find the interface in the output of 'route' we update * the data of the interface. */ - QDictIterator<Interface> ifIt( mInterfaces ); + TQDictIterator<Interface> ifIt( mInterfaces ); for ( ; ifIt.current(); ++ifIt ) { - QString key = ifIt.currentKey(); + TQString key = ifIt.currentKey(); Interface* interface = ifIt.current(); - if ( configs.find( key ) != configs.end() ) + if ( configs.tqfind( key ) != configs.end() ) { // Update the default gateway. - QStringList routeParameter = configs[key]; + TQStringList routeParameter = configs[key]; interface->getData().defaultGateway = routeParameter[1]; } else { // Reset the default gateway. - interface->getData().defaultGateway = QString::null; + interface->getData().defaultGateway = TQString(); } } } diff --git a/src/knemod/backends/nettoolsbackend.h b/src/knemod/backends/nettoolsbackend.h index 788938c..f457208 100644 --- a/src/knemod/backends/nettoolsbackend.h +++ b/src/knemod/backends/nettoolsbackend.h @@ -20,7 +20,7 @@ #ifndef NETTOOLSBACKEND_H #define NETTOOLSBACKEND_H -#include <qobject.h> +#include <tqobject.h> #include "backendbase.h" @@ -35,14 +35,15 @@ class KProcess; * @author Percy Leonhardt <[email protected]> */ -class NetToolsBackend : public QObject, BackendBase +class NetToolsBackend : public TQObject, BackendBase { Q_OBJECT + TQ_OBJECT public: - NetToolsBackend(QDict<Interface>& interfaces ); + NetToolsBackend(TQDict<Interface>& interfaces ); virtual ~NetToolsBackend(); - static BackendBase* createInstance( QDict<Interface>& interfaces ); + static BackendBase* createInstance( TQDict<Interface>& interfaces ); void update(); @@ -57,13 +58,13 @@ private slots: private: void parseRouteOutput(); void parseIfconfigOutput(); - void updateInterfaceData( QString& config, InterfaceData& data, int type ); + void updateInterfaceData( TQString& config, InterfaceData& data, int type ); void parseIwconfigOutput(); - void updateWirelessData( QString& config, WirelessData& data ); + void updateWirelessData( TQString& config, WirelessData& data ); - QString mRouteStdout; - QString mIfconfigStdout; - QString mIwconfigStdout; + TQString mRouteStdout; + TQString mIfconfigStdout; + TQString mIwconfigStdout; KProcess* mRouteProcess; KProcess* mIfconfigProcess; KProcess* mIwconfigProcess; diff --git a/src/knemod/backends/sysbackend.cpp b/src/knemod/backends/sysbackend.cpp index e0162ad..3ad48ea 100644 --- a/src/knemod/backends/sysbackend.cpp +++ b/src/knemod/backends/sysbackend.cpp @@ -24,10 +24,10 @@ #include <sys/socket.h> #include <netinet/in.h> -#include <qmap.h> -#include <qdir.h> -#include <qregexp.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqstringlist.h> #include <kdebug.h> #include <kprocess.h> @@ -51,7 +51,7 @@ #define SYSPATH "/sys/class/net/" #define PROCROUTE "/proc/net/route" -SysBackend::SysBackend( QDict<Interface>& interfaces ) +SysBackend::SysBackend( TQDict<Interface>& interfaces ) : BackendBase( interfaces ) { } @@ -60,23 +60,23 @@ SysBackend::~SysBackend() { } -BackendBase* SysBackend::createInstance( QDict<Interface>& interfaces ) +BackendBase* SysBackend::createInstance( TQDict<Interface>& interfaces ) { return new SysBackend( interfaces ); } void SysBackend::update() { - QDir dir( SYSPATH ); - QStringList ifList = dir.entryList( QDir::Dirs ); + TQDir dir( SYSPATH ); + TQStringList ifList = dir.entryList( TQDir::Dirs ); - QDictIterator<Interface> ifIt( mInterfaces ); + TQDictIterator<Interface> ifIt( mInterfaces ); for ( ; ifIt.current(); ++ifIt ) { - QString key = ifIt.currentKey(); + TQString key = ifIt.currentKey(); Interface* interface = ifIt.current(); - if ( ifList.find( key ) == ifList.end() ) + if ( ifList.tqfind( key ) == ifList.end() ) { // The interface does not exist. Meaning the driver // isn't loaded and/or the interface has not been created. @@ -85,7 +85,7 @@ void SysBackend::update() } else { - if ( QFile::exists( SYSPATH + key + "/wireless" ) ) + if ( TQFile::exists( SYSPATH + key + "/wireless" ) ) { interface->getData().wirelessDevice = true; } @@ -127,7 +127,7 @@ void SysBackend::update() updateComplete(); } -bool SysBackend::readNumberFromFile( const QString& fileName, unsigned int& value ) +bool SysBackend::readNumberFromFile( const TQString& fileName, unsigned int& value ) { FILE* file = fopen( fileName.latin1(), "r" ); if ( file != NULL ) @@ -143,7 +143,7 @@ bool SysBackend::readNumberFromFile( const QString& fileName, unsigned int& valu return false; } -bool SysBackend::readStringFromFile( const QString& fileName, QString& string ) +bool SysBackend::readStringFromFile( const TQString& fileName, TQString& string ) { char buffer[64]; FILE* file = fopen( fileName.latin1(), "r" ); @@ -161,9 +161,9 @@ bool SysBackend::readStringFromFile( const QString& fileName, QString& string ) return false; } -void SysBackend::updateInterfaceData( const QString& ifName, InterfaceData& data, int type ) +void SysBackend::updateInterfaceData( const TQString& ifName, InterfaceData& data, int type ) { - QString ifFolder = SYSPATH + ifName + "/"; + TQString ifFolder = SYSPATH + ifName + "/"; unsigned int rxPackets = 0; if ( readNumberFromFile( ifFolder + "statistics/rx_packets", rxPackets ) ) @@ -247,22 +247,22 @@ void SysBackend::updateInterfaceData( const QString& ifName, InterfaceData& data if ( type == Interface::ETHERNET ) { - QString hwAddress; + TQString hwAddress; if ( readStringFromFile( ifFolder + "address", hwAddress ) ) { data.hwAddress = hwAddress; } // for the default gateway we use the proc filesystem - QFile routeFile( PROCROUTE ); + TQFile routeFile( PROCROUTE ); if ( routeFile.open( IO_ReadOnly ) ) { - QString routeData( routeFile.readAll().data() ); - QStringList routeEntries = QStringList::split( "\n", routeData ); - QStringList::Iterator it; + TQString routeData( routeFile.readAll().data() ); + TQStringList routeEntries = TQStringList::split( "\n", routeData ); + TQStringList::Iterator it; for ( it = routeEntries.begin(); it != routeEntries.end(); ++it ) { - QRegExp regExp( ".*\\s+[\\w\\d]{8}\\s+([\\w\\d]{8})\\s+(\\d{4})" ); + TQRegExp regExp( ".*\\s+[\\w\\d]{8}\\s+([\\w\\d]{8})\\s+(\\d{4})" ); if ( ( regExp.search( *it ) > -1 ) && ( regExp.cap( 2 ).toUInt() & RTF_GATEWAY ) ) { @@ -307,14 +307,14 @@ void SysBackend::updateInterfaceData( const QString& ifName, InterfaceData& data } } -void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data ) +void SysBackend::updateWirelessData( const TQString& ifName, WirelessData& data ) { - QString wirelessFolder = SYSPATH + ifName + "/wireless/"; + TQString wirelessFolder = SYSPATH + ifName + "/wireless/"; unsigned int link = 0; if ( readNumberFromFile( wirelessFolder + "link", link ) ) { - data.linkQuality = QString::number( link ); + data.linkQuality = TQString::number( link ); } #ifdef HAVE_LIBIW @@ -341,7 +341,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data ) } iw_print_freq_value( buffer, sizeof( buffer ), freq ); data.frequency = buffer; - data.channel = QString::number( channel ); + data.channel = TQString::number( channel ); } } @@ -381,7 +381,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data ) } else { - data.nickName = QString::null; + data.nickName = TQString(); } } @@ -402,7 +402,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data ) } else { - data.mode = QString::null; + data.mode = TQString(); } } diff --git a/src/knemod/backends/sysbackend.h b/src/knemod/backends/sysbackend.h index 10650b6..08f4de7 100644 --- a/src/knemod/backends/sysbackend.h +++ b/src/knemod/backends/sysbackend.h @@ -36,18 +36,18 @@ class SysBackend : public BackendBase { public: - SysBackend(QDict<Interface>& interfaces ); + SysBackend(TQDict<Interface>& interfaces ); virtual ~SysBackend(); - static BackendBase* createInstance( QDict<Interface>& interfaces ); + static BackendBase* createInstance( TQDict<Interface>& interfaces ); void update(); private: - bool readNumberFromFile( const QString& fileName, unsigned int& value ); - bool readStringFromFile( const QString& fileName, QString& string ); - void updateWirelessData( const QString& ifName, WirelessData& data ); - void updateInterfaceData( const QString& ifName, InterfaceData& data, int type ); + bool readNumberFromFile( const TQString& fileName, unsigned int& value ); + bool readStringFromFile( const TQString& fileName, TQString& string ); + void updateWirelessData( const TQString& ifName, WirelessData& data ); + void updateInterfaceData( const TQString& ifName, InterfaceData& data, int type ); }; |