diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /noatun-plugins/oblique/kbuffer.h | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
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
Diffstat (limited to 'noatun-plugins/oblique/kbuffer.h')
-rw-r--r-- | noatun-plugins/oblique/kbuffer.h | 16 |
1 files changed, 13 insertions, 3 deletions
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<char> buf; std::vector<char>::iterator bufPos; |