diff options
| author | 2016-01-01 17:18:23 +0100 | |
|---|---|---|
| committer | 2016-01-01 17:18:23 +0100 | |
| commit | 1a587fd476003e7740d6f95266e2bbaaa4b4dfd8 (patch) | |
| tree | de8e6d0f8c742441d1b9fbb1fa059fb69c87a387 /src | |
| parent | Don't use a stylesheet to style KviThemedComboBoxes with the Breeze theme. (diff) | |
| download | KVIrc-1a587fd476003e7740d6f95266e2bbaaa4b4dfd8.tar.gz KVIrc-1a587fd476003e7740d6f95266e2bbaaa4b4dfd8.tar.bz2 KVIrc-1a587fd476003e7740d6f95266e2bbaaa4b4dfd8.zip | |
Show the name of the current Qt theme in the About dialog.
My idea is to make the text of that dialog useful as a troubleshooting tool.
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvilib/ext/KviOsInfo.cpp | 8 | ||||
| -rw-r--r-- | src/kvilib/ext/KviOsInfo.h | 1 | ||||
| -rw-r--r-- | src/modules/about/AboutDialog.cpp | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/kvilib/ext/KviOsInfo.cpp b/src/kvilib/ext/KviOsInfo.cpp index 2e1d2e307..ddbdc8ed0 100644 --- a/src/kvilib/ext/KviOsInfo.cpp +++ b/src/kvilib/ext/KviOsInfo.cpp @@ -27,6 +27,9 @@ #include "KviLocale.h" #include "KviQString.h" +#include <QApplication> +#include <QStyle> + #if !defined(COMPILE_ON_WINDOWS) && !defined(COMPILE_ON_MINGW) #include <sys/utsname.h> #include <stdlib.h> @@ -720,4 +723,9 @@ namespace KviOsInfo { return QString(qVersion()); } + + QString qtTheme() + { + return QString(qApp->style()->objectName()); + } } diff --git a/src/kvilib/ext/KviOsInfo.h b/src/kvilib/ext/KviOsInfo.h index 125a65cdb..958b03255 100644 --- a/src/kvilib/ext/KviOsInfo.h +++ b/src/kvilib/ext/KviOsInfo.h @@ -39,6 +39,7 @@ namespace KviOsInfo extern KVILIB_API QString nodename(); extern KVILIB_API QString hostname(); extern KVILIB_API QString qtVersion(); + extern KVILIB_API QString qtTheme(); } #endif //!_KVI_OSINFO_H_ diff --git a/src/modules/about/AboutDialog.cpp b/src/modules/about/AboutDialog.cpp index fb7eecde7..525e7795c 100644 --- a/src/modules/about/AboutDialog.cpp +++ b/src/modules/about/AboutDialog.cpp @@ -140,6 +140,10 @@ AboutDialog::AboutDialog() infoString += __tr2qs_ctx("Qt version","about"); infoString += ": "; infoString += KviOsInfo::qtVersion(); + infoString += "<br>"; + infoString += __tr2qs_ctx("Qt theme","about"); + infoString += ": "; + infoString += KviOsInfo::qtTheme(); infoString += "<br><br>"; infoString += "<b>"; infoString += __tr2qs_ctx("Build Info","about"); |
