Skip to content

Commit 08d2763

Browse files
committedDec 19, 2017
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.
1 parent 7c8f4c3 commit 08d2763

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed
 

‎src/core/qgsapplication.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,17 @@ QString QgsApplication::defaultThemePath()
432432
}
433433
QString QgsApplication::activeThemePath()
434434
{
435-
return userThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
435+
QString usersThemes = userThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
436+
QDir dir( usersThemes );
437+
if ( dir.exists() )
438+
{
439+
return usersThemes;
440+
}
441+
else
442+
{
443+
QString defaultThemes = defaultThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
444+
return defaultThemes;
445+
}
436446
}
437447

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

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

1301-
copyPath( defaultThemesFolder(), userThemesFolder() );
13021311
return true;
13031312
}
13041313

0 commit comments

Comments
 (0)
Please sign in to comment.