Skip to content

Commit

Permalink
Don't copy default themes to user folder
Browse files Browse the repository at this point in the history
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 08d2763
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/core/qgsapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -1298,7 +1308,6 @@ bool QgsApplication::createThemeFolder()
myDir.mkpath( folder );
}

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

Expand Down

0 comments on commit 08d2763

Please sign in to comment.