Fixing of icon loading.

This commit is contained in:
Martin Rotter 2013-12-20 16:46:36 +01:00
parent 66821e9695
commit 3319c7b78f
2 changed files with 10 additions and 8 deletions

View file

@ -73,7 +73,7 @@ QSettings::Status Settings::setupSettings() {
QDir(web_path).mkpath(web_path); QDir(web_path).mkpath(web_path);
QWebSettings::setIconDatabasePath(web_path); QWebSettings::setIconDatabasePath(web_path);
qDebug("Initializing settings in %s (portable way).", qDebug("Initializing settings in '%s' (portable way).",
qPrintable(QDir::toNativeSeparators(app_path))); qPrintable(QDir::toNativeSeparators(app_path)));
} }
else { else {
@ -91,7 +91,7 @@ QSettings::Status Settings::setupSettings() {
QDir(web_path).mkpath(web_path); QDir(web_path).mkpath(web_path);
QWebSettings::setIconDatabasePath(web_path); QWebSettings::setIconDatabasePath(web_path);
qDebug("Initializing settings in %s (non-portable way).", qDebug("Initializing settings in '%s' (non-portable way).",
qPrintable(QDir::toNativeSeparators(home_path_file))); qPrintable(QDir::toNativeSeparators(home_path_file)));
} }

View file

@ -14,7 +14,7 @@
QPointer<IconThemeFactory> IconThemeFactory::s_instance; QPointer<IconThemeFactory> IconThemeFactory::s_instance;
IconThemeFactory::IconThemeFactory(QObject *parent) IconThemeFactory::IconThemeFactory(QObject *parent)
: QObject(parent), m_currentIconTheme(APP_THEME_DEFAULT) { : QObject(parent) {
} }
IconThemeFactory::~IconThemeFactory() { IconThemeFactory::~IconThemeFactory() {
@ -32,7 +32,8 @@ IconThemeFactory *IconThemeFactory::getInstance() {
void IconThemeFactory::setupSearchPaths() { void IconThemeFactory::setupSearchPaths() {
QIcon::setThemeSearchPaths(QStringList() << APP_THEME_PATH); QIcon::setThemeSearchPaths(QStringList() << APP_THEME_PATH);
qDebug("Available icon theme paths: %s.", qDebug("Available icon theme paths: %s.",
qPrintable(QIcon::themeSearchPaths().join(", "))); qPrintable(QIcon::themeSearchPaths().replaceInStrings(QRegExp("^|$"),
"\'").join(", ")));
} }
QString IconThemeFactory::getCurrentIconTheme() { QString IconThemeFactory::getCurrentIconTheme() {
@ -74,7 +75,8 @@ void IconThemeFactory::loadCurrentIconTheme() {
// Display list of installed themes. // Display list of installed themes.
qDebug("Installed icon themes are: %s.", qDebug("Installed icon themes are: %s.",
qPrintable(installed_themes.join(", "))); qPrintable(QStringList(installed_themes).replaceInStrings(QRegExp("^|$"),
"\'").join(", ")));
if (installed_themes.contains(theme_name_from_settings)) { if (installed_themes.contains(theme_name_from_settings)) {
// Desired icon theme is installed and can be loaded. // Desired icon theme is installed and can be loaded.