- change: Disable undo limit by default.
This commit is contained in:
parent
b01a51ab91
commit
32088a18d0
1
NEWS.md
1
NEWS.md
|
@ -17,6 +17,7 @@ Red Panda C++ Version 2.8
|
|||
- enhancement: Print current selection can be used in the print dialog.
|
||||
- enhancement: Print syntax colored content.
|
||||
- enhancement: Correctly handle tab in the exported RTF.
|
||||
- change: Disable undo limit by default.
|
||||
|
||||
Red Panda C++ Version 2.7
|
||||
|
||||
|
|
|
@ -2817,6 +2817,7 @@ void Editor::reparse(bool resetParser)
|
|||
return;
|
||||
if (!mParser->enabled())
|
||||
return;
|
||||
|
||||
//mParser->setEnabled(pSettings->codeCompletion().enabled());
|
||||
ParserLanguage language = mUseCppSyntax?ParserLanguage::CPlusPlus:ParserLanguage::C;
|
||||
if (!inProject()) {
|
||||
|
|
|
@ -1529,7 +1529,7 @@ void Settings::Editor::doLoad()
|
|||
mDefaultEncoding = value("default_encoding", ENCODING_UTF8).toByteArray();
|
||||
mAutoDetectFileEncoding = boolValue("auto_detect_file_encoding",true);
|
||||
mUndoLimit = intValue("undo_limit",0);
|
||||
mUndoMemoryUsage = intValue("undo_memory_usage", 10);
|
||||
mUndoMemoryUsage = intValue("undo_memory_usage", 0);
|
||||
mAutoFormatWhenSaved = boolValue("auto_format_when_saved", false);
|
||||
mRemoveTrailingSpacesWhenSaved = boolValue("remove_trailing_spaces_when_saved",false);
|
||||
mParseTodos = boolValue("parse_todos",true);
|
||||
|
|
|
@ -33,26 +33,27 @@ EnvironmentPerformanceWidget::~EnvironmentPerformanceWidget()
|
|||
void EnvironmentPerformanceWidget::doLoad()
|
||||
{
|
||||
ui->chkClearWhenEditorHidden->setChecked(pSettings->codeCompletion().clearWhenEditorHidden());
|
||||
#ifdef Q_OS_WIN
|
||||
MEMORYSTATUSEX statex;
|
||||
//#ifdef Q_OS_WIN
|
||||
// MEMORYSTATUSEX statex;
|
||||
|
||||
statex.dwLength = sizeof (statex);
|
||||
// statex.dwLength = sizeof (statex);
|
||||
|
||||
GlobalMemoryStatusEx (&statex);
|
||||
if (statex.ullTotalPhys < (long long int)2*1024*1024*1024) {
|
||||
ui->chkClearWhenEditorHidden->setEnabled(false);
|
||||
ui->chkClearWhenEditorHidden->setChecked(true);
|
||||
pSettings->codeCompletion().setClearWhenEditorHidden(true);
|
||||
pSettings->codeCompletion().save();
|
||||
}
|
||||
if (statex.ullTotalPhys < (long long int)1024*1024*1024) {
|
||||
ui->chkEditorsShareParser->setEnabled(false);
|
||||
ui->chkEditorsShareParser->setChecked(true);
|
||||
pSettings->codeCompletion().setShareParser(true);
|
||||
pSettings->codeCompletion().save();
|
||||
}
|
||||
#endif
|
||||
// GlobalMemoryStatusEx (&statex);
|
||||
// if (statex.ullTotalPhys < (long long int)2*1024*1024*1024) {
|
||||
// ui->chkClearWhenEditorHidden->setEnabled(false);
|
||||
// ui->chkClearWhenEditorHidden->setChecked(true);
|
||||
// pSettings->codeCompletion().setClearWhenEditorHidden(true);
|
||||
// pSettings->codeCompletion().save();
|
||||
// }
|
||||
// if (statex.ullTotalPhys < (long long int)1024*1024*1024) {
|
||||
// ui->chkEditorsShareParser->setEnabled(false);
|
||||
// ui->chkEditorsShareParser->setChecked(true);
|
||||
// pSettings->codeCompletion().setShareParser(true);
|
||||
// pSettings->codeCompletion().save();
|
||||
// }
|
||||
//#endif
|
||||
ui->chkEditorsShareParser->setChecked(pSettings->codeCompletion().shareParser());
|
||||
ui->spinMaxUndoMemory->setValue(pSettings->editor().undoMemoryUsage());
|
||||
}
|
||||
|
||||
void EnvironmentPerformanceWidget::doSave()
|
||||
|
@ -61,4 +62,6 @@ void EnvironmentPerformanceWidget::doSave()
|
|||
pSettings->codeCompletion().setShareParser(ui->chkEditorsShareParser->isChecked());
|
||||
|
||||
pSettings->codeCompletion().save();
|
||||
pSettings->editor().setUndoMemoryUsage(ui->spinMaxUndoMemory->value());
|
||||
pSettings->editor().save();
|
||||
}
|
||||
|
|
|
@ -13,25 +13,76 @@
|
|||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Reduce Memory Usage</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkEditorsShareParser">
|
||||
<property name="text">
|
||||
<string>Editors share one code parser</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkClearWhenEditorHidden">
|
||||
<property name="text">
|
||||
<string>Auto clear parsed symbols when editor hidden</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkEditorsShareParser">
|
||||
<property name="text">
|
||||
<string>Editors share one code parser</string>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Max undo memory for each editor:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinMaxUndoMemory">
|
||||
<property name="suffix">
|
||||
<string>MB</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -1819,6 +1819,14 @@
|
|||
<source>Editors share one code parser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Max undo memory for each editor:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MB</source>
|
||||
<translation type="unfinished">MB</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EnvironmentProgramsWidget</name>
|
||||
|
@ -4928,6 +4936,10 @@
|
|||
<source>Line: %1 Col: %2 Lines: %3</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Newline</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NewClassDialog</name>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1692,6 +1692,14 @@
|
|||
<source>Editors share one code parser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Max undo memory for each editor:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MB</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EnvironmentProgramsWidget</name>
|
||||
|
@ -4741,6 +4749,10 @@
|
|||
<source>Line: %1 Col: %2 Lines: %3</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Newline</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NewClassDialog</name>
|
||||
|
|
Loading…
Reference in New Issue