diff --git a/.gitignore b/.gitignore index b91b15acf..61dfb90d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ CMakeLists.txt.* build*/ +cmake-build-*/ release*/ .idea/ *.iml diff --git a/AppImage-Recipe.sh b/AppImage-Recipe.sh index 0472cccdf..16024d226 100755 --- a/AppImage-Recipe.sh +++ b/AppImage-Recipe.sh @@ -75,7 +75,7 @@ cat << EOF > ./usr/bin/keepassxc_env #!/usr/bin/env bash #export QT_QPA_PLATFORMTHEME=gtk2 export LD_LIBRARY_PATH="..$(dirname ${QT_PLUGIN_PATH})/lib:\${LD_LIBRARY_PATH}" -export QT_PLUGIN_PATH="..${QT_PLUGIN_PATH}" +export QT_PLUGIN_PATH="..${QT_PLUGIN_PATH}:\${KPXC_QT_PLUGIN_PATH}" # unset XDG_DATA_DIRS to make tray icon work in Ubuntu Unity # see https://github.com/probonopd/AppImageKit/issues/351 diff --git a/CMakeLists.txt b/CMakeLists.txt index 106cc1c13..5ec37473c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,17 @@ set(KEEPASSXC_VERSION_MINOR "2") set(KEEPASSXC_VERSION_PATCH "1") set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}") -# Special flag for snap builds -set(KEEPASSXC_SNAP_BUILD OFF CACHE BOOL "Set whether this is a build for snap or not") +# Distribution info +set(KEEPASSXC_DIST True) +set(KEEPASSXC_DIST_TYPE "Other" CACHE STRING "KeePassXC Distribution type") +set_property(CACHE KEEPASSXC_DIST_TYPE PROPERTY STRINGS Snap AppImage Other) +if(KEEPASSXC_DIST_TYPE STREQUAL "Snap") + set(KEEPASSXC_DIST_SNAP True) +elseif(KEEPASSXC_DIST_TYPE STREQUAL "AppImage") + set(KEEPASSXC_DIST_APPIMAGE True) +elseif(KEEPASSXC_DIST_TYPE STREQUAL "Other") + unset(KEEPASSXC_DIST) +endif() if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_COMPILER_IS_CLANG 1) diff --git a/Dockerfile b/Dockerfile index 7da658219..60ba4ff57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,10 +23,11 @@ RUN set -x \ RUN set -x \ && add-apt-repository ppa:george-edison55/cmake-3.x +ENV QT_PPA=qt591 ENV QT_VERSION=qt59 RUN set -x \ - && add-apt-repository --yes ppa:beineri/opt-${QT_VERSION}-trusty + && add-apt-repository --yes ppa:beineri/opt-${QT_PPA}-trusty RUN set -x \ diff --git a/release-tool b/release-tool index 680cdca2c..a1d23b405 100755 --- a/release-tool +++ b/release-tool @@ -257,19 +257,18 @@ checkChangeLog() { grep -qPzo "${RELEASE_NAME} \(\d{4}-\d{2}-\d{2}\)\n=+\n" CHANGELOG if [ $? -ne 0 ]; then - exitError "CHANGELOG does not contain any information about the '${RELEASE_NAME}' release!" + exitError "'CHANGELOG' has not been updated to the '${RELEASE_NAME}' release!" fi } -checkTransifexCommandExists() { - command -v tx > /dev/null - if [ 0 -ne $? ]; then - exitError "Transifex tool 'tx' not installed! Please install it using 'pip install transifex-client'" +checkAppStreamInfo() { + if [ ! -f share/linux/org.keepassxc.appdata.xml ]; then + exitError "No AppStream info file found!" fi - command -v lupdate-qt5 > /dev/null - if [ 0 -ne $? ]; then - exitError "Qt Linguist tool (lupdate-qt5) is not installed! Please install using 'apt install qttools5-dev-tools'" + grep -qPzo "" share/linux/org.keepassxc.appdata.xml + if [ $? -ne 0 ]; then + exitError "'share/linux/org.keepassxc.appdata.xml' has not been updated to the '${RELEASE_NAME}' release!" fi } @@ -281,7 +280,24 @@ checkSnapcraft() { grep -qPzo "version: ${RELEASE_NAME}" snapcraft.yaml if [ $? -ne 0 ]; then - exitError "snapcraft.yaml has not been updated to the '${RELEASE_NAME}' release!" + exitError "'snapcraft.yaml' has not been updated to the '${RELEASE_NAME}' release!" + fi +} + +checkTransifexCommandExists() { + command -v tx > /dev/null + if [ 0 -ne $? ]; then + exitError "Transifex tool 'tx' not installed! Please install it using 'pip install transifex-client'" + fi +} + +checkQt5LUpdateExists() { + command -v lupdate > /dev/null + if [ 0 -eq $? ] && ! $(lupdate -version | grep -q "lupdate version 5\."); then + command -v lupdate-qt5 > /dev/null + if [ 0 -ne $? ]; then + exitError "Qt Linguist tool (lupdate-qt5) is not installed! Please install using 'apt install qttools5-dev-tools'" + fi fi } @@ -296,6 +312,7 @@ performChecks() { logInfo "Validating toolset and repository..." checkTransifexCommandExists + checkQt5LUpdateExists checkGitRepository checkReleaseDoesNotExist checkWorkingTreeClean @@ -309,6 +326,7 @@ performChecks() { checkVersionInCMake checkChangeLog + checkAppStreamInfo checkSnapcraft logInfo "\e[1m\e[32mAll checks passed!\e[0m" @@ -598,7 +616,8 @@ build() { # Building on Linux without Docker container logInfo "Configuring build..." cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=Off $CMAKE_OPTIONS \ - -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" "$SRC_DIR" + -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ + -DKEEPASSXC_DIST_TYPE=AppImage "$SRC_DIR" logInfo "Compiling sources..." make $MAKE_OPTIONS @@ -615,7 +634,7 @@ build() { logInfo "Launching Docker container to compile sources..." docker run --name "$DOCKER_CONTAINER_NAME" --rm \ - --cap-add SYS_ADMIN --device /dev/fuse \ + --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse \ -e "CC=${CC}" -e "CXX=${CXX}" \ -v "$(realpath "$SRC_DIR"):/keepassxc/src:ro" \ -v "$(realpath "$OUTPUT_DIR"):/keepassxc/out:rw" \ diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index a609add79..6323ece88 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -30,7 +30,8 @@ if(UNIX AND NOT APPLE) install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor FILES_MATCHING PATTERN "application-x-keepassxc.png" PATTERN "application-x-keepassxc.svgz" PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE) - install(FILES linux/keepassxc.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) + install(FILES linux/org.keepassxc.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) + install(FILES linux/org.keepassxc.appdata.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) install(FILES linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages) endif(UNIX AND NOT APPLE) diff --git a/share/linux/keepassxc.xml b/share/linux/keepassxc.xml index 757047d2b..b26b4db25 100644 --- a/share/linux/keepassxc.xml +++ b/share/linux/keepassxc.xml @@ -1,7 +1,7 @@ - KeePass 2 database + KeePass 2 Database diff --git a/share/linux/org.keepassxc.appdata.xml b/share/linux/org.keepassxc.appdata.xml new file mode 100644 index 000000000..3a5eb2c5a --- /dev/null +++ b/share/linux/org.keepassxc.appdata.xml @@ -0,0 +1,200 @@ + + + + org.keepassxc + KeePassXC + CC-BY-3.0 + GPL-3.0+ + keepassxc + https://keepassxc.org + + application/x-keepass2 + + Community-driven port of the Windows application “KeePass Password Safe” + +

+ KeePassXC is an application for people with extremely high demands on secure + personal data management. It has a light interface, is cross-platform and + published under the terms of the GNU General Public License. +

+
+ + org.keepassxc.desktop + + + + https://keepassxc.org/images/screenshots/linux/screen_001.png + + + https://keepassxc.org/images/screenshots/linux/screen_002.png + + + https://keepassxc.org/images/screenshots/linux/screen_003.png + + + https://keepassxc.org/images/screenshots/linux/screen_004.png + + + https://keepassxc.org/images/screenshots/linux/screen_005.png + + + https://keepassxc.org/images/screenshots/linux/screen_006.png + + + https://keepassxc.org/images/screenshots/linux/screen_007.png + + + https://keepassxc.org/images/screenshots/linux/screen_008.png + + + https://keepassxc.org/images/screenshots/linux/screen_009.png + + + https://keepassxc.org/images/screenshots/linux/screen_010.png + + + https://keepassxc.org/images/screenshots/linux/screen_011.png + + + https://keepassxc.org/images/screenshots/linux/screen_012.png + + + https://keepassxc.org/images/screenshots/linux/screen_013.png + + + https://keepassxc.org/images/screenshots/linux/screen_014.png + + + + + + +
    +
  • Corrected multiple snap issues [#934, #1011]
  • +
  • Corrected multiple custom icon issues [#708, #719, #994]
  • +
  • Corrected multiple Yubikey issues [#880]
  • +
  • Fixed single instance preventing load on occasion [#997]
  • +
  • Keep entry history when merging databases [#970]
  • +
  • Prevent data loss if passwords were mismatched [#1007]
  • +
  • Fixed crash after merge [#941]
  • +
  • Added configurable auto-type default delay [#703]
  • +
  • Unlock database dialog window comes to front [#663]
  • +
  • Translation and compiling fixes
  • +
+
+
+ + +
    +
  • Added YubiKey 2FA integration for unlocking databases [#127]
  • +
  • Added TOTP support [#519]
  • +
  • Added CSV import tool [#146, #490]
  • +
  • Added KeePassXC CLI tool [#254]
  • +
  • Added diceware password generator [#373]
  • +
  • Added support for entry references [#370, #378]
  • +
  • Added support for Twofish encryption [#167]
  • +
  • Enabled DEP and ASLR for in-memory protection [#371]
  • +
  • Enabled single instance mode [#510]
  • +
  • Enabled portable mode [#645]
  • +
  • Enabled database lock on screensaver and session lock [#545]
  • +
  • Redesigned welcome screen with common features and recent databases [#292]
  • +
  • Multiple updates to search behavior [#168, #213, #374, #471, #603, #654]
  • +
  • Added auto-type fields {CLEARFIELD}, {SPACE}, {{}, {}} [#267, #427, #480]
  • +
  • Fixed auto-type errors on Linux [#550]
  • +
  • Prompt user prior to executing a cmd:// URL [#235]
  • +
  • Entry attributes can be protected (hidden) [#220]
  • +
  • Added extended ascii to password generator [#538]
  • +
  • Added new database icon to toolbar [#289]
  • +
  • Added context menu entry to empty recycle bin in databases [#520]
  • +
  • Added "apply" button to entry and group edit windows [#624]
  • +
  • Added macOS tray icon and enabled minimize on close [#583]
  • +
  • Fixed issues with unclean shutdowns [#170, #580]
  • +
  • Changed keyboard shortcut to create new database to CTRL+SHIFT+N [#515]
  • +
  • Compare window title to entry URLs [#556]
  • +
  • Implemented inline error messages [#162]
  • +
  • Ignore group expansion and other minor changes when making database "dirty" [#464]
  • +
  • Updated license and copyright information on souce files [#632]
  • +
  • Added contributors list to about dialog [#629]
  • +
+
+
+ + +
    +
  • Bumped KeePassHTTP version to 1.8.4.2
  • +
  • KeePassHTTP confirmation window comes to foreground [#466]
  • +
+
+
+ + +
    +
  • Fix possible overflow in zxcvbn library [#363]
  • +
  • Revert HiDPI setting to avoid problems on laptop screens [#332]
  • +
  • Set file meta properties in Windows executable [#330]
  • +
  • Suppress error message when auto-reloading a locked database [#345]
  • +
  • Improve usability of question dialog when database is already locked by a different instance [#346]
  • +
  • Fix compiler warnings in QHttp library [#351]
  • +
  • Use unified toolbar on Mac OS X [#361]
  • +
  • Fix an issue on X11 where the main window would be raised instead of closed on Alt+F4 [#362]
  • +
+
+
+ + +
    +
  • Ask for save location when creating a new database [#302]
  • +
  • Remove Libmicrohttpd dependency to clean up the code and ensure better OS X compatibility [#317, #265]
  • +
  • Prevent Qt from degrading Wifi network performance on certain platforms [#318]
  • +
  • Visually refine user interface on OS X and other platforms [#299]
  • +
  • Remove unusable tray icon setting on OS X [#293]
  • +
  • Fix compositing glitches on Ubuntu and prevent flashing when minimizing to the tray at startup [#307]
  • +
  • Fix AppImage tray icon on Ubuntu [#277, #273]
  • +
  • Fix global menu disappearing after restoring KeePassXC from the tray on Ubuntu [#276]
  • +
  • Fix result order in entry search [#320]
  • +
  • Enable HiDPI scaling on supported platforms [#315]
  • +
  • Remove empty directories from installation target [#282]
  • +
+
+
+ + +
    +
  • Enabled HTTP plugin build; plugin is disabled by default and limited to localhost [#147]
  • +
  • Escape HTML in dialog boxes [#247]
  • +
  • Corrected crashes in favicon download and password generator [#233, #226]
  • +
  • Increase font size of password meter [#228]
  • +
  • Fixed compatibility with Qt 5.8 [#211]
  • +
  • Use consistent button heights in password generator [#229]
  • +
+
+
+ + +
    +
  • Show unlock dialog when using autotype on a closed database [#10, #89]
  • +
  • Show different tray icon when database is locked [#37, #46]
  • +
  • Support autotype on Windows and OS X [#42, #60, #63]
  • +
  • Add delay feature to autotype [#76, #77]
  • +
  • Add password strength meter [#84, #92]
  • +
  • Add option for automatically locking the database when minimizing the window [#57]
  • +
  • Add feature to download favicons and use them as entry icons [#30]
  • +
  • Automatically reload and merge database when the file changed on disk [#22, #33, #93]
  • +
  • Add tool for merging two databases [#22, #47, #143]
  • +
  • Add --pw-stdin commandline option to unlock the database by providing a password on STDIN [#54]
  • +
  • Add utility script for reading the database password from KWallet [#55]
  • +
  • Fix some KeePassHTTP settings not being remembered [#34, #65]
  • +
  • Make search box persistent [#15, #67, #157]
  • +
  • Enhance search feature by scoping the search to selected group [#16, #118]
  • +
  • Improve interaction between search field and entry list [#131, #141]
  • +
  • Add stand-alone password-generator [#18, #92]
  • +
  • Don't require password repetition when password is visible [#27, #92]
  • +
  • Add support for entry attributes in autotype sequences [#107]
  • +
  • Always focus password field when opening the database unlock widget [#116, #117]
  • +
  • Fix compilation errors on various platforms [#53, #126, #130]
  • +
  • Restructure and improve kdbx-extract utility [#160]
  • +
+
+
+
+
diff --git a/share/linux/keepassxc.desktop b/share/linux/org.keepassxc.desktop similarity index 62% rename from share/linux/keepassxc.desktop rename to share/linux/org.keepassxc.desktop index 1e72c4f84..fd94fdcd5 100644 --- a/share/linux/keepassxc.desktop +++ b/share/linux/org.keepassxc.desktop @@ -1,13 +1,16 @@ [Desktop Entry] Name=KeePassXC -GenericName=Community Password Manager +GenericName=Password Manager GenericName[de]=Passwortverwaltung GenericName[es]=Gestor de contraseñas GenericName[fr]=Gestionnaire de mot de passe GenericName[ru]=менеджер паролей +Comment=Community-driven port of the Windows application “KeePass Password Safe” Exec=keepassxc %f +TryExec=keepassxc Icon=keepassxc Terminal=false Type=Application -Categories=Qt;Utility; +Version=1.0 +Categories=Utility;Security;Qt MimeType=application/x-keepass2; diff --git a/snapcraft.yaml b/snapcraft.yaml index c73b53289..a3e4004c3 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1,18 +1,18 @@ name: keepassxc version: 2.2.1 grade: stable -summary: community driven port of the windows application “Keepass Password Safe” +summary: Community-driven port of the Windows application “KeePass Password Safe” description: | KeePassXC is an application for people with extremely high demands on secure - personal data management. It has a light interface, is cross platform and - is published under the terms of the GNU General Public License. + personal data management. It has a light interface, is cross-platform and + published under the terms of the GNU General Public License. confinement: strict apps: keepassxc: command: desktop-launch keepassxc plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb] - desktop: usr/share/applications/keepassxc.desktop + desktop: usr/share/applications/org.keepassxc.desktop cli: command: keepassxc-cli plugs: [gsettings, home, removable-media, raw-usb] @@ -24,7 +24,7 @@ parts: configflags: - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=/usr - - -DKEEPASSXC_SNAP_BUILD=ON + - -DKEEPASSXC_DIST_TYPE=Snap - -DWITH_TESTS=OFF - -DWITH_XC_AUTOTYPE=ON - -DWITH_XC_HTTP=ON @@ -42,7 +42,7 @@ parts: - libyubikey-dev - libykpers-1-dev install: | - sed -i 's|Icon=keepassxc|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/keepassxc.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/keepassxc.desktop + sed -i 's|Icon=keepassxc|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/keepassxc.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/org.keepassxc.desktop after: [desktop-qt5] # Redefine desktop-qt5 stage packages to work with Ubuntu 17.04 diff --git a/src/config-keepassx.h.cmake b/src/config-keepassx.h.cmake index f89d447c7..e06c69382 100644 --- a/src/config-keepassx.h.cmake +++ b/src/config-keepassx.h.cmake @@ -16,7 +16,10 @@ #cmakedefine WITH_XC_AUTOTYPE #cmakedefine WITH_XC_YUBIKEY -#cmakedefine KEEPASSXC_SNAP_BUILD +#cmakedefine KEEPASSXC_DIST +#cmakedefine KEEPASSXC_DIST_TYPE "@KEEPASSXC_DIST_TYPE@" +#cmakedefine KEEPASSXC_DIST_SNAP +#cmakedefine KEEPASSXC_DIST_APPIMAGE #cmakedefine HAVE_PR_SET_DUMPABLE 1 #cmakedefine HAVE_RLIMIT_CORE 1 diff --git a/src/core/Database.cpp b/src/core/Database.cpp index 924eec067..3913f8090 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -260,6 +260,25 @@ bool Database::hasKey() const return m_data.hasKey; } +bool Database::transformKeyWithSeed(const QByteArray& transformSeed) +{ + Q_ASSERT(hasKey()); + + bool ok; + QString errorString; + + QByteArray transformedMasterKey = + m_data.key.transform(transformSeed, transformRounds(), &ok, &errorString); + if (!ok) { + return false; + } + + m_data.transformSeed = transformSeed; + m_data.transformedMasterKey = transformedMasterKey; + + return true; +} + bool Database::verifyKey(const CompositeKey& key) const { Q_ASSERT(hasKey()); diff --git a/src/core/Database.h b/src/core/Database.h index 2ab556a07..26b150253 100644 --- a/src/core/Database.h +++ b/src/core/Database.h @@ -106,6 +106,7 @@ public: */ bool setKey(const CompositeKey& key); bool hasKey() const; + bool transformKeyWithSeed(const QByteArray& transformSeed); bool verifyKey(const CompositeKey& key) const; void recycleEntry(Entry* entry); void recycleGroup(Group* group); diff --git a/src/core/FilePath.cpp b/src/core/FilePath.cpp index 90311b40b..b5c9d1020 100644 --- a/src/core/FilePath.cpp +++ b/src/core/FilePath.cpp @@ -91,7 +91,7 @@ QString FilePath::pluginPath(const QString& name) QIcon FilePath::applicationIcon() { -#ifdef KEEPASSXC_SNAP_BUILD +#ifdef KEEPASSXC_DIST_SNAP return icon("apps", "keepassxc", false); #else return icon("apps", "keepassxc"); @@ -100,7 +100,7 @@ QIcon FilePath::applicationIcon() QIcon FilePath::trayIconLocked() { -#ifdef KEEPASSXC_SNAP_BUILD +#ifdef KEEPASSXC_DIST_SNAP return icon("apps", "keepassxc-locked", false); #else return icon("apps", "keepassxc-locked"); @@ -109,7 +109,7 @@ QIcon FilePath::trayIconLocked() QIcon FilePath::trayIconUnlocked() { -#ifdef KEEPASSXC_SNAP_BUILD +#ifdef KEEPASSXC_DIST_SNAP return icon("apps", "keepassxc-unlocked", false); #else return icon("apps", "keepassxc-unlocked"); diff --git a/src/format/KeePass2Writer.cpp b/src/format/KeePass2Writer.cpp index d63151c84..f8f60f11e 100644 --- a/src/format/KeePass2Writer.cpp +++ b/src/format/KeePass2Writer.cpp @@ -45,6 +45,7 @@ void KeePass2Writer::writeDatabase(QIODevice* device, Database* db) m_error = false; m_errorStr.clear(); + QByteArray transformSeed = randomGen()->randomArray(32); QByteArray masterSeed = randomGen()->randomArray(32); QByteArray encryptionIV = randomGen()->randomArray(16); QByteArray protectedStreamKey = randomGen()->randomArray(32); @@ -52,7 +53,12 @@ void KeePass2Writer::writeDatabase(QIODevice* device, Database* db) QByteArray endOfHeader = "\r\n\r\n"; if (db->challengeMasterSeed(masterSeed) == false) { - raiseError("Unable to issue challenge-response."); + raiseError(tr("Unable to issue challenge-response.")); + return; + } + + if (!db->transformKeyWithSeed(transformSeed)) { + raiseError(tr("Unable to calculate master key")); return; } diff --git a/src/format/KeePass2Writer.h b/src/format/KeePass2Writer.h index 1b3436dc6..184aa1a71 100644 --- a/src/format/KeePass2Writer.h +++ b/src/format/KeePass2Writer.h @@ -18,6 +18,8 @@ #ifndef KEEPASSX_KEEPASS2WRITER_H #define KEEPASSX_KEEPASS2WRITER_H +#include + #include "format/KeePass2.h" #include "keys/CompositeKey.h" @@ -26,6 +28,8 @@ class QIODevice; class KeePass2Writer { + Q_DECLARE_TR_FUNCTIONS(KeePass2Writer) + public: KeePass2Writer(); void writeDatabase(QIODevice* device, Database* db); diff --git a/src/gui/AboutDialog.cpp b/src/gui/AboutDialog.cpp index 7cbd648ec..58387335c 100644 --- a/src/gui/AboutDialog.cpp +++ b/src/gui/AboutDialog.cpp @@ -55,13 +55,17 @@ AboutDialog::AboutDialog(QWidget* parent) QString debugInfo = "KeePassXC - "; debugInfo.append(tr("Version %1\n").arg(KEEPASSX_VERSION)); if (!commitHash.isEmpty()) { - debugInfo.append(tr("Revision: %1").arg(commitHash).append("\n\n")); + debugInfo.append(tr("Revision: %1").arg(commitHash.left(7)).append("\n")); } - debugInfo.append(QString("%1\n- Qt %2\n- %3\n\n") - .arg(tr("Libraries:"), - QString::fromLocal8Bit(qVersion()), - Crypto::backendVersion())); +#ifdef KEEPASSXC_DIST + debugInfo.append(tr("Distribution: %1").arg(KEEPASSXC_DIST_TYPE).append("\n")); +#endif + + debugInfo.append("\n").append(QString("%1\n- Qt %2\n- %3\n\n") + .arg(tr("Libraries:")) + .arg(QString::fromLocal8Bit(qVersion())) + .arg(Crypto::backendVersion())); #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) debugInfo.append(tr("Operating system: %1\nCPU architecture: %2\nKernel: %3 %4")