mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-02 03:26:14 -04:00
Add DataPath::icon() parameter to only use local icons.
This commit is contained in:
parent
fb499154bd
commit
de95b6c347
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue