summaryrefslogtreecommitdiffstats
path: root/kio/kfile/kdiskfreesp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kio/kfile/kdiskfreesp.cpp
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/kfile/kdiskfreesp.cpp')
-rw-r--r--kio/kfile/kdiskfreesp.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp
index f748b2a66..179b69f72 100644
--- a/kio/kfile/kdiskfreesp.cpp
+++ b/kio/kfile/kdiskfreesp.cpp
@@ -23,8 +23,8 @@
*/
#include "kdiskfreesp.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -43,15 +43,15 @@
/***************************************************************************
* constructor
**/
-KDiskFreeSp::KDiskFreeSp(QObject *parent, const char *name)
- : QObject(parent,name)
+KDiskFreeSp::KDiskFreeSp(TQObject *parent, const char *name)
+ : TQObject(parent,name)
{
dfProc = new KProcess(); Q_CHECK_PTR(dfProc);
dfProc->setEnvironment("LANGUAGE", "C");
- connect( dfProc, SIGNAL(receivedStdout(KProcess *, char *, int) ),
- this, SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
- connect(dfProc,SIGNAL(processExited(KProcess *) ),
- this, SLOT(dfDone() ) );
+ connect( dfProc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int) ),
+ this, TQT_SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
+ connect(dfProc,TQT_SIGNAL(processExited(KProcess *) ),
+ this, TQT_SLOT(dfDone() ) );
readingDFStdErrOut=false;
}
@@ -70,21 +70,21 @@ KDiskFreeSp::~KDiskFreeSp()
**/
void KDiskFreeSp::receivedDFStdErrOut(KProcess *, char *data, int len)
{
- QCString tmp(data,len+1); // adds a zero-byte
+ TQCString tmp(data,len+1); // adds a zero-byte
dfStringErrOut.append(tmp);
}
/***************************************************************************
* reads the df-commands results
**/
-int KDiskFreeSp::readDF( const QString & mountPoint )
+int KDiskFreeSp::readDF( const TQString & mountPoint )
{
if (readingDFStdErrOut || dfProc->isRunning())
return -1;
m_mountPoint = mountPoint;
dfStringErrOut=""; // yet no data received
dfProc->clearArguments();
- (*dfProc) << QString::fromLocal8Bit(DF_COMMAND) << QString::fromLocal8Bit(DF_ARGS);
+ (*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS);
if (!dfProc->start( KProcess::NotifyOnExit, KProcess::AllOutput ))
kdError() << "could not execute ["<< DF_COMMAND << "]" << endl;
return 1;
@@ -98,12 +98,12 @@ void KDiskFreeSp::dfDone()
{
readingDFStdErrOut=true;
- QTextStream t (dfStringErrOut, IO_ReadOnly);
- QString s=t.readLine();
- if ( (s.isEmpty()) || ( s.left(10) != QString::fromLatin1("Filesystem") ) )
+ TQTextStream t (dfStringErrOut, IO_ReadOnly);
+ TQString s=t.readLine();
+ if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) )
kdError() << "Error running df command... got [" << s << "]" << endl;
while ( !t.eof() ) {
- QString u,v;
+ TQString u,v;
s=t.readLine();
s=s.simplifyWhiteSpace();
if ( !s.isEmpty() ) {
@@ -119,7 +119,7 @@ void KDiskFreeSp::dfDone()
//kdDebug(kfile_area) << "[" << s << "]" << endl;
- //QString deviceName = s.left(s.find(BLANK));
+ //TQString deviceName = s.left(s.find(BLANK));
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl;
@@ -143,7 +143,7 @@ void KDiskFreeSp::dfDone()
s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
- QString mountPoint = s.stripWhiteSpace();
+ TQString mountPoint = s.stripWhiteSpace();
//kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl;
if ( mountPoint == m_mountPoint )
@@ -160,10 +160,10 @@ void KDiskFreeSp::dfDone()
delete this;
}
-KDiskFreeSp * KDiskFreeSp::findUsageInfo( const QString & path )
+KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path )
{
KDiskFreeSp * job = new KDiskFreeSp;
- QString mountPoint = KIO::findPathMountPoint( path );
+ TQString mountPoint = KIO::findPathMountPoint( path );
job->readDF( mountPoint );
return job;
}