gmio_support: make qt_stream.* compatible with Qt in namespace

This commit is contained in:
Hugues Delorme 2015-03-18 16:28:25 +01:00
parent 71b9faff4f
commit a0fa9bb206
2 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,8 @@
#include <QtCore/QFile> #include <QtCore/QFile>
#include <QtCore/QIODevice> #include <QtCore/QIODevice>
QT_USE_NAMESPACE
static gmio_bool_t gmio_stream_qiodevice_at_end(void* cookie) static gmio_bool_t gmio_stream_qiodevice_at_end(void* cookie)
{ {
return static_cast<QIODevice*>(cookie)->atEnd(); return static_cast<QIODevice*>(cookie)->atEnd();

View File

@ -21,11 +21,16 @@
#define GMIO_SUPPORT_QT_STREAM_H #define GMIO_SUPPORT_QT_STREAM_H
#include "support_global.h" #include "support_global.h"
#include <QtCore/QtGlobal>
struct gmio_stream; struct gmio_stream;
QT_BEGIN_NAMESPACE
class QIODevice; class QIODevice;
QT_END_NAMESPACE
/*! Configures \p stream for \c QIODevice* (cookie will hold \p device) */ /*! Configures \p stream for \c QIODevice* (cookie will hold \p device) */
GMIO_LIBSUPPORT_EXPORT GMIO_LIBSUPPORT_EXPORT
void gmio_stream_set_qiodevice(struct gmio_stream* stream, QIODevice* device); void gmio_stream_set_qiodevice(
struct gmio_stream* stream, QT_PREPEND_NAMESPACE(QIODevice)* device);
#endif /* GMIO_SUPPORT_QT_STREAM_H */ #endif /* GMIO_SUPPORT_QT_STREAM_H */