File: QScintilla-2.9.3-xcode8.patch

package info (click to toggle)
openscad 2021.01-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 35,972 kB
  • sloc: cpp: 53,199; sh: 4,384; ansic: 4,382; python: 1,813; yacc: 853; javascript: 762; lex: 417; lisp: 163; xml: 127; makefile: 118
file content (81 lines) | stat: -rw-r--r-- 1,991 bytes parent folder | download | duplicates (5)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
diff --git a/Qt4Qt5/Qsci/qsciscintilla.h b/Qt4Qt5/Qsci/qsciscintilla.h
index c8a7d5a..563884b 100644
--- a/Qt4Qt5/Qsci/qsciscintilla.h
+++ b/Qt4Qt5/Qsci/qsciscintilla.h
@@ -22,9 +22,11 @@
 #ifndef QSCISCINTILLA_H
 #define QSCISCINTILLA_H
 
+/*---OPENCOR---
 #ifdef __APPLE__
 extern "C++" {
 #endif
+*/
 
 #include <QByteArray>
 #include <QList>
@@ -2135,7 +2137,13 @@ private slots:
     int ct_cursor;
     QList<int> ct_shifts;
     AutoCompletionUseSingle use_single;
+/*---OPENCOR---
     QPointer<QsciLexer> lex;
+*/
+//---OPENCOR--- BEGIN
+    struct Lexer;
+    Lexer *lexerStruct;
+//---OPENCOR--- END
     QsciCommandSet *stdCmds;
     QsciDocument doc;
     QColor nl_text_colour;
@@ -2157,8 +2165,10 @@ private slots:
     QsciScintilla &operator=(const QsciScintilla &);
 };
 
+/*---OPENCOR---
 #ifdef __APPLE__
 }
 #endif
+*/
 
 #endif
diff --git a/Qt4Qt5/qsciscintilla.cpp b/Qt4Qt5/qsciscintilla.cpp
index 4ddad7c..4f0bf85 100644
--- a/Qt4Qt5/qsciscintilla.cpp
+++ b/Qt4Qt5/qsciscintilla.cpp
@@ -41,6 +41,14 @@
 #include "Qsci/qscistyle.h"
 #include "Qsci/qscistyledtext.h"
 
+//---OPENCOR--- BEGIN
+struct QsciScintilla::Lexer
+{
+    QPointer<QsciLexer> object;
+};
+
+#define lex (lexerStruct->object)
+//---OPENCOR--- END
 
 // Make sure these match the values in Scintilla.h.  We don't #include that
 // file because it just causes more clashes.
@@ -67,6 +75,9 @@ QsciScintilla::QsciScintilla(QWidget *parent)
       wchars(defaultWordChars), call_tips_position(CallTipsBelowText),
       call_tips_style(CallTipsNoContext), maxCallTips(-1),
       use_single(AcusNever), explicit_fillups(""), fillups_enabled(false)
+//---OPENCOR--- BEGIN
+    , lexerStruct(new Lexer())
+//---OPENCOR--- END
 {
     connect(this,SIGNAL(SCN_MODIFYATTEMPTRO()),
              SIGNAL(modificationAttempted()));
@@ -146,6 +157,9 @@ QsciScintilla::~QsciScintilla()
 
     doc.undisplay(this);
     delete stdCmds;
+//---OPENCOR--- BEGIN
+    delete lexerStruct;
+//---OPENCOR--- END
 }