diff options
author | mae <qt-info@nokia.com> | 2009-12-01 18:08:02 +0100 |
---|---|---|
committer | mae <qt-info@nokia.com> | 2009-12-01 18:08:47 +0100 |
commit | dc713d0684da686a07538c34933de6adb06b497a (patch) | |
tree | 2e75f921c8e9e4e03ed43431887e526a7b3de18b /src/plugins/texteditor/displaysettings.cpp | |
parent | 491527ab0605d15be389712df9ebcd650bdb6186 (diff) | |
download | qt-creator-dc713d0684da686a07538c34933de6adb06b497a.tar.gz |
added "auto-fold first comment"-option to the editor
Convenient when you don't want to see all the big license headers.
Diffstat (limited to 'src/plugins/texteditor/displaysettings.cpp')
-rw-r--r-- | src/plugins/texteditor/displaysettings.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/texteditor/displaysettings.cpp b/src/plugins/texteditor/displaysettings.cpp index aca646ccf9..8bbee972a5 100644 --- a/src/plugins/texteditor/displaysettings.cpp +++ b/src/plugins/texteditor/displaysettings.cpp @@ -45,6 +45,7 @@ static const char * const highlightBlocksKey = "HighlightBlocksKey"; static const char * const animateMatchingParenthesesKey= "AnimateMatchingParenthesesKey"; static const char * const mouseNavigationKey = "MouseNavigation"; static const char * const markTextChangesKey = "MarkTextChanges"; +static const char * const autoFoldFirstCommentKey= "AutoFoldFirstComment"; static const char * const groupPostfix = "DisplaySettings"; namespace TextEditor { @@ -60,7 +61,8 @@ DisplaySettings::DisplaySettings() : m_highlightBlocks(false), m_animateMatchingParentheses(true), m_mouseNavigation(true), - m_markTextChanges(true) + m_markTextChanges(true), + m_autoFoldFirstComment(true) { } @@ -81,6 +83,7 @@ void DisplaySettings::toSettings(const QString &category, QSettings *s) const s->setValue(QLatin1String(animateMatchingParenthesesKey), m_animateMatchingParentheses); s->setValue(QLatin1String(mouseNavigationKey), m_mouseNavigation); s->setValue(QLatin1String(markTextChangesKey), m_markTextChanges); + s->setValue(QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment); s->endGroup(); } @@ -104,6 +107,7 @@ void DisplaySettings::fromSettings(const QString &category, const QSettings *s) m_animateMatchingParentheses = s->value(group + QLatin1String(animateMatchingParenthesesKey), m_animateMatchingParentheses).toBool(); m_mouseNavigation = s->value(group + QLatin1String(mouseNavigationKey), m_mouseNavigation).toBool(); m_markTextChanges = s->value(group + QLatin1String(markTextChangesKey), m_markTextChanges).toBool(); + m_autoFoldFirstComment = s->value(group + QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment).toBool(); } bool DisplaySettings::equals(const DisplaySettings &ds) const @@ -119,6 +123,7 @@ bool DisplaySettings::equals(const DisplaySettings &ds) const && m_animateMatchingParentheses == ds.m_animateMatchingParentheses && m_mouseNavigation == ds.m_mouseNavigation && m_markTextChanges == ds.m_markTextChanges + && m_autoFoldFirstComment== ds.m_autoFoldFirstComment ; } |