forked from qt-creator/qt-creator
CppEditor: Make CppEditorOutline independent of CppEditor plugin
Change-Id: I1cafcd8daf93ffc2f672bf7e2ba5d1c8ea5e8652 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
static const char idKey[] = "CppGlobal";
|
||||
|
||||
using namespace Core;
|
||||
using namespace CppTools;
|
||||
using namespace CppTools::Internal;
|
||||
using namespace TextEditor;
|
||||
@@ -262,3 +263,21 @@ void CppToolsSettings::setCommentsSettings(const CommentsSettings &commentsSetti
|
||||
d->m_commentsSettings.toSettings(QLatin1String(Constants::CPPTOOLS_SETTINGSGROUP),
|
||||
Core::ICore::settings());
|
||||
}
|
||||
|
||||
static QString sortEditorDocumentOutlineKey()
|
||||
{
|
||||
return QLatin1String(CppTools::Constants::CPPTOOLS_SETTINGSGROUP)
|
||||
+ QLatin1Char('/')
|
||||
+ QLatin1String(CppTools::Constants::CPPTOOLS_SORT_EDITOR_DOCUMENT_OUTLINE);
|
||||
}
|
||||
|
||||
bool CppToolsSettings::sortedEditorDocumentOutline() const
|
||||
{
|
||||
return ICore::settings()->value(sortEditorDocumentOutlineKey(), true).toBool();
|
||||
}
|
||||
|
||||
void CppToolsSettings::setSortedEditorDocumentOutline(bool sorted)
|
||||
{
|
||||
ICore::settings()->setValue(sortEditorDocumentOutlineKey(), sorted);
|
||||
emit editorDocumentOutlineSortingChanged(sorted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user