mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
renamed members in Helpers.cpp
This commit is contained in:
parent
ffd63d9407
commit
88d8bf7cec
5 changed files with 16 additions and 15 deletions
|
@ -4,19 +4,19 @@
|
|||
|
||||
namespace AB_NAMESPACE {
|
||||
|
||||
QString CreateUUID()
|
||||
QString generateUuid()
|
||||
{
|
||||
auto uuid = QUuid::createUuid();
|
||||
return uuid.toString();
|
||||
}
|
||||
|
||||
QString createLink(const QString &url, bool file)
|
||||
QString formatRichLink(const QString &url, bool file)
|
||||
{
|
||||
return QString("<a href=\"") + (file ? "file:///" : "") + url + "\">" +
|
||||
url + "</a>";
|
||||
}
|
||||
|
||||
QString createNamedLink(const QString &url, const QString &name, bool file)
|
||||
QString formatRichNamedLink(const QString &url, const QString &name, bool file)
|
||||
{
|
||||
return QString("<a href=\"") + (file ? "file:///" : "") + url + "\">" +
|
||||
name + "</a>";
|
||||
|
|
|
@ -11,11 +11,11 @@ auto fS(Args &&... args)
|
|||
return fmt::format(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
QString CreateUUID();
|
||||
QString generateUuid();
|
||||
|
||||
QString createLink(const QString &url, bool file = false);
|
||||
QString formatRichLink(const QString &url, bool file = false);
|
||||
|
||||
QString createNamedLink(const QString &url, const QString &name,
|
||||
QString formatRichNamedLink(const QString &url, const QString &name,
|
||||
bool file = false);
|
||||
|
||||
QString shortenString(const QString &str, unsigned maxWidth = 50);
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace detail {
|
|||
Listener{topic.GetString(), false, false, false});
|
||||
}
|
||||
|
||||
auto uuid = CreateUUID();
|
||||
auto uuid = generateUuid();
|
||||
|
||||
rj::set(message, "nonce", uuid);
|
||||
|
||||
|
@ -102,9 +102,9 @@ namespace detail {
|
|||
|
||||
auto message = createUnlistenMessage(topics);
|
||||
|
||||
auto uuid = CreateUUID();
|
||||
auto uuid = generateUuid();
|
||||
|
||||
rj::set(message, "nonce", CreateUUID());
|
||||
rj::set(message, "nonce", generateUuid());
|
||||
|
||||
std::string payload = rj::stringify(message);
|
||||
sentMessages[uuid] = payload;
|
||||
|
|
|
@ -30,8 +30,9 @@ ExternalToolsPage::ExternalToolsPage()
|
|||
description->setStyleSheet("color: #bbb");
|
||||
|
||||
auto links = new QLabel(
|
||||
createNamedLink("https://streamlink.github.io/", "Website") + " " +
|
||||
createNamedLink(
|
||||
formatRichNamedLink("https://streamlink.github.io/", "Website") +
|
||||
" " +
|
||||
formatRichNamedLink(
|
||||
"https://github.com/streamlink/streamlink/releases/latest",
|
||||
"Download"));
|
||||
links->setTextFormat(Qt::RichText);
|
||||
|
|
|
@ -438,10 +438,10 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
|||
layout.addDescription("The browser extension replaces the default "
|
||||
"Twitch.tv chat with chatterino.");
|
||||
|
||||
layout.addDescription(formatRichNamedLink(CHROME_EXTENSION_LINK,
|
||||
"Download for Google Chrome"));
|
||||
layout.addDescription(
|
||||
createNamedLink(CHROME_EXTENSION_LINK, "Download for Google Chrome"));
|
||||
layout.addDescription(
|
||||
createNamedLink(FIREFOX_EXTENSION_LINK, "Download for Firefox"));
|
||||
formatRichNamedLink(FIREFOX_EXTENSION_LINK, "Download for Firefox"));
|
||||
#endif
|
||||
|
||||
layout.addTitle("Miscellaneous");
|
||||
|
|
Loading…
Reference in a new issue