summaryrefslogtreecommitdiff
blob: dc65b1c49d23a91a222b652d1c5f01310da910db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 9347112a77b3b628af8c0b8d4d7cbc0929eede9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolthera=20van=20H=C3=B6vell=20tot=20Westerflier?=
 <griffinvalley@gmail.com>
Date: Sat, 30 Mar 2019 21:47:37 +0100
Subject: BUG:406032 Fix crash caused by unsupported composition mode in QT
 5.12

Qt 5.12 doesn't support QPainter::RasterOp_SourceXorDestination anymore.

Trying to paint with a painter that uses this while opengl is enabled
will lead to a crash. The only relevant place this enum value is still used
is in kis_tool.cc, where it is only painted on the regular non-accelerated canvas.

Anyhow, told the smartpatch to use this function instead of doing something itself.

The whole thing is a little bizar.
---
 plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
index 656ba38..32577a3 100644
--- a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
+++ b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
@@ -245,9 +245,8 @@ void KisToolSmartPatch::paint(QPainter &painter, const KoViewConverter &converte
     Q_UNUSED(converter);
 
     painter.save();
-    painter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
-    painter.setPen(QColor(128, 255, 128));
-    painter.drawPath(pixelToView(m_d->brushOutline));
+    QPainterPath path = pixelToView(m_d->brushOutline);
+    paintToolOutline(&painter, path);
     painter.restore();
 
     painter.save();
-- 
cgit v1.1