Fix compile errors when building snap package

* System icons are no longer used eliminating the need to differentiate behavior for the snap package on Linux.
This commit is contained in:
Jonathan White 2020-02-01 08:51:11 -05:00
parent 557736ea5e
commit e26063a872
2 changed files with 2 additions and 28 deletions

View File

@ -85,12 +85,6 @@ namespace Bootstrap
bootstrap();
MessageBox::initializeButtonDefs();
#ifdef KEEPASSXC_DIST_SNAP
// snap: force fallback theme to avoid using system theme (gtk integration)
// with missing actions just like on Windows and macOS
QIcon::setThemeSearchPaths(QStringList() << ":/icons");
#endif
#ifdef Q_OS_MACOS
// Don't show menu icons on OSX
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);

View File

@ -97,42 +97,22 @@ QString FilePath::wordlistPath(const QString& name)
QIcon FilePath::applicationIcon()
{
#ifdef KEEPASSXC_DIST_SNAP
return icon("apps", "keepassxc", false);
#else
return icon("apps", "keepassxc", false);
#endif
}
QIcon FilePath::trayIcon()
{
bool darkIcon = useDarkIcon();
#ifdef KEEPASSXC_DIST_SNAP
return (darkIcon) ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc", false);
#else
return (darkIcon) ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc", false);
#endif
return useDarkIcon() ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc", false);
}
QIcon FilePath::trayIconLocked()
{
#ifdef KEEPASSXC_DIST_SNAP
return icon("apps", "keepassxc-locked", false);
#else
return icon("apps", "keepassxc-locked", false);
#endif
}
QIcon FilePath::trayIconUnlocked()
{
bool darkIcon = useDarkIcon();
#ifdef KEEPASSXC_DIST_SNAP
return darkIcon ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false);
#else
return darkIcon ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false);
#endif
return useDarkIcon() ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false);
}
QIcon FilePath::icon(const QString& category, const QString& name, bool recolor)