Add general keep line breaks setting to build
This commit is contained in:
@@ -82,6 +82,7 @@ SETTINGS_TEMPLATE = {
|
||||
"format.justifyText": (bool, False),
|
||||
"format.stripUnicode": (bool, False),
|
||||
"format.replaceTabs": (bool, False),
|
||||
"format.keepBreaks": (bool, True),
|
||||
"format.firstLineIndent": (bool, False),
|
||||
"format.firstIndentWidth": (float, 1.4),
|
||||
"format.indentFirstPar": (bool, False),
|
||||
@@ -132,6 +133,7 @@ SETTINGS_LABELS = {
|
||||
"format.justifyText": QT_TRANSLATE_NOOP("Builds", "Justify Text Margins"),
|
||||
"format.stripUnicode": QT_TRANSLATE_NOOP("Builds", "Replace Unicode Characters"),
|
||||
"format.replaceTabs": QT_TRANSLATE_NOOP("Builds", "Replace Tabs with Spaces"),
|
||||
"format.keepBreaks": QT_TRANSLATE_NOOP("Builds", "Preserve Hard Line Breaks"),
|
||||
|
||||
"format.grpParIndent": QT_TRANSLATE_NOOP("Builds", "First Line Indent"),
|
||||
"format.firstLineIndent": QT_TRANSLATE_NOOP("Builds", "Enable Indent"),
|
||||
|
||||
@@ -1098,10 +1098,12 @@ class _FormatTab(NScrollableForm):
|
||||
self.justifyText = NSwitch(self, height=iPx)
|
||||
self.stripUnicode = NSwitch(self, height=iPx)
|
||||
self.replaceTabs = NSwitch(self, height=iPx)
|
||||
self.keepBreaks = NSwitch(self, height=iPx)
|
||||
|
||||
self.addRow(self._build.getLabel("format.justifyText"), self.justifyText)
|
||||
self.addRow(self._build.getLabel("format.stripUnicode"), self.stripUnicode)
|
||||
self.addRow(self._build.getLabel("format.replaceTabs"), self.replaceTabs)
|
||||
self.addRow(self._build.getLabel("format.keepBreaks"), self.keepBreaks)
|
||||
|
||||
# First Line Indent
|
||||
# =================
|
||||
@@ -1184,6 +1186,7 @@ class _FormatTab(NScrollableForm):
|
||||
self.justifyText.setChecked(self._build.getBool("format.justifyText"))
|
||||
self.stripUnicode.setChecked(self._build.getBool("format.stripUnicode"))
|
||||
self.replaceTabs.setChecked(self._build.getBool("format.replaceTabs"))
|
||||
self.keepBreaks.setChecked(self._build.getBool("format.keepBreaks"))
|
||||
|
||||
self.firstIndent.setChecked(self._build.getBool("format.firstLineIndent"))
|
||||
self.indentWidth.setValue(self._build.getFloat("format.firstIndentWidth"))
|
||||
@@ -1223,6 +1226,7 @@ class _FormatTab(NScrollableForm):
|
||||
self._build.setValue("format.justifyText", self.justifyText.isChecked())
|
||||
self._build.setValue("format.stripUnicode", self.stripUnicode.isChecked())
|
||||
self._build.setValue("format.replaceTabs", self.replaceTabs.isChecked())
|
||||
self._build.setValue("format.keepBreaks", self.keepBreaks.isChecked())
|
||||
|
||||
self._build.setValue("format.firstLineIndent", self.firstIndent.isChecked())
|
||||
self._build.setValue("format.firstIndentWidth", self.indentWidth.value())
|
||||
|
||||
Reference in New Issue
Block a user