File: README.MacOS

package info (click to toggle)
qscintilla 1.7.1-2
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 6,376 kB
  • ctags: 8,206
  • sloc: cpp: 47,784; ansic: 1,829; python: 161; makefile: 82
file content (49 lines) | stat: -rw-r--r-- 1,312 bytes parent folder | download | duplicates (3)
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
                             QScintilla on MacOS/X


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


--- 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(QT_THREAD_SUPPORT)
     if(qt_mac_port_mutex)
-	qt_mac_port_mutex->unlock();
+        qt_mac_port_mutex->unlock();
 #endif
 }