summaryrefslogtreecommitdiffstats
path: root/README.MacOS
blob: 41bb3374db273e9d322e31ddd6079c91a7b59acb (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
39
40
41
42
43
44
45
46
47
48
49
                             TQScintilla on MacOS/X


All versions of TQt for MacOS/X up to an including Qt v3.3.2 have a bug which
crashes TQScintilla.  The following patch needs to be applied to TQt:


--- src/kernel/qt_mac.h	2004-04-21 00:15:43 -0000
+++ src/kernel/qt_mac.h	2004-04-21 00:15:43 -0000

@@ -395,22 +395,28 @@
 inline QMacSavedPortInfo::~QMacSavedPortInfo()
 {
     if(mac_window_count) {
-	if(valid_gworld) 
-	    SetGWorld(world,handle); //always do this one first
-	else
-	    setPaintDevice(qt_mac_safe_pdev);
-	SetClip(clip);
-	DisposeRgn(clip);
-	SetPenState(&pen);
-	RGBForeColor(&fore);
-	RGBBackColor(&back);
+        bool set_state = false;
+        if(valid_gworld) {
+            set_state = IsValidPort(world);
+            if(set_state)
+                SetGWorld(world,handle); //always do this one first
+        } else {
+            setPaintDevice(qt_mac_safe_pdev);
+        }
+        if(set_state) {
+            SetClip(clip);
+            SetPenState(&pen);
+            RGBForeColor(&fore);
+            RGBBackColor(&back);
+        }
+        DisposeRgn(clip);
     }
     if(fi)
 	delete fi;
     qt_mac_current_painter = painter;
 #if defined(TQT_THREAD_SUPPORT)
     if(qt_mac_port_mutex)
-	qt_mac_port_mutex->unlock();
+        qt_mac_port_mutex->unlock();
 #endif
 }