diff options
author | Armin Berres <armin.berres@basyskom.de> | 2011-03-16 07:23:57 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-03-16 07:23:57 (GMT) |
commit | f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac (patch) | |
tree | 913e5598a782d0f22cc4752a789d0f43bb3caa65 /src/gui/painting/qwindowsurface.cpp | |
parent | 81ce61c9459c85f53486e668b532fe43a4d40ff0 (diff) | |
download | Qt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.zip Qt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.tar.gz Qt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.tar.bz2 |
Make getters for staticContentsSupport and partialUpdateSupport virtual
When QRuntimeGraphicsSystem is asked for its support for static contents
of partial updates it should return the value for the currently running
wrapped graphicssystem. As the getters have not been virtual so far this
could not be implemented.
Additionally the setters have been removed as these values are not
supposed to be set from the outside. Only the graphicssystems itself
knows what it supports. If the default values should be changed the
methods should be overwritten.
Merge-request: 1136
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/painting/qwindowsurface.cpp')
-rw-r--r-- | src/gui/painting/qwindowsurface.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/gui/painting/qwindowsurface.cpp b/src/gui/painting/qwindowsurface.cpp index 029b9dc..9b71818 100644 --- a/src/gui/painting/qwindowsurface.cpp +++ b/src/gui/painting/qwindowsurface.cpp @@ -52,8 +52,6 @@ class QWindowSurfacePrivate public: QWindowSurfacePrivate(QWidget *w) : window(w) - , staticContentsSupport(0) - , partialUpdateSupport(1) { } @@ -65,8 +63,6 @@ public: #endif //Q_WS_QPA QRegion staticContents; QList<QImage*> bufferImages; - uint staticContentsSupport : 1; - uint partialUpdateSupport : 1; }; /*! @@ -313,16 +309,7 @@ QPoint QWindowSurface::offset(const QWidget *widget) const bool QWindowSurface::hasStaticContentsSupport() const { - return d_ptr->staticContentsSupport; -} - -void QWindowSurface::setStaticContentsSupport(bool enable) -{ - if (enable && !d_ptr->partialUpdateSupport) { - qWarning("QWindowSurface::setStaticContentsSupport: static contents support requires partial update support"); - return; - } - d_ptr->staticContentsSupport = enable; + return false; } void QWindowSurface::setStaticContents(const QRegion ®ion) @@ -337,21 +324,12 @@ QRegion QWindowSurface::staticContents() const bool QWindowSurface::hasStaticContents() const { - return d_ptr->staticContentsSupport && !d_ptr->staticContents.isEmpty(); + return hasStaticContentsSupport() && !d_ptr->staticContents.isEmpty(); } bool QWindowSurface::hasPartialUpdateSupport() const { - return d_ptr->partialUpdateSupport; -} - -void QWindowSurface::setPartialUpdateSupport(bool enable) -{ - if (!enable && d_ptr->staticContentsSupport) { - qWarning("QWindowSurface::setPartialUpdateSupport: static contents support requires partial update support"); - return; - } - d_ptr->partialUpdateSupport = enable; + return true; } #ifdef Q_WS_QPA |