From 747891effa3894cad026723d7d238a43f5faf83f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 1 May 2021 20:41:57 +0300 Subject: [PATCH 44/44] Qt fcmp: Show Qt5/Qt6 mode with the freeciv version number See osdn #42130 Signed-off-by: Marko Lindqvist --- tools/fcmp/mpgui_qt.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/fcmp/mpgui_qt.cpp b/tools/fcmp/mpgui_qt.cpp index d29d278e66..2be9b4f82c 100644 --- a/tools/fcmp/mpgui_qt.cpp +++ b/tools/fcmp/mpgui_qt.cpp @@ -192,14 +192,22 @@ void mpgui::setup(QWidget *central, struct fcmp_params *params) QLabel *version_label; char verbuf[2048]; const char *rev_ver; + const char *mode; rev_ver = fc_git_revision(); +#ifdef FC_QT6_MODE + mode = R__("built in Qt6 mode."); +#else // FC_QT6_MODE + mode = R__("built in Qt5 mode."); +#endif // FC_QT6_MODE + if (rev_ver == nullptr) { - fc_snprintf(verbuf, sizeof(verbuf), "%s%s", word_version(), VERSION_STRING); + fc_snprintf(verbuf, sizeof(verbuf), "%s%s\n%s", word_version(), + VERSION_STRING, mode); } else { - fc_snprintf(verbuf, sizeof(verbuf), _("%s%s\ncommit: %s"), - word_version(), VERSION_STRING, rev_ver); + fc_snprintf(verbuf, sizeof(verbuf), _("%s%s\ncommit: %s\n%s"), + word_version(), VERSION_STRING, rev_ver, mode); } version_label = new QLabel(QString::fromUtf8(verbuf)); -- 2.30.2