Mercurial > minori
diff src/gui/dialog/about.cc @ 255:fe702c8f161f
*: whatever
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 07 Feb 2024 17:04:06 -0500 |
parents | 4d461ef7d424 |
children | 862d0d8619f6 |
line wrap: on
line diff
--- a/src/gui/dialog/about.cc Wed Feb 07 07:57:37 2024 -0500 +++ b/src/gui/dialog/about.cc Wed Feb 07 17:04:06 2024 -0500 @@ -20,16 +20,9 @@ return N; } -/* Ahhh, my dumb little hack to get this to be constexpr :) */ -static constexpr const char pugixml_version[] = { - PUGIXML_VERSION / 1000 % 10 + '0', /* Major */ - '.', - PUGIXML_VERSION / 100 % 10 + '0', /* Minor */ - PUGIXML_VERSION / 10 % 10 + '0', - '.', - PUGIXML_VERSION % 10 + '0', /* Patch */ - '\0' -}; +static constexpr semver::version pugixml_version{PUGIXML_VERSION / 1000 % 10, PUGIXML_VERSION / 10 % 100, PUGIXML_VERSION % 10}; +static constexpr semver::version json_version{NLOHMANN_JSON_VERSION_MAJOR, NLOHMANN_JSON_VERSION_MINOR, NLOHMANN_JSON_VERSION_PATCH}; +static constexpr semver::version semver_version{SEMVER_VERSION_MAJOR, SEMVER_VERSION_MINOR, SEMVER_VERSION_PATCH}; const char* get_curl_version() { const curl_version_info_data* data = curl_version_info(CURLVERSION_NOW); @@ -60,13 +53,13 @@ ", " "<a href=\"https://github.com/erengy/anitomy\">Anitomy</a>" ", " - "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ v" + QString::number(NLOHMANN_JSON_VERSION_MAJOR) + "." + - QString::number(NLOHMANN_JSON_VERSION_MINOR) + "." + - QString::number(NLOHMANN_JSON_VERSION_PATCH) + "</a>" + "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ v" + Strings::ToQString(json_version.to_string()) + "</a>" ", " - "<a href=\"https://pugixml.org/\">pugixml v" + pugixml_version + "</a>" + "<a href=\"https://pugixml.org/\">pugixml v" + Strings::ToQString(pugixml_version.to_string()) + "</a>" ", " "<a href=\"https://github.com/pulzed/mINI\">mINI v0.9.14</a>" + ", " + "<a href=\"https://github.com/Neargye/semver\">semver v" + Strings::ToQString(semver_version.to_string()) + "</a>" " </p>" "<span>" "<strong>" + tr("Special thanks:") + "</strong>"