aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-07-08 19:07:21 +1000
committerNeil <nyamatongwe@gmail.com>2020-07-08 19:07:21 +1000
commit629eae1e428756f16ce486df78a8cab939438bde (patch)
tree2a4fda85bdd1769a458628660de8597cd57af23a /qt/ScintillaEditBase/PlatQt.h
parent473cb1d9d394509f15131778b87673f8776bbcef (diff)
downloadscintilla-mirror-629eae1e428756f16ce486df78a8cab939438bde.tar.gz
Backport: Fix deprecated Qt call to use currently supported call.
Backport of changeset 8391:47cf3fcb2447.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.h')
-rw-r--r--qt/ScintillaEditBase/PlatQt.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.h b/qt/ScintillaEditBase/PlatQt.h
index 0243de444..21e3ddda6 100644
--- a/qt/ScintillaEditBase/PlatQt.h
+++ b/qt/ScintillaEditBase/PlatQt.h
@@ -58,6 +58,10 @@ inline Point PointFromQPoint(QPoint qp)
return Point(qp.x(), qp.y());
}
+constexpr PRectangle RectangleInset(PRectangle rc, XYPOSITION delta) noexcept {
+ return PRectangle(rc.left + delta, rc.top + delta, rc.right - delta, rc.bottom - delta);
+}
+
class SurfaceImpl : public Surface {
private:
QPaintDevice *device;