Changeset View
Changeset View
Standalone View
Standalone View
src/lib/repository.cpp
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | |||||
117 | { | 117 | { | ||
118 | if (t == DarkTheme) | 118 | if (t == DarkTheme) | ||
119 | return theme(QLatin1String("Breeze Dark")); | 119 | return theme(QLatin1String("Breeze Dark")); | ||
120 | return theme(QLatin1String("Default")); | 120 | return theme(QLatin1String("Default")); | ||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | void RepositoryPrivate::load(Repository *repo) | 123 | void RepositoryPrivate::load(Repository *repo) | ||
124 | { | 124 | { | ||
125 | // always add invalid default "None" highlighting | ||||
126 | addDefinition(Definition()); | ||||
127 | | ||||
125 | auto dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("org.kde.syntax-highlighting/syntax"), QStandardPaths::LocateDirectory); | 128 | auto dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("org.kde.syntax-highlighting/syntax"), QStandardPaths::LocateDirectory); | ||
126 | foreach (const auto &dir, dirs) | 129 | foreach (const auto &dir, dirs) | ||
127 | loadSyntaxFolder(repo, dir); | 130 | loadSyntaxFolder(repo, dir); | ||
128 | // backward compatibility with Kate | 131 | // backward compatibility with Kate | ||
129 | dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("katepart5/syntax"), QStandardPaths::LocateDirectory); | 132 | dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("katepart5/syntax"), QStandardPaths::LocateDirectory); | ||
130 | foreach (const auto &dir, dirs) | 133 | foreach (const auto &dir, dirs) | ||
131 | loadSyntaxFolder(repo, dir); | 134 | loadSyntaxFolder(repo, dir); | ||
132 | 135 | | |||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |