Commit 6328ff00 authored by Leandro Melo's avatar Leandro Melo
Browse files

Generic highlighter: Default to use fallback only if pre-installed definitions were found.

parent 80474251
......@@ -139,12 +139,17 @@ void HighlighterSettings::fromSettings(const QString &category, QSettings *s)
QLatin1String("/generic-highlighter");
else
m_definitionFilesPath = s->value(kDefinitionFilesPath).toString();
if (!s->contains(kFallbackDefinitionFilesPath))
if (!s->contains(kFallbackDefinitionFilesPath)) {
m_fallbackDefinitionFilesPath = findDefinitionsLocation();
else
if (m_fallbackDefinitionFilesPath.isEmpty())
m_useFallbackLocation = false;
else
m_useFallbackLocation = true;
} else {
m_fallbackDefinitionFilesPath = s->value(kFallbackDefinitionFilesPath).toString();
m_useFallbackLocation = s->value(kUseFallbackLocation, true).toBool();
}
m_alertWhenNoDefinition = s->value(kAlertWhenDefinitionIsNotFound, true).toBool();
m_useFallbackLocation = s->value(kUseFallbackLocation, true).toBool();
if (!s->contains(kIgnoredFilesPatterns))
assignInitialIgnoredPatterns();
else
......
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