Add version information to "About" page
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "AboutPage.hpp"
|
||||
|
||||
#include "common/Modes.hpp"
|
||||
#include "common/Version.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "util/RemoveScrollAreaBackground.hpp"
|
||||
@@ -71,6 +73,24 @@ AboutPage::AboutPage()
|
||||
// }
|
||||
}*/
|
||||
|
||||
auto versionInfo = layout.emplace<QGroupBox>("Version");
|
||||
{
|
||||
auto version = Version::getInstance();
|
||||
QString text = QString("%1 (commit %2%3)")
|
||||
.arg(version.getFullVersion())
|
||||
.arg("<a "
|
||||
"href=\"https://github.com/Chatterino/"
|
||||
"chatterino2/commit/" +
|
||||
version.getCommitHash() + "\">" +
|
||||
version.getCommitHash() + "</a>")
|
||||
.arg(Modes::getInstance().isNightly ? ", " + version.getDateOfBuild() : "");
|
||||
|
||||
auto versionLabel = versionInfo.emplace<QLabel>(text);
|
||||
versionLabel->setOpenExternalLinks(true);
|
||||
versionLabel->setTextInteractionFlags(Qt::TextSelectableByMouse |
|
||||
Qt::LinksAccessibleByMouse);
|
||||
}
|
||||
|
||||
auto licenses =
|
||||
layout.emplace<QGroupBox>("Open source software used...");
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user