diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-06-01 15:23:19 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-06-01 13:38:18 +0000 |
commit | 0e1b4e896fba50ce6603bc323b2940e6859e7421 (patch) | |
tree | d55b089e795fa088374bb168de2d829911c0d6fb /src/gui | |
parent | 78e335408303380310dd59fab421e495cf517ead (diff) |
Avoid QWidget dependency in QtGui
It's not a real dependency as all we need is to store a pointer,
but better not to use the name QWidget at all.
Change-Id: I30ef1dd44ac7e42c1b9c84675f94088b8c516076
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 10 | ||||
-rw-r--r-- | src/gui/painting/qplatformbackingstore.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 83077f38ca..62492980de 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -83,7 +83,7 @@ public: struct QBackingstoreTextureInfo { - QWidget *widget; // may be null + void *source; // may be null GLuint textureId; QRect rect; QRect clipRect; @@ -125,10 +125,10 @@ GLuint QPlatformTextureList::textureId(int index) const return d->textures.at(index).textureId; } -QWidget *QPlatformTextureList::widget(int index) +void *QPlatformTextureList::source(int index) { Q_D(const QPlatformTextureList); - return d->textures.at(index).widget; + return d->textures.at(index).source; } QPlatformTextureList::Flags QPlatformTextureList::flags(int index) const @@ -164,12 +164,12 @@ bool QPlatformTextureList::isLocked() const return d->locked; } -void QPlatformTextureList::appendTexture(QWidget *widget, GLuint textureId, const QRect &geometry, +void QPlatformTextureList::appendTexture(void *source, GLuint textureId, const QRect &geometry, const QRect &clipRect, Flags flags) { Q_D(QPlatformTextureList); QBackingstoreTextureInfo bi; - bi.widget = widget; + bi.source = source; bi.textureId = textureId; bi.rect = geometry; bi.clipRect = clipRect; diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h index 5fa7e6dac0..eac97e9cf6 100644 --- a/src/gui/painting/qplatformbackingstore.h +++ b/src/gui/painting/qplatformbackingstore.h @@ -83,12 +83,12 @@ public: GLuint textureId(int index) const; QRect geometry(int index) const; QRect clipRect(int index) const; - QWidget *widget(int index); + void *source(int index); Flags flags(int index) const; void lock(bool on); bool isLocked() const; - void appendTexture(QWidget *widget, GLuint textureId, const QRect &geometry, + void appendTexture(void *source, GLuint textureId, const QRect &geometry, const QRect &clipRect = QRect(), Flags flags = 0); void clear(); |