diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 20:48:23 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 20:48:23 +0000 |
commit | 383adc283801b6238d8acfc750890613a63f8060 (patch) | |
tree | af3a65389067c05263db2ef4551a541501422998 /src/sources/sysfreqsrc.cpp | |
parent | da7847adb43726079c7a4be1f06acbebe0bdde57 (diff) | |
download | kima-383adc283801b6238d8acfc750890613a63f8060.tar.gz kima-383adc283801b6238d8acfc750890613a63f8060.zip |
TQt4 port kima
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kima@1239290 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/sources/sysfreqsrc.cpp')
-rw-r--r-- | src/sources/sysfreqsrc.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/sources/sysfreqsrc.cpp b/src/sources/sysfreqsrc.cpp index 239f20b..a90c127 100644 --- a/src/sources/sysfreqsrc.cpp +++ b/src/sources/sysfreqsrc.cpp @@ -19,16 +19,16 @@ ***************************************************************************/ #include "sysfreqsrc.h" -#include <qtextstream.h> -#include <qfile.h> -#include <qdir.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqdir.h> #include <klocale.h> -SysFreqSrc::SysFreqSrc(QWidget* inParent, const QFile& inSourceFile): +SysFreqSrc::SysFreqSrc(TQWidget* inParent, const TQFile& inSourceFile): LabelSource(inParent), mSourceFile(inSourceFile.name()), mTrigger(this){ - mID = "cpufreq" + mSourceFile.name().section( '/', -3, -3, QString::SectionSkipEmpty ).remove("cpu"); + mID = "cpufreq" + mSourceFile.name().section( '/', -3, -3, TQString::SectionSkipEmpty ).remove("cpu"); mName = mID; mDescription = i18n("This source is provided by the Linux kernel cpufreq subsystem."); } @@ -36,16 +36,16 @@ SysFreqSrc::SysFreqSrc(QWidget* inParent, const QFile& inSourceFile): SysFreqSrc::~SysFreqSrc(){ } -std::list<Source*>SysFreqSrc::createInstances(QWidget* inParent){ +std::list<Source*>SysFreqSrc::createInstances(TQWidget* inParent){ std::list<Source*> list; - QDir cpuDir( "/sys/devices/system/cpu" ); + TQDir cpuDir( "/sys/devices/system/cpu" ); if ( cpuDir.exists() ){ - cpuDir.setFilter( QDir::Dirs | QDir::NoSymLinks ); - cpuDir.setSorting( QDir::Name); + cpuDir.setFilter( TQDir::Dirs | TQDir::NoSymLinks ); + cpuDir.setSorting( TQDir::Name); for ( unsigned int i = 0; i < cpuDir.count(); i++ ){ if(cpuDir[i].startsWith("cpu")){ - QFile sysFreqFile(cpuDir.canonicalPath() + "/" + cpuDir[i] + "/cpufreq/scaling_cur_freq"); + TQFile sysFreqFile(cpuDir.canonicalPath() + "/" + cpuDir[i] + "/cpufreq/scaling_cur_freq"); if(sysFreqFile.open(IO_ReadOnly)) list.push_back(new SysFreqSrc(inParent, sysFreqFile)); } @@ -54,10 +54,10 @@ std::list<Source*>SysFreqSrc::createInstances(QWidget* inParent){ return list; } -QString SysFreqSrc::fetchValue(){ - QString s = "n/a"; +TQString SysFreqSrc::fetchValue(){ + TQString s = "n/a"; if(mSourceFile.open(IO_ReadOnly)){ - QTextStream textStream(&mSourceFile); + TQTextStream textStream(&mSourceFile); s = KHzinHumanReadable(textStream.readLine().toUInt()); mSourceFile.close(); } |