summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_p.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-04 15:18:39 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-02-12 13:32:14 +0000
commit1a36cf5ea1a8ab10658919892f29bbc3d337d1d3 (patch)
tree1edada455334a426b4724889090f8087633d3f1e /src/widgets/kernel/qwidget_p.h
parenta3c3330b6fa2a7599a86dd1475987e73856f481b (diff)
Deduplicate QWidgetPrivate::invalidateBuffer
Now that MSVC (presumably) supports templates, we can merge the QRect and QRegion versions of the functions into one. The function has been renamed to invalidateBackingStore to better reflect what it's doing. Change-Id: I0e94a0cabd286cf97f2ba718a42ee0425f59d3ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r--src/widgets/kernel/qwidget_p.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index ab5dc6bfba..60612e9b52 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -452,10 +452,11 @@ public:
void scrollChildren(int dx, int dy);
void moveRect(const QRect &, int dx, int dy);
void scrollRect(const QRect &, int dx, int dy);
- void invalidateBuffer_resizeHelper(const QPoint &oldPos, const QSize &oldSize);
- // ### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore).
- void invalidateBuffer(const QRegion &);
- void invalidateBuffer(const QRect &);
+ void invalidateBackingStore_resizeHelper(const QPoint &oldPos, const QSize &oldSize);
+
+ template <class T>
+ void invalidateBackingStore(const T &);
+
QRegion overlappedRegion(const QRect &rect, bool breakAfterFirst = false) const;
void syncBackingStore();
void syncBackingStore(const QRegion &region);