From 39b706d95f418c4ee5f110f5011755ed52695688 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 15 Sep 2023 15:10:01 +0300 Subject: [PATCH 16/16] Qt: Tell Qt5/Qt6 -mode in window title See osdn #48603 Signed-off-by: Marko Lindqvist --- client/gui-qt/fc_client.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/gui-qt/fc_client.cpp b/client/gui-qt/fc_client.cpp index f9eed200a9..a48ce0475f 100644 --- a/client/gui-qt/fc_client.cpp +++ b/client/gui-qt/fc_client.cpp @@ -68,6 +68,8 @@ QString current_theme; ****************************************************************************/ fc_client::fc_client() : QMainWindow() { + QString wtitle; + #ifdef FC_QT5_MODE QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); #endif // FC_QT5_MODE @@ -130,6 +132,20 @@ fc_client::fc_client() : QMainWindow() pages_layout[i] = NULL; pages[i] = NULL; } + + wtitle = _("Freeciv (%1)"); + wtitle = wtitle.arg( +#ifdef FC_QT6X_MODE + "Qt6x" +#elif FC_QT5_MODE + "Qt5" +#else // FC_QT6X_MODE + "Qt6" +#endif // FC_QT6X_MODE + ); + + setWindowTitle(wtitle); + init(); } -- 2.40.1