mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-25 13:38:44 +01:00
Fixing of icon loading.
This commit is contained in:
parent
66821e9695
commit
3319c7b78f
@ -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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
||||||
@ -104,9 +106,9 @@ QStringList IconThemeFactory::getInstalledIconThemes() {
|
|||||||
|
|
||||||
// Iterate all icon themes in this directory.
|
// Iterate all icon themes in this directory.
|
||||||
foreach (const QString &icon_theme_path, icon_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
|
foreach (const QString &icon_theme_path, icon_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
|
||||||
QDir::Readable | QDir::CaseSensitive |
|
QDir::Readable | QDir::CaseSensitive |
|
||||||
QDir::NoSymLinks,
|
QDir::NoSymLinks,
|
||||||
QDir::Time)) {
|
QDir::Time)) {
|
||||||
icon_theme_names << icon_theme_path;
|
icon_theme_names << icon_theme_path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user