From 5d0850837a93f83fc4184bc6bea6a7f55b8a1c6f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 1 May 2021 20:36:11 +0300 Subject: [PATCH 42/44] Ruledit: Show Qt5/Qt6 mode with the freeciv version number See osdn #41869 Signed-off-by: Marko Lindqvist --- tools/ruledit/ruledit_qt.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/ruledit/ruledit_qt.cpp b/tools/ruledit/ruledit_qt.cpp index 46086059bc..3b964680af 100644 --- a/tools/ruledit/ruledit_qt.cpp +++ b/tools/ruledit/ruledit_qt.cpp @@ -114,6 +114,7 @@ void ruledit_gui::setup(QWidget *central_in) QLabel *version_label; char verbuf[2048]; const char *rev_ver; + const char *mode; data.nationlist = NULL; data.nationlist_saved = NULL; @@ -122,11 +123,18 @@ void ruledit_gui::setup(QWidget *central_in) 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 == NULL) { - 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), R__("%s%s\ncommit: %s"), - word_version(), VERSION_STRING, rev_ver); + fc_snprintf(verbuf, sizeof(verbuf), R__("%s%s\ncommit: %s\n%s"), + word_version(), VERSION_STRING, rev_ver, mode); } main_layout = new QStackedLayout(); -- 2.30.2