summaryrefslogtreecommitdiffstats
path: root/src/IndentHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/IndentHandler.cpp')
-rw-r--r--src/IndentHandler.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/IndentHandler.cpp b/src/IndentHandler.cpp
index f80b7c6..6056f37 100644
--- a/src/IndentHandler.cpp
+++ b/src/IndentHandler.cpp
@@ -1088,12 +1088,18 @@ void IndentHandler::readIndentIniFile(const TQString &iniFilePath)
paramBoolean.checkBox = chkBox;
TQStringList trueFalseStrings = TQStringList::split("|",
m_indenterSettings->value(indenterParameter + "/TrueFalse").toString());
- paramBoolean.trueString = trueFalseStrings[0];
- paramBoolean.falseString = trueFalseStrings[1];
+ if (trueFalseStrings.count() > 0)
+ {
+ paramBoolean.trueString = trueFalseStrings[0];
+ paramBoolean.falseString = trueFalseStrings[1];
+ }
TQStringList trueFalseRegexStrings = TQStringList::split("|",
m_indenterSettings->value(indenterParameter + "/TrueFalseRegex").toString());
- paramBoolean.trueRegexString = trueFalseRegexStrings[0];
- paramBoolean.falseRegexString = trueFalseRegexStrings[1];
+ if (trueFalseRegexStrings.count() > 0)
+ {
+ paramBoolean.trueRegexString = trueFalseRegexStrings[0];
+ paramBoolean.falseRegexString = trueFalseRegexStrings[1];
+ }
paramBoolean.checkBox->setChecked(m_indenterSettings->value(paramBoolean.paramName +
"/ValueDefault").toBool());
m_paramBooleans.append(paramBoolean);