comparison src/gui/dialog/about.cc @ 189:649786bae914

*: etc. code cleanup I've removed most macros and stuff dep/animia: [UNTESTED] use raw C++ instead of Objective-C++
author Paper <mrpapersonic@gmail.com>
date Wed, 06 Dec 2023 19:42:33 -0500
parents 2004b41d4a59
children 53211cb1e7f5
comparison
equal deleted inserted replaced
188:168382a89b21 189:649786bae914
18 18
19 template <typename T, size_t N> 19 template <typename T, size_t N>
20 constexpr size_t array_size(T (&)[N]) { 20 constexpr size_t array_size(T (&)[N]) {
21 return N; 21 return N;
22 } 22 }
23
24 /* used for JSON for Modern C++ */
25 #define CONCAT_VERSION_NX(major, minor, patch) "v" #major "." #minor "." #patch
26 #define CONCAT_VERSION(major, minor, patch) CONCAT_VERSION_NX(major, minor, patch)
27 23
28 /* Ahhh, my dumb little hack to get this to be constexpr :) */ 24 /* Ahhh, my dumb little hack to get this to be constexpr :) */
29 static constexpr const char pugixml_version[] = { 25 static constexpr const char pugixml_version[] = {
30 PUGIXML_VERSION / 1000 % 10 + '0', /* Major */ 26 PUGIXML_VERSION / 1000 % 10 + '0', /* Major */
31 '.', 27 '.',
48 setAutoFillBackground(true); 44 setAutoFillBackground(true);
49 45
50 QHBoxLayout* layout = new QHBoxLayout(this); 46 QHBoxLayout* layout = new QHBoxLayout(this);
51 47
52 /* we have to generate this on-the-fly for localization purposes */ 48 /* we have to generate this on-the-fly for localization purposes */
53 static const QString html = QString( 49 const QString html = QString(
54 "<body>" 50 "<body>"
55 " <h2 style=\"font-weight: normal;\"><strong>Minori</strong> " MINORI_VERSION "</h2>" 51 " <h2 style=\"font-weight: normal;\"><strong>Minori</strong> " + QString::fromUtf8(MINORI_VERSION.data(), MINORI_VERSION.size()) + "</h2>"
56 " <p>" 52 " <p>"
57 " <strong>" + QCoreApplication::tr("Author:") + "</strong><br>" 53 " <strong>" + QCoreApplication::tr("Author:") + "</strong><br>"
58 " Paper (@mrpapersonic)" 54 " Paper (@mrpapersonic)"
59 " </p>" 55 " </p>"
60 " <p>" 56 " <p>"
63 ", " 59 ", "
64 "<a href=\"https://p.yusukekamiyamane.com/\">Fugue Icons v3.5.6</a>" 60 "<a href=\"https://p.yusukekamiyamane.com/\">Fugue Icons v3.5.6</a>"
65 ", " 61 ", "
66 "<a href=\"https://github.com/erengy/anitomy\">Anitomy</a>" 62 "<a href=\"https://github.com/erengy/anitomy\">Anitomy</a>"
67 ", " 63 ", "
68 "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ " CONCAT_VERSION(NLOHMANN_JSON_VERSION_MAJOR, 64 "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ v" + QString::number(NLOHMANN_JSON_VERSION_MAJOR) + "." +
69 NLOHMANN_JSON_VERSION_MINOR, 65 QString::number(NLOHMANN_JSON_VERSION_MINOR) + "." +
70 NLOHMANN_JSON_VERSION_PATCH) "</a>" 66 QString::number(NLOHMANN_JSON_VERSION_PATCH) + "</a>"
71 ", " 67 ", "
72 "<a href=\"https://pugixml.org/\">pugixml v" + pugixml_version + "</a>" 68 "<a href=\"https://pugixml.org/\">pugixml v" + pugixml_version + "</a>"
73 ", " 69 ", "
74 "<a href=\"https://github.com/pulzed/mINI\">mINI v0.9.14</a>" 70 "<a href=\"https://github.com/pulzed/mINI\">mINI v0.9.14</a>"
75 " </p>" 71 " </p>"