diff options
Diffstat (limited to 'src/svnqt/svnfilestream.cpp')
-rw-r--r-- | src/svnqt/svnfilestream.cpp | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/src/svnqt/svnfilestream.cpp b/src/svnqt/svnfilestream.cpp index 2803ef4..b160003 100644 --- a/src/svnqt/svnfilestream.cpp +++ b/src/svnqt/svnfilestream.cpp @@ -19,33 +19,27 @@ ***************************************************************************/ #include "svnfilestream.hpp" -#include <qfile.h> +#include <tqfile.h> namespace svn { namespace stream { -#if QT_VERSION < 0x040000 typedef int openmode; #define READONLY IO_ReadOnly #define WRITEONLY IO_WriteOnly -#else -typedef QIODevice::OpenMode openmode; -#define READONLY QIODevice::ReadOnly -#define WRITEONLY QIODevice::WriteOnly -#endif -class SVNQT_NOEXPORT SvnFileStream_private +class SVNTQT_NOEXPORT SvnFileStream_private { public: - SvnFileStream_private(const QString&fn,openmode mode); + SvnFileStream_private(const TQString&fn,openmode mode); virtual ~SvnFileStream_private(); - QString m_FileName; - QFile m_File; + TQString m_FileName; + TQFile m_File; }; -SvnFileStream_private::SvnFileStream_private(const QString&fn,openmode mode) +SvnFileStream_private::SvnFileStream_private(const TQString&fn,openmode mode) : m_FileName(fn),m_File(fn) { m_File.open(mode); @@ -55,7 +49,7 @@ SvnFileStream_private::~SvnFileStream_private() { } -SvnFileOStream::SvnFileOStream(const QString&fn,svn_client_ctx_t*ctx) +SvnFileOStream::SvnFileOStream(const TQString&fn,svn_client_ctx_t*ctx) :SvnStream(false,true,ctx) { m_FileData = new SvnFileStream_private(fn,WRITEONLY); @@ -81,18 +75,14 @@ long SvnFileOStream::write(const char* data, const unsigned long max) if (!m_FileData->m_File.isOpen()) { return -1; } -#if QT_VERSION < 0x040000 long res = m_FileData->m_File.writeBlock(data,max); -#else - long res = m_FileData->m_File.write(data,max); -#endif if (res<0) { setError(m_FileData->m_File.errorString()); } return res; } -SvnFileIStream::SvnFileIStream(const QString&fn,svn_client_ctx_t*ctx) +SvnFileIStream::SvnFileIStream(const TQString&fn,svn_client_ctx_t*ctx) :SvnStream(true,false,ctx) { m_FileData = new SvnFileStream_private(fn,READONLY); @@ -118,11 +108,7 @@ long SvnFileIStream::read(char* data, const unsigned long max) if (!m_FileData->m_File.isOpen()) { return -1; } -#if QT_VERSION < 0x040000 long res = m_FileData->m_File.readBlock(data,max); -#else - long res = m_FileData->m_File.read(data,max); -#endif if (res<0) { setError(m_FileData->m_File.errorString()); } |