Add DataPath::icon() parameter to only use local icons.

This commit is contained in:
Felix Geyer 2012-05-27 12:43:58 +02:00
parent fb499154bd
commit de95b6c347
2 changed files with 7 additions and 3 deletions

View File

@ -32,9 +32,13 @@ QIcon DataPath::applicationIcon()
return icon("apps", "keepassx");
}
QIcon DataPath::icon(const QString& category, const QString& name)
QIcon DataPath::icon(const QString& category, const QString& name, bool fromTheme)
{
QIcon icon = QIcon::fromTheme(name);
QIcon icon;
if (fromTheme) {
icon = QIcon::fromTheme(name);
}
if (icon.isNull()) {
QStringList pngSizes;

View File

@ -26,7 +26,7 @@ class DataPath
public:
QString path(const QString& name);
QIcon applicationIcon();
QIcon icon(const QString& category, const QString& name);
QIcon icon(const QString& category, const QString& name, bool fromTheme = true);
private:
DataPath();