* fix: random crash when editing

* change: symbol completion option ui
This commit is contained in:
royqh1979 2021-06-21 22:17:37 +08:00
parent fd9b41ac6d
commit 10b7f3064a
2 changed files with 94 additions and 73 deletions

View File

@ -98,7 +98,7 @@ bool SynHighlighter::isIdentChar(const QChar &ch) const
if ((ch>='A') && (ch <= 'Z')) { if ((ch>='A') && (ch <= 'Z')) {
return true; return true;
} }
return false;
} }
void SynHighlighter::addAttribute(PSynHighlighterAttribute attribute) void SynHighlighter::addAttribute(PSynHighlighterAttribute attribute)

View File

@ -14,92 +14,114 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="grpCompleSymbols"> <widget class="QGroupBox" name="grpCompleSymbols">
<property name="title"> <property name="title">
<string>Complete Symbols</string> <string>Complete Symbols</string>
</property> </property>
<property name="flat">
<bool>true</bool>
</property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QWidget" name="widget" native="true">
<property name="title"> <layout class="QVBoxLayout" name="verticalLayout_3">
<string>GroupBox</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>11</number> <number>0</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>11</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>11</number> <number>0</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>11</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QCheckBox" name="chkCompleteBrace"> <widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Details</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<item>
<widget class="QCheckBox" name="chkCompleteBrace">
<property name="text">
<string>Complete Braces{}</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteBracket">
<property name="text">
<string>Complete Brackets []</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteParenthesis">
<property name="text">
<string>Complete Parenthesis ()</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteComments">
<property name="text">
<string>Complete Multiline Comments /**/</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteSingleQuotation">
<property name="text">
<string>Complete Single Quotations ''</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteDoubleQuotation">
<property name="text">
<string>Complete Double Quotations &quot;&quot;</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteGlobalInclude">
<property name="text">
<string>Complete #include &lt;&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkSkipMathingSymbols">
<property name="text"> <property name="text">
<string>Complete Braces{}</string> <string>Skip matching symbols while typing</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="chkCompleteBracket"> <widget class="QCheckBox" name="chkRemoveMatchingSymbols">
<property name="text"> <property name="text">
<string>Complete Brackets []</string> <string>Remove matching symbols when delete chars</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteParenthesis">
<property name="text">
<string>Complete Parenthesis ()</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteComments">
<property name="text">
<string>Complete Multiline Comments /**/</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteSingleQuotation">
<property name="text">
<string>Complete Single Quotations ''</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteDoubleQuotation">
<property name="text">
<string>Complete Double Quotations &quot;&quot;</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCompleteGlobalInclude">
<property name="text">
<string>Complete #include &lt;&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -107,18 +129,17 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="chkSkipMathingSymbols"> <spacer name="horizontalSpacer">
<property name="text"> <property name="orientation">
<string>Skip matching symbols while typing</string> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> <property name="sizeHint" stdset="0">
</item> <size>
<item> <width>40</width>
<widget class="QCheckBox" name="chkRemoveMatchingSymbols"> <height>20</height>
<property name="text"> </size>
<string>Remove matching symbols when delete chars</string>
</property> </property>
</widget> </spacer>
</item> </item>
</layout> </layout>
</widget> </widget>