ColorSchemeManager::loadCustomColorScheme(const QString& path).

This commit is contained in:
0xd34df00d
2014-05-21 00:08:13 +04:00
parent 5042c7afc5
commit 27e7860fd9
2 changed files with 24 additions and 0 deletions
+11
View File
@@ -639,6 +639,17 @@ void ColorSchemeManager::addColorScheme(ColorScheme* scheme)
scheme->write(config);
}
#endif
bool ColorSchemeManager::loadCustomColorScheme(const QString& path)
{
if (path.endsWith(QLatin1String(".colorscheme")))
return loadColorScheme(path);
else if (path.endsWith(QLatin1String(".schema")))
return loadKDE3ColorScheme(path);
else
return false;
}
bool ColorSchemeManager::loadColorScheme(const QString& filePath)
{
if ( !filePath.endsWith(QLatin1String(".colorscheme")) || !QFile::exists(filePath) )