MCPcopy Index your code
hub / github.com/NetHack/NetHack / aboutMsg

Function aboutMsg

win/Qt/qt_main.cpp:456–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454" . XX "};
455
456static QString
457aboutMsg()
458{
459 char *p, vbuf[BUFSZ];
460 /* nethack's getversionstring() includes a final period
461 but we're using it mid-sentence so strip period off */
462 if ((p = strrchr(::getversionstring(vbuf, sizeof vbuf), '.')) != 0
463 && *(p + 1) == '\0')
464 *p = '\0';
465 /* it's also long; break it into two pieces */
466 (void) strsubst(vbuf, " - ", "\n- ");
467 QString msg = nh_qsprintf(
468 // format
469 "NetHack-Qt is a version of NetHack built using" // no newline
470#ifdef KDE
471 " KDE and" // ditto
472#endif
473 " the Qt %d GUI toolkit.\n" // short Qt version
474 "\n"
475 "This is %s%s and Lua %s.\n" // long nethack version, Qt & Lua versions
476 "\n"
477 "NetHack's Qt interface originally developed by Warwick Allison.\n"
478 "\n"
479#if 0
480 "Homepage:\n http://trolls.troll.no/warwick/nethack/\n" //obsolete
481#endif
482#ifdef KDE
483 "KDE:\n https://kde.org/\n"
484#endif
485#if 1
486 "Qt:\n https://qt.io/\n"
487#else
488 "Qt:\n http://www.troll.no/\n" // obsolete
489#endif
490 "Lua:\n https://lua.org/\n"
491 "NetHack:\n %s\n", // DEVTEAM_URL
492 // arguments
493#ifdef QT_VERSION_MAJOR
494 QT_VERSION_MAJOR,
495#else
496 5, // Qt version macro should exist; if not, assume Qt5
497#endif
498 vbuf, // nethack version
499#ifdef QT_VERSION_STR
500 " with Qt " QT_VERSION_STR,
501#else
502 "",
503#endif
504 ::get_lua_version(),
505 DEVTEAM_URL);
506 return msg;
507}
508
509class SmallToolButton : public QToolButton {
510public:

Callers 1

doAboutMethod · 0.70

Calls 5

strrchrFunction · 0.85
getversionstringFunction · 0.85
strsubstFunction · 0.85
nh_qsprintfFunction · 0.85
get_lua_versionFunction · 0.85

Tested by

no test coverage detected