diff options
author | Jonathan White <support@dmapps.us> | 2020-02-01 16:51:11 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2020-03-06 06:09:29 +0300 |
commit | e26063a872fc800d7dc9fc30ff10e3233420da38 (patch) | |
tree | 8b099246f699f8c1613b0e372fda21e7acb9a5e6 | |
parent | 557736ea5e4314162d7d716ac53fb6c74efce2a1 (diff) |
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.
-rw-r--r-- | src/core/Bootstrap.cpp | 6 | ||||
-rw-r--r-- | src/core/FilePath.cpp | 24 |
2 files changed, 2 insertions, 28 deletions
diff --git a/src/core/Bootstrap.cpp b/src/core/Bootstrap.cpp index 46aff92d5..c983253f0 100644 --- a/src/core/Bootstrap.cpp +++ b/src/core/Bootstrap.cpp @@ -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); diff --git a/src/core/FilePath.cpp b/src/core/FilePath.cpp index 95e7fc0c2..6ae52bd8f 100644 --- a/src/core/FilePath.cpp +++ b/src/core/FilePath.cpp @@ -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) |