| 454 | " . XX "}; |
| 455 | |
| 456 | static QString |
| 457 | aboutMsg() |
| 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 | |
| 509 | class SmallToolButton : public QToolButton { |
| 510 | public: |
no test coverage detected