Add distribution information to debug info screen

This commit is contained in:
Janek Bevendorff 2017-10-16 17:47:19 +02:00
parent 1cbbcc0d87
commit bae9dbc407
3 changed files with 14 additions and 5 deletions

View File

@ -52,8 +52,12 @@ set(KEEPASSXC_VERSION_MINOR "2")
set(KEEPASSXC_VERSION_PATCH "1") set(KEEPASSXC_VERSION_PATCH "1")
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}") set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
# Special flag for snap builds # Distribution info
set(KEEPASSXC_SNAP_BUILD OFF CACHE BOOL "Set whether this is a build for snap or not") set(KEEPASSXC_DIST_TYPE "Other" CACHE STRING "KeePassXC Distribution type")
set_property(CACHE KEEPASSXC_DIST_TYPE PROPERTY STRINGS Snap AppImage Other)
if(NOT KEEPASSXC_DIST_TYPE STREQUAL "Other")
set(KEEPASSXC_DIST True)
endif()
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_COMPILER_IS_CLANG 1) set(CMAKE_COMPILER_IS_CLANG 1)

View File

@ -16,7 +16,8 @@
#cmakedefine WITH_XC_AUTOTYPE #cmakedefine WITH_XC_AUTOTYPE
#cmakedefine WITH_XC_YUBIKEY #cmakedefine WITH_XC_YUBIKEY
#cmakedefine KEEPASSXC_SNAP_BUILD #cmakedefine KEEPASSXC_DIST
#cmakedefine KEEPASSXC_DIST_TYPE "@KEEPASSXC_DIST_TYPE@"
#cmakedefine HAVE_PR_SET_DUMPABLE 1 #cmakedefine HAVE_PR_SET_DUMPABLE 1
#cmakedefine HAVE_RLIMIT_CORE 1 #cmakedefine HAVE_RLIMIT_CORE 1

View File

@ -55,10 +55,14 @@ AboutDialog::AboutDialog(QWidget* parent)
QString debugInfo = "KeePassXC - "; QString debugInfo = "KeePassXC - ";
debugInfo.append(tr("Version %1\n").arg(KEEPASSX_VERSION)); debugInfo.append(tr("Version %1\n").arg(KEEPASSX_VERSION));
if (!commitHash.isEmpty()) { 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") #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(tr("Libraries:"))
.arg(QString::fromLocal8Bit(qVersion())) .arg(QString::fromLocal8Bit(qVersion()))
.arg(Crypto::backendVersion())); .arg(Crypto::backendVersion()));