Commit 80474251 authored by Leandro Melo's avatar Leandro Melo
Browse files

Generic highlighter: Add Creator's default folder for definitions.

parent c374fefa
This is Creator's default directory for syntax highlight definitions.
You can download them through the Generic Highlighter options dialog.
......@@ -33,7 +33,8 @@ DATA_DIRS = \
qmldesigner \
qmlicons \
qml-type-descriptions \
qmljsdebugger
qmljsdebugger \
generic-highlighter
!isEmpty(copydata) {
......
......@@ -134,10 +134,15 @@ void HighlighterSettings::fromSettings(const QString &category, QSettings *s)
const QString &group = groupSpecifier(kGroupPostfix, category);
s->beginGroup(group);
m_definitionFilesPath = s->value(kDefinitionFilesPath, QString()).toString();
if (!s->contains(kDefinitionFilesPath))
m_definitionFilesPath = Core::ICore::instance()->resourcePath() +
QLatin1String("/generic-highlighter");
else
m_definitionFilesPath = s->value(kDefinitionFilesPath).toString();
if (!s->contains(kFallbackDefinitionFilesPath))
m_fallbackDefinitionFilesPath = findDefinitionsLocation();
else
m_fallbackDefinitionFilesPath = s->value(kFallbackDefinitionFilesPath,QString()).toString();
m_fallbackDefinitionFilesPath = s->value(kFallbackDefinitionFilesPath).toString();
m_alertWhenNoDefinition = s->value(kAlertWhenDefinitionIsNotFound, true).toBool();
m_useFallbackLocation = s->value(kUseFallbackLocation, true).toBool();
if (!s->contains(kIgnoredFilesPatterns))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment