move auto parentheses handling into the cpp editor

This commit is contained in:
mae
2009-09-17 12:36:40 +02:00
parent 71c46fbc54
commit 061865efa4
9 changed files with 157 additions and 132 deletions

View File

@@ -38,7 +38,6 @@
static const char *spacesForTabsKey = "SpacesForTabs";
static const char *smartBackspaceKey = "SmartBackspace";
static const char *autoIndentKey = "AutoIndent";
static const char *autoParenthesesKey= "AutoParentheses";
static const char *tabSizeKey = "TabSize";
static const char *indentSizeKey = "IndentSize";
static const char *tabKeyBehaviorKey = "TabKeyBehavior";
@@ -49,7 +48,6 @@ namespace TextEditor {
TabSettings::TabSettings() :
m_spacesForTabs(true),
m_autoIndent(true),
m_autoParentheses(true),
m_smartBackspace(false),
m_tabSize(8),
m_indentSize(4),
@@ -65,7 +63,6 @@ void TabSettings::toSettings(const QString &category, QSettings *s) const
s->beginGroup(group);
s->setValue(QLatin1String(spacesForTabsKey), m_spacesForTabs);
s->setValue(QLatin1String(autoIndentKey), m_autoIndent);
s->setValue(QLatin1String(autoParenthesesKey), m_autoParentheses);
s->setValue(QLatin1String(smartBackspaceKey), m_smartBackspace);
s->setValue(QLatin1String(tabSizeKey), m_tabSize);
s->setValue(QLatin1String(indentSizeKey), m_indentSize);
@@ -84,7 +81,6 @@ void TabSettings::fromSettings(const QString &category, const QSettings *s)
m_spacesForTabs = s->value(group + QLatin1String(spacesForTabsKey), m_spacesForTabs).toBool();
m_autoIndent = s->value(group + QLatin1String(autoIndentKey), m_autoIndent).toBool();
m_autoParentheses = s->value(group + QLatin1String(autoParenthesesKey), m_autoParentheses).toBool();
m_smartBackspace = s->value(group + QLatin1String(smartBackspaceKey), m_smartBackspace).toBool();
m_tabSize = s->value(group + QLatin1String(tabSizeKey), m_tabSize).toInt();
m_indentSize = s->value(group + QLatin1String(indentSizeKey), m_indentSize).toInt();
@@ -263,7 +259,6 @@ bool TabSettings::equals(const TabSettings &ts) const
{
return m_spacesForTabs == ts.m_spacesForTabs
&& m_autoIndent == ts.m_autoIndent
&& m_autoParentheses== ts.m_autoParentheses
&& m_smartBackspace == ts.m_smartBackspace
&& m_tabSize == ts.m_tabSize
&& m_indentSize == ts.m_indentSize