From: Pasi Kallinen Date: Fri, 13 Oct 2017 22:33:56 +0000 (+0300) Subject: Qt4: Don't use version string directly X-Git-Tag: NetHack-3.6.1_RC01~268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d8aea1ca3d265ad1e70337943b45cbb1b1563e5;p=nethack Qt4: Don't use version string directly --- diff --git a/win/Qt4/qt4plsel.cpp b/win/Qt4/qt4plsel.cpp index 7ff47aaa9..81bf5f023 100644 --- a/win/Qt4/qt4plsel.cpp +++ b/win/Qt4/qt4plsel.cpp @@ -6,7 +6,6 @@ extern "C" { #include "hack.h" -#include "date.h" } #undef Invisible #undef Warning @@ -38,7 +37,7 @@ namespace nethack_qt4 { void centerOnMain( QWidget* w ); // end temporary -static const char nh_attribution[] = "
NetHack " VERSION_STRING "" +static const char nh_attribution[] = "
NetHack %1" "
by the NetHack DevTeam
"; class NhPSListViewItem : public QTableWidgetItem { @@ -185,7 +184,8 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector(NetHackQtKeyBuffer& ks) : QButtonGroup *aligngroup = new QButtonGroup(this); QVBoxLayout* vbgb = new QVBoxLayout(genderbox); QVBoxLayout* vbab = new QVBoxLayout(alignbox); - QLabel* logo = new QLabel(nh_attribution, this); + char versionbuf[QBUFSZ]; + QLabel* logo = new QLabel(QString(nh_attribution).arg(version_string(versionbuf)), this); l->addWidget( namebox, 0,0,1,3 ); #ifdef QT_CHOOSE_RACE_FIRST