yet more version buf
This commit is contained in:
@@ -88,7 +88,7 @@ NetHackQtBind::NetHackQtBind(int& argc, char** argv) :
|
|||||||
QCoreApplication::setApplicationName("NetHack-Qt"); // Qt NetHack
|
QCoreApplication::setApplicationName("NetHack-Qt"); // Qt NetHack
|
||||||
{
|
{
|
||||||
char cvers[BUFSZ];
|
char cvers[BUFSZ];
|
||||||
QString qvers = QString(::version_string(cvers));
|
QString qvers = QString(::version_string(cvers, sizeof cvers));
|
||||||
QCoreApplication::setApplicationVersion(qvers);
|
QCoreApplication::setApplicationVersion(qvers);
|
||||||
}
|
}
|
||||||
#ifdef MACOS
|
#ifdef MACOS
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ aboutMsg()
|
|||||||
char *p, vbuf[BUFSZ];
|
char *p, vbuf[BUFSZ];
|
||||||
/* nethack's getversionstring() includes a final period
|
/* nethack's getversionstring() includes a final period
|
||||||
but we're using it mid-sentence so strip period off */
|
but we're using it mid-sentence so strip period off */
|
||||||
if ((p = strrchr(::getversionstring(vbuf), '.')) != 0 && *(p + 1) == '\0')
|
if ((p = strrchr(::getversionstring(vbuf, sizeof vbuf), '.')) != 0 && *(p + 1) == '\0')
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
/* it's also long; break it into two pieces */
|
/* it's also long; break it into two pieces */
|
||||||
(void) strsubst(vbuf, " - ", "\n- ");
|
(void) strsubst(vbuf, " - ", "\n- ");
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector(
|
|||||||
QVBoxLayout* vbab UNUSED = new QVBoxLayout(alignbox);
|
QVBoxLayout* vbab UNUSED = new QVBoxLayout(alignbox);
|
||||||
char versionbuf[QBUFSZ];
|
char versionbuf[QBUFSZ];
|
||||||
QLabel *logo = new QLabel(QString(nh_attribution).arg(
|
QLabel *logo = new QLabel(QString(nh_attribution).arg(
|
||||||
version_string(versionbuf)), this);
|
version_string(versionbuf, sizeof versionbuf)), this);
|
||||||
|
|
||||||
l->addWidget( namebox, 0,0,1,3 );
|
l->addWidget( namebox, 0,0,1,3 );
|
||||||
role = new NhPSListView(this);
|
role = new NhPSListView(this);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ NetHackQtSavedGameSelector::NetHackQtSavedGameSelector(const char** saved) :
|
|||||||
QHBoxLayout* hb;
|
QHBoxLayout* hb;
|
||||||
|
|
||||||
char cvers[BUFSZ];
|
char cvers[BUFSZ];
|
||||||
QString qvers = QString("NetHack ") + QString(version_string(cvers));
|
QString qvers = QString("NetHack ") + QString(version_string(cvers, sizeof cvers));
|
||||||
QLabel *vers = new QLabel(qvers, this);
|
QLabel *vers = new QLabel(qvers, this);
|
||||||
vers->setAlignment(Qt::AlignCenter);
|
vers->setAlignment(Qt::AlignCenter);
|
||||||
vbl->addWidget(vers);
|
vbl->addWidget(vers);
|
||||||
|
|||||||
Reference in New Issue
Block a user