Move some helper functions to Helpers.hpp

This commit is contained in:
Rasmus Karlsson
2018-08-19 16:18:07 +02:00
parent 8bcc9c487b
commit 3fc91bded5
3 changed files with 45 additions and 36 deletions
@@ -1,6 +1,7 @@
#include "ExternalToolsPage.hpp"
#include "Application.hpp"
#include "util/Helpers.hpp"
#include "util/LayoutCreator.hpp"
#include <QGroupBox>
@@ -9,14 +10,6 @@
"Choose", "Source", "High", "Medium", "Low", "Audio only"
namespace chatterino {
namespace {
QString createLink(const QString &url, const QString &name)
{
return QString("<a href=\"" + url +
"\"><span style=\"color: white;\">" + name +
"</span></a>");
}
} // namespace
ExternalToolsPage::ExternalToolsPage()
: SettingsPage("External tools", "")
@@ -39,8 +32,8 @@ ExternalToolsPage::ExternalToolsPage()
description->setStyleSheet("color: #bbb");
auto links = new QLabel(
createLink("https://streamlink.github.io/", "Website") + " " +
createLink(
createNamedLink("https://streamlink.github.io/", "Website") + " " +
createNamedLink(
"https://github.com/streamlink/streamlink/releases/latest",
"Download"));
links->setTextFormat(Qt::RichText);