diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2016-11-03 16:08:55 +0000 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-01-12 22:16:06 +0000 |
commit | 6255cb893d411b055758f2e64e94fde0bce91ea8 (patch) | |
tree | d8e445c85d6cd386c2228776001b372d01fbbef7 /src/gui/opengl/qopengltexturecache_p.h | |
parent | a4c25c020554527aa9ff9b533afabffef46be131 (diff) | |
download | qtbase-6255cb893d411b055758f2e64e94fde0bce91ea8.tar.gz |
Remove qtypetraits.h's contents altogether
So that QFlags can use an (un)signed int matching the
underlying type as identified by the compiler and not by us.
Requires fixing a few warnings about sign conversion due to
QFlags misusages in qtbase that were either plain wrong, or
were relying on the enum being backed by an (un)signed int
when it wasn't.
Keep qtypetraits.h in the source tree in order to prevent
source breaks if some downstream #includes it (note however
that it did not contain any public API).
Change-Id: Ib3a92b98db7031e793a088fb2a3b306eff4d7a3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/opengl/qopengltexturecache_p.h')
-rw-r--r-- | src/gui/opengl/qopengltexturecache_p.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/gui/opengl/qopengltexturecache_p.h b/src/gui/opengl/qopengltexturecache_p.h index c68b068739..4a438c8d95 100644 --- a/src/gui/opengl/qopengltexturecache_p.h +++ b/src/gui/opengl/qopengltexturecache_p.h @@ -60,19 +60,7 @@ QT_BEGIN_NAMESPACE -class QOpenGLCachedTexture -{ -public: - QOpenGLCachedTexture(GLuint id, int options, QOpenGLContext *context); - ~QOpenGLCachedTexture() { m_resource->free(); } - - GLuint id() const { return m_resource->id(); } - int options() const { return m_options; } - -private: - QOpenGLSharedResourceGuard *m_resource; - int m_options; -}; +class QOpenGLCachedTexture; class Q_GUI_EXPORT QOpenGLTextureCache : public QOpenGLSharedResource { @@ -106,6 +94,20 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLTextureCache::BindOptions) +class QOpenGLCachedTexture +{ +public: + QOpenGLCachedTexture(GLuint id, QOpenGLTextureCache::BindOptions options, QOpenGLContext *context); + ~QOpenGLCachedTexture() { m_resource->free(); } + + GLuint id() const { return m_resource->id(); } + QOpenGLTextureCache::BindOptions options() const { return m_options; } + +private: + QOpenGLSharedResourceGuard *m_resource; + QOpenGLTextureCache::BindOptions m_options; +}; + QT_END_NAMESPACE #endif |