diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdecore/ktempfile.cpp | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-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 'kdecore/ktempfile.cpp')
-rw-r--r-- | kdecore/ktempfile.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kdecore/ktempfile.cpp b/kdecore/ktempfile.cpp index 9c6c8cdfb..c04f725fe 100644 --- a/kdecore/ktempfile.cpp +++ b/kdecore/ktempfile.cpp @@ -43,10 +43,10 @@ #define _PATH_TMP "/tmp" #endif -#include <qdatetime.h> -#include <qfile.h> -#include <qdatastream.h> -#include <qtextstream.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqdatastream.h> +#include <tqtextstream.h> #include "kglobal.h" #include "kapplication.h" @@ -56,8 +56,8 @@ #include "kde_file.h" #include "kdebug.h" -/* antlarr: KDE 4: make the parameters const QString & */ -KTempFile::KTempFile(QString filePrefix, QString fileExtension, int mode) +/* antlarr: KDE 4: make the parameters const TQString & */ +KTempFile::KTempFile(TQString filePrefix, TQString fileExtension, int mode) { bAutoDelete = false; mFd = -1; @@ -89,26 +89,26 @@ KTempFile::KTempFile(bool) } bool -KTempFile::create(const QString &filePrefix, const QString &fileExtension, +KTempFile::create(const TQString &filePrefix, const TQString &fileExtension, int mode) { // make sure the random seed is randomized (void) KApplication::random(); - QCString ext = QFile::encodeName(fileExtension); - QCString nme = QFile::encodeName(filePrefix) + "XXXXXX" + ext; + TQCString ext = TQFile::encodeName(fileExtension); + TQCString nme = TQFile::encodeName(filePrefix) + "XXXXXX" + ext; if((mFd = mkstemps(nme.data(), ext.length())) < 0) { // Recreate it for the warning, mkstemps emptied it - QCString nme = QFile::encodeName(filePrefix) + "XXXXXX" + ext; + TQCString nme = TQFile::encodeName(filePrefix) + "XXXXXX" + ext; kdWarning() << "KTempFile: Error trying to create " << nme << ": " << strerror(errno) << endl; mError = errno; - mTmpName = QString::null; + mTmpName = TQString::null; return false; } // got a file descriptor. nme contains the name - mTmpName = QFile::decodeName(nme); + mTmpName = TQFile::decodeName(nme); mode_t tmp = 0; mode_t umsk = umask(tmp); umask(umsk); @@ -166,35 +166,35 @@ KTempFile::fstream() return mStream; } -QFile * +TQFile * KTempFile::file() { if (mFile) return mFile; if ( !fstream() ) return 0; - mFile = new QFile(); + mFile = new TQFile(); mFile->setName( name() ); mFile->open(IO_ReadWrite, mStream); return mFile; } -QTextStream * +TQTextStream * KTempFile::textStream() { if (mTextStream) return mTextStream; if ( !file() ) return 0; // Initialize mFile - mTextStream = new QTextStream( mFile ); + mTextStream = new TQTextStream( mFile ); return mTextStream; } -QDataStream * +TQDataStream * KTempFile::dataStream() { if (mDataStream) return mDataStream; if ( !file() ) return 0; // Initialize mFile - mDataStream = new QDataStream( mFile ); + mDataStream = new TQDataStream( mFile ); return mDataStream; } @@ -202,8 +202,8 @@ void KTempFile::unlink() { if (!mTmpName.isEmpty()) - QFile::remove( mTmpName ); - mTmpName = QString::null; + TQFile::remove( mTmpName ); + mTmpName = TQString::null; } #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 |