Mercurial > minori
comparison src/gui/dialog/about.cpp @ 63:3d2decf093bb
*: fix many clang warnings
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 06:39:47 -0400 |
parents | d10b6c6b432e |
children | fe719c109dbc |
comparison
equal
deleted
inserted
replaced
62:4c6dd5999b39 | 63:3d2decf093bb |
---|---|
1 #include "gui/dialog/about.h" | |
2 #include "core/json.h" | |
1 #include "core/version.h" | 3 #include "core/version.h" |
2 #include "gui/widgets/text.h" | 4 #include "gui/widgets/text.h" |
3 #include "gui/dialog/about.h" | |
4 #include "core/json.h" | |
5 #include "pugixml.hpp" | 5 #include "pugixml.hpp" |
6 #include <QFont> | |
7 #include <QHBoxLayout> | |
8 #include <QTextBrowser> | |
9 #include <QTextCharFormat> | |
10 #include <QTextCursor> | |
6 #include <curl/curl.h> | 11 #include <curl/curl.h> |
7 #include <QFont> | |
8 #include <QTextCharFormat> | |
9 #include <QTextBrowser> | |
10 #include <QTextCursor> | |
11 #include <QHBoxLayout> | |
12 | 12 |
13 #define CONCAT_VERSION_NX(major, minor, patch) \ | 13 #define CONCAT_VERSION_NX(major, minor, patch) ("v" #major "." #minor "." #patch) |
14 ("v" #major "." #minor "." #patch) | |
15 | 14 |
16 #define CONCAT_VERSION(major, minor, patch) \ | 15 #define CONCAT_VERSION(major, minor, patch) CONCAT_VERSION_NX(major, minor, patch) |
17 CONCAT_VERSION_NX(major, minor, patch) | |
18 | 16 |
19 #define SET_TITLE_FONT(font, format, cursor) \ | 17 #define SET_TITLE_FONT(font, format, cursor) \ |
20 { \ | 18 { \ |
21 font = cursor.charFormat().font(); \ | 19 font = cursor.charFormat().font(); \ |
22 font.setPointSize(10); \ | 20 font.setPointSize(10); \ |
97 SET_FONT_BOLD(font, format, cursor); | 95 SET_FONT_BOLD(font, format, cursor); |
98 cursor.insertText(tr("Third party components:")); | 96 cursor.insertText(tr("Third party components:")); |
99 UNSET_FONT_BOLD(font, format, cursor); | 97 UNSET_FONT_BOLD(font, format, cursor); |
100 cursor.insertBlock(); | 98 cursor.insertBlock(); |
101 SET_FORMAT_HYPERLINK(format, cursor, "https://github.com/nlohmann/json"); | 99 SET_FORMAT_HYPERLINK(format, cursor, "https://github.com/nlohmann/json"); |
102 cursor.insertText(tr("JSON for Modern C++ ") + CONCAT_VERSION(NLOHMANN_JSON_VERSION_MAJOR, NLOHMANN_JSON_VERSION_MINOR, NLOHMANN_JSON_VERSION_PATCH)); | 100 cursor.insertText(tr("JSON for Modern C++ ") + CONCAT_VERSION(NLOHMANN_JSON_VERSION_MAJOR, |
101 NLOHMANN_JSON_VERSION_MINOR, | |
102 NLOHMANN_JSON_VERSION_PATCH)); | |
103 UNSET_FORMAT_HYPERLINK(format, cursor); | 103 UNSET_FORMAT_HYPERLINK(format, cursor); |
104 cursor.insertText(", "); | 104 cursor.insertText(", "); |
105 { | 105 { |
106 curl_version_info_data* data = curl_version_info(CURLVERSION_NOW); | 106 curl_version_info_data* data = curl_version_info(CURLVERSION_NOW); |
107 SET_FORMAT_HYPERLINK(format, cursor, "https://curl.se/"); | 107 SET_FORMAT_HYPERLINK(format, cursor, "https://curl.se/"); |
112 SET_FORMAT_HYPERLINK(format, cursor, "https://p.yusukekamiyamane.com/"); | 112 SET_FORMAT_HYPERLINK(format, cursor, "https://p.yusukekamiyamane.com/"); |
113 cursor.insertText(tr("Fugue Icons ") + CONCAT_VERSION(3, 5, 6)); | 113 cursor.insertText(tr("Fugue Icons ") + CONCAT_VERSION(3, 5, 6)); |
114 UNSET_FORMAT_HYPERLINK(format, cursor); | 114 UNSET_FORMAT_HYPERLINK(format, cursor); |
115 cursor.insertText(", "); | 115 cursor.insertText(", "); |
116 SET_FORMAT_HYPERLINK(format, cursor, "https://pugixml.org/"); | 116 SET_FORMAT_HYPERLINK(format, cursor, "https://pugixml.org/"); |
117 cursor.insertText(tr("pugixml v") + QString::number(PUGIXML_VERSION / 1000) + "." + QString::number(PUGIXML_VERSION / 10 % 100) + "." + QString::number(PUGIXML_VERSION % 10)); | 117 cursor.insertText(tr("pugixml v") + QString::number(PUGIXML_VERSION / 1000) + "." + |
118 QString::number(PUGIXML_VERSION / 10 % 100) + "." + QString::number(PUGIXML_VERSION % 10)); | |
118 UNSET_FORMAT_HYPERLINK(format, cursor); | 119 UNSET_FORMAT_HYPERLINK(format, cursor); |
119 cursor.insertText(", "); | 120 cursor.insertText(", "); |
120 SET_FORMAT_HYPERLINK(format, cursor, "https://github.com/erengy/anitomy"); | 121 SET_FORMAT_HYPERLINK(format, cursor, "https://github.com/erengy/anitomy"); |
121 cursor.insertText(tr("Anitomy")); | 122 cursor.insertText(tr("Anitomy")); |
122 UNSET_FORMAT_HYPERLINK(format, cursor); | 123 UNSET_FORMAT_HYPERLINK(format, cursor); |