Skip to content
Permalink
Browse files

Don't copy default themes to user folder

It's just wasting space in the profile folder, and now with profiles you
will get extra copies which you don't need.  Also makes it hard for us
to update "core" themes if they are in the users profile folder.
  • Loading branch information
NathanW2 committed Dec 19, 2017
1 parent 7c8f4c3 commit 08d27630ea99ddadb41dac47c5fa10ef002b80e1
Showing with 12 additions and 3 deletions.
  1. +12 −3 src/core/qgsapplication.cpp
@@ -432,7 +432,17 @@ QString QgsApplication::defaultThemePath()
}
QString QgsApplication::activeThemePath()
{
return userThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
QString usersThemes = userThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
QDir dir( usersThemes );
if ( dir.exists() )
{
return usersThemes;
}
else
{
QString defaultThemes = defaultThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
return defaultThemes;
}
}

QString QgsApplication::appIconPath()
@@ -630,7 +640,7 @@ void QgsApplication::setUITheme( const QString &themeName )

QHash<QString, QString> QgsApplication::uiThemes()
{
QStringList paths = QStringList() << userThemesFolder();
QStringList paths = QStringList() << userThemesFolder() << defaultThemesFolder();
QHash<QString, QString> mapping;
mapping.insert( QStringLiteral( "default" ), QLatin1String( "" ) );
Q_FOREACH ( const QString &path, paths )
@@ -1298,7 +1308,6 @@ bool QgsApplication::createThemeFolder()
myDir.mkpath( folder );
}

copyPath( defaultThemesFolder(), userThemesFolder() );
return true;
}

0 comments on commit 08d2763

Please sign in to comment.
You can’t perform that action at this time.