From 395a904bff7b4d6ead445c342f7ac0c5fbf29121 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 18 Jun 2011 17:00:31 +0000 Subject: TQt4 port kdeaddons This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun-plugins/oblique/kbuffer.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'noatun-plugins/oblique/kbuffer.h') diff --git a/noatun-plugins/oblique/kbuffer.h b/noatun-plugins/oblique/kbuffer.h index 63e626b..0341fef 100644 --- a/noatun-plugins/oblique/kbuffer.h +++ b/noatun-plugins/oblique/kbuffer.h @@ -21,15 +21,19 @@ public: /** open a memory buffer */ bool open(int mode); /** read in a block of memory */ - Q_LONG readBlock(char* data, long unsigned int maxLen); + TQ_LONG readBlock(char* data, long unsigned int maxLen); /** query buffer size */ - Q_ULONG size() const; +#ifdef USE_QT4 + qint64 size() const; +#else // USE_QT4 + TQ_ULONG size() const; +#endif // USE_QT4 /** No descriptions */ void flush(); /** Close buffer */ void close(); /** write a block of memory */ - Q_LONG writeBlock(const char *data, long unsigned int maxLen); + TQ_LONG writeBlock(const char *data, long unsigned int maxLen); /** read a byte */ int getch(); /** undo last getch() @@ -40,6 +44,12 @@ public: void* data() { return &buf[0]; } + +#ifdef USE_QT4 + virtual inline qint64 readData ( char * data, qint64 maxSize ) { return readBlock(data, maxSize); } + virtual inline qint64 writeData ( const char * data, qint64 maxSize ) { return writeBlock(data, maxSize); } +#endif // USE_QT4 + private: std::vector buf; std::vector::iterator bufPos; -- cgit v1.2.1