110 indentStyle |= QsciScintilla.AiOpening |
112 indentStyle |= QsciScintilla.AiOpening |
111 if Preferences.getEditor("CppIndentClosingBrace"): |
113 if Preferences.getEditor("CppIndentClosingBrace"): |
112 indentStyle |= QsciScintilla.AiClosing |
114 indentStyle |= QsciScintilla.AiClosing |
113 self.setAutoIndentStyle(indentStyle) |
115 self.setAutoIndentStyle(indentStyle) |
114 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) |
116 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) |
115 try: |
117 with contextlib.suppress(AttributeError): |
116 self.setDollarsAllowed(Preferences.getEditor("CppDollarsAllowed")) |
118 self.setDollarsAllowed(Preferences.getEditor("CppDollarsAllowed")) |
117 except AttributeError: |
119 with contextlib.suppress(AttributeError): |
118 pass |
|
119 try: |
|
120 self.setStylePreprocessor( |
120 self.setStylePreprocessor( |
121 Preferences.getEditor("CppStylePreprocessor")) |
121 Preferences.getEditor("CppStylePreprocessor")) |
122 except AttributeError: |
122 with contextlib.suppress(AttributeError): |
123 pass |
|
124 try: |
|
125 self.setHighlightTripleQuotedStrings( |
123 self.setHighlightTripleQuotedStrings( |
126 Preferences.getEditor("CppHighlightTripleQuotedStrings")) |
124 Preferences.getEditor("CppHighlightTripleQuotedStrings")) |
127 except AttributeError: |
125 with contextlib.suppress(AttributeError): |
128 pass |
|
129 try: |
|
130 self.setHighlightHashQuotedStrings( |
126 self.setHighlightHashQuotedStrings( |
131 Preferences.getEditor("CppHighlightHashQuotedStrings")) |
127 Preferences.getEditor("CppHighlightHashQuotedStrings")) |
132 except AttributeError: |
128 with contextlib.suppress(AttributeError): |
133 pass |
|
134 try: |
|
135 self.setHighlightBackQuotedStrings( |
129 self.setHighlightBackQuotedStrings( |
136 Preferences.getEditor("CppHighlightBackQuotedStrings")) |
130 Preferences.getEditor("CppHighlightBackQuotedStrings")) |
137 except AttributeError: |
131 with contextlib.suppress(AttributeError): |
138 pass |
|
139 try: |
|
140 self.setHighlightEscapeSequences( |
132 self.setHighlightEscapeSequences( |
141 Preferences.getEditor("CppHighlightEscapeSequences")) |
133 Preferences.getEditor("CppHighlightEscapeSequences")) |
142 except AttributeError: |
134 with contextlib.suppress(AttributeError): |
143 pass |
|
144 try: |
|
145 self.setVerbatimStringEscapeSequencesAllowed( |
135 self.setVerbatimStringEscapeSequencesAllowed( |
146 Preferences.getEditor( |
136 Preferences.getEditor( |
147 "CppVerbatimStringEscapeSequencesAllowed")) |
137 "CppVerbatimStringEscapeSequencesAllowed")) |
148 except AttributeError: |
|
149 pass |
|
150 |
138 |
151 def autoCompletionWordSeparators(self): |
139 def autoCompletionWordSeparators(self): |
152 """ |
140 """ |
153 Public method to return the list of separators for autocompletion. |
141 Public method to return the list of separators for autocompletion. |
154 |
142 |