summaryrefslogtreecommitdiffstats
path: root/src/common/global/pfile.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/global/pfile.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/global/pfile.cpp')
-rw-r--r--src/common/global/pfile.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/common/global/pfile.cpp b/src/common/global/pfile.cpp
index 71cee16..66d7f4b 100644
--- a/src/common/global/pfile.cpp
+++ b/src/common/global/pfile.cpp
@@ -8,10 +8,10 @@
***************************************************************************/
#include "pfile.h"
-#include <qfile.h>
+#include <tqfile.h>
//-----------------------------------------------------------------------------
-PURL::FileBase::FileBase(Log::Generic &log, const QString &extension)
+PURL::FileBase::FileBase(Log::Generic &log, const TQString &extension)
: _tmp(0), _file(0), _stream(0), _extension(extension), _log(log)
{}
@@ -22,12 +22,12 @@ PURL::FileBase::~FileBase()
delete _tmp;
}
-const QFile *PURL::FileBase::qfile() const
+const TQFile *PURL::FileBase::qfile() const
{
return (_tmp ? _tmp->file() : _file);
}
-QFile *PURL::FileBase::qfile()
+TQFile *PURL::FileBase::qfile()
{
return (_tmp ? _tmp->file() : _file);
}
@@ -37,9 +37,9 @@ void PURL::FileBase::flush()
if ( qfile() ) qfile()->flush();
}
-QTextStream &PURL::FileBase::stream()
+TQTextStream &PURL::FileBase::stream()
{
- if ( _stream==0 ) _stream = new QTextStream(qfile());
+ if ( _stream==0 ) _stream = new TQTextStream(qfile());
return *_stream;
}
@@ -49,7 +49,7 @@ bool PURL::FileBase::hasError() const
return ( uint(qfile()->status())!=IO_Ok );
}
-QString PURL::FileBase::errorString() const
+TQString PURL::FileBase::errorString() const
{
if ( _error.isEmpty() ) {
if ( qfile()==0 ) return i18n("File not open.");
@@ -58,28 +58,28 @@ QString PURL::FileBase::errorString() const
return _error;
}
-QStringList PURL::FileBase::readLines()
+TQStringList PURL::FileBase::readLines()
{
- QStringList lines;
+ TQStringList lines;
for (;;) {
- QString s = stream().readLine();
+ TQString s = stream().readLine();
if ( s.isNull() ) break;
lines.append(s);
}
return lines;
}
-QByteArray PURL::FileBase::readAll()
+TQByteArray PURL::FileBase::readAll()
{
if ( qfile() ) return qfile()->readAll();
- return QByteArray();
+ return TQByteArray();
}
//-----------------------------------------------------------------------------
PURL::File::File(const Url &url, Log::Generic &log)
- : FileBase(log, QString::null), _url(url)
+ : FileBase(log, TQString()), _url(url)
{
- _file = new QFile;
+ _file = new TQFile;
}
void PURL::File::setUrl(const Url &url)