21 #include "ui_aboutsettings.h"
33 #include <QDesktopServices>
34 #include <QPushButton>
58 :
GenericForm(QPixmap(
":/img/settings/general.png"))
59 , bodyUI(new
Ui::AboutSettings)
60 , progressTimer(new QTimer(this))
61 , updateCheck(updateCheck)
65 #if !UPDATE_CHECK_ENABLED
66 bodyUI->updateStack->setVisible(
false);
68 bodyUI->unstableVersion->setVisible(
false);
69 #if UPDATE_CHECK_ENABLED
78 if (QString(GIT_VERSION).indexOf(
" ") > -1)
79 bodyUI->gitVersion->setOpenExternalLinks(
false);
96 QString TOXCORE_VERSION = QString::number(tox_version_major()) +
"."
97 + QString::number(tox_version_minor()) +
"."
98 + QString::number(tox_version_patch());
100 bodyUI->youAreUsing->setText(tr(
"You are using qTox version %1.").arg(QString(GIT_DESCRIBE)));
102 #if UPDATE_CHECK_ENABLED
108 qWarning() <<
"AboutForm passed null UpdateCheck!";
111 qDebug() <<
"AboutForm not showing updates, qTox built without UPDATE_CHECK";
114 QString commitLink =
"https://github.com/qTox/qTox/commit/" + QString(GIT_VERSION);
115 bodyUI->gitVersion->setText(
116 tr(
"Commit hash: %1").arg(
createLink(commitLink, QString(GIT_VERSION))));
118 bodyUI->toxCoreVersion->setText(tr(
"toxcore version: %1").arg(TOXCORE_VERSION));
119 bodyUI->qtVersion->setText(tr(
"Qt version: %1").arg(QT_VERSION_STR));
121 QString issueBody = QString(
"##### Brief Description\n\n"
127 "Reproducible: Always / Almost Always / Sometimes"
128 " / Rarely / Couldn't Reproduce\n\n"
129 "##### Steps to reproduce\n\n"
131 "##### Observed Behavior\n\n\n"
132 "##### Expected Behavior\n\n\n"
133 "##### Additional Info\n"
134 "(links, images, etc go here)\n\n"
136 "More information on how to write good bug reports in the wiki: "
137 "https://github.com/qTox/qTox/wiki/Writing-Useful-Bug-Reports.\n\n"
138 "Please remove any unnecessary template section before submitting.")
139 .arg(QSysInfo::prettyProductName(), GIT_DESCRIBE, GIT_VERSION,
140 TOXCORE_VERSION, QT_VERSION_STR);
142 issueBody.replace(
"#",
"%23").replace(
":",
"%3A");
144 bodyUI->knownIssues->setText(
145 tr(
"A list of all known issues may be found at our %1 at Github."
146 " If you discover a bug or security vulnerability within"
147 " qTox, please report it according to the guidelines in our"
150 "`%1` is replaced by translation of `bug tracker`"
151 "\n`%2` is replaced by translation of `Writing Useful Bug Reports`")
152 .arg(
createLink(
"https://github.com/qTox/qTox/issues",
153 tr(
"bug-tracker",
"Replaces `%1` in the `A list of all known…`")))
154 .arg(
createLink(
"https://github.com/qTox/qTox/wiki/Writing-Useful-Bug-Reports",
155 tr(
"Writing Useful Bug Reports",
156 "Replaces `%2` in the `A list of all known…`"))));
158 bodyUI->clickToReport->setText(
159 createLink(
"https://github.com/qTox/qTox/issues/new?body=" + QUrl(issueBody).toEncoded(),
160 QString(
"<b>%1</b>").arg(tr(
"Click here to report a bug."))));
164 QString(
"<p>%1</p><p>%2</p>")
165 .arg(tr(
"Original author: %1").arg(
createLink(
"https://github.com/tux3",
"tux3")))
167 tr(
"See a full list of %1 at Github",
168 "`%1` is replaced with translation of word `contributors`")
169 .arg(
createLink(
"https://qtox.github.io/gitstats/authors.html",
170 tr(
"contributors",
"Replaces `%1` in `See a full list of…`"))));
172 bodyUI->authorInfo->setText(authorInfo);
179 [link]() { QDesktopServices::openUrl(link); });
200 bodyUI->updateStack->hide();
201 bodyUI->unstableVersion->setVisible(
true);
212 return QString::fromUtf8(
213 "<a href=\"%1\" style=\"text-decoration: underline; color:%2;\">%3</a>")
228 bodyUI->retranslateUi(
this);