mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
ran clang-format on all files
This commit is contained in:
parent
6ee1fc303e
commit
08e552f5f6
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/CompletionModel.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "messages/LimitedQueue.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "common/CompletionModel.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
|
||||
#include <QString>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "debug/Log.hpp"
|
||||
#include "common/NetworkRequester.hpp"
|
||||
#include "common/NetworkWorker.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
@ -50,11 +50,11 @@ public:
|
|||
worker->moveToThread(&NetworkManager::workerThread);
|
||||
QObject::connect(
|
||||
&requester, &NetworkRequester::requestUrl, worker,
|
||||
[worker, onFinished = std::move(onFinished), request = std::move(request)]() {
|
||||
[ worker, onFinished = std::move(onFinished), request = std::move(request) ]() {
|
||||
QNetworkReply *reply = NetworkManager::NaM.get(request);
|
||||
|
||||
reply->connect(reply, &QNetworkReply::finished,
|
||||
[worker, reply, onFinished = std::move(onFinished)]() {
|
||||
[ worker, reply, onFinished = std::move(onFinished) ]() {
|
||||
onFinished(reply);
|
||||
delete worker;
|
||||
});
|
||||
|
@ -110,11 +110,11 @@ public:
|
|||
worker->moveToThread(&NetworkManager::workerThread);
|
||||
QObject::connect(
|
||||
&requester, &NetworkRequester::requestUrl, worker,
|
||||
[worker, data, onFinished = std::move(onFinished), request = std::move(request)]() {
|
||||
[ worker, data, onFinished = std::move(onFinished), request = std::move(request) ]() {
|
||||
QNetworkReply *reply = NetworkManager::NaM.put(request, *data);
|
||||
|
||||
reply->connect(reply, &QNetworkReply::finished,
|
||||
[worker, reply, onFinished = std::move(onFinished)]() {
|
||||
[ worker, reply, onFinished = std::move(onFinished) ]() {
|
||||
onFinished(reply);
|
||||
delete worker;
|
||||
});
|
||||
|
@ -132,11 +132,11 @@ public:
|
|||
worker->moveToThread(&NetworkManager::workerThread);
|
||||
QObject::connect(
|
||||
&requester, &NetworkRequester::requestUrl, worker,
|
||||
[onFinished = std::move(onFinished), request = std::move(request), worker]() {
|
||||
[ onFinished = std::move(onFinished), request = std::move(request), worker ]() {
|
||||
QNetworkReply *reply = NetworkManager::NaM.put(request, "");
|
||||
|
||||
reply->connect(reply, &QNetworkReply::finished,
|
||||
[onFinished = std::move(onFinished), reply, worker]() {
|
||||
[ onFinished = std::move(onFinished), reply, worker ]() {
|
||||
onFinished(reply);
|
||||
delete worker;
|
||||
});
|
||||
|
@ -154,11 +154,11 @@ public:
|
|||
worker->moveToThread(&NetworkManager::workerThread);
|
||||
QObject::connect(
|
||||
&requester, &NetworkRequester::requestUrl, worker,
|
||||
[onFinished = std::move(onFinished), request = std::move(request), worker]() {
|
||||
[ onFinished = std::move(onFinished), request = std::move(request), worker ]() {
|
||||
QNetworkReply *reply = NetworkManager::NaM.deleteResource(request);
|
||||
|
||||
reply->connect(reply, &QNetworkReply::finished,
|
||||
[onFinished = std::move(onFinished), reply, worker]() {
|
||||
[ onFinished = std::move(onFinished), reply, worker ]() {
|
||||
onFinished(reply);
|
||||
delete worker;
|
||||
});
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "singletons/PathManager.hpp"
|
||||
#include "common/NetworkManager.hpp"
|
||||
#include "common/NetworkRequester.hpp"
|
||||
#include "common/NetworkWorker.hpp"
|
||||
#include "singletons/PathManager.hpp"
|
||||
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/error/en.h>
|
||||
|
@ -32,7 +32,7 @@ static rapidjson::Document parseJSONFromData2(const QByteArray &data)
|
|||
|
||||
if (result.Code() != rapidjson::kParseErrorNone) {
|
||||
Log("JSON parse error: {} ({})", rapidjson::GetParseError_En(result.Code()),
|
||||
result.Offset());
|
||||
result.Offset());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ static rapidjson::Document parseJSONFromReply2(QNetworkReply *reply)
|
|||
|
||||
if (result.Code() != rapidjson::kParseErrorNone) {
|
||||
Log("JSON parse error: {} ({})", rapidjson::GetParseError_En(result.Code()),
|
||||
result.Offset());
|
||||
result.Offset());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ public:
|
|||
|
||||
if (this->data.caller != nullptr) {
|
||||
QObject::connect(worker, &NetworkWorker::doneUrl, this->data.caller,
|
||||
[onFinished, data = this->data](auto reply) mutable {
|
||||
[ onFinished, data = this->data ](auto reply) mutable {
|
||||
if (reply->error() != QNetworkReply::NetworkError::NoError) {
|
||||
// TODO: We might want to call an onError callback here
|
||||
return;
|
||||
|
@ -237,7 +237,7 @@ public:
|
|||
|
||||
QObject::connect(
|
||||
&requester, &NetworkRequester::requestUrl, worker,
|
||||
[timer, data = std::move(this->data), worker, onFinished{std::move(onFinished)}]() {
|
||||
[ timer, data = std::move(this->data), worker, onFinished{std::move(onFinished)} ]() {
|
||||
QNetworkReply *reply = NetworkManager::NaM.get(data.request);
|
||||
|
||||
if (timer != nullptr) {
|
||||
|
@ -252,21 +252,21 @@ public:
|
|||
data.onReplyCreated(reply);
|
||||
}
|
||||
|
||||
QObject::connect(reply, &QNetworkReply::finished, worker,
|
||||
[data = std::move(data), worker, reply,
|
||||
onFinished = std::move(onFinished)]() mutable {
|
||||
if (data.caller == nullptr) {
|
||||
QByteArray bytes = reply->readAll();
|
||||
data.writeToCache(bytes);
|
||||
onFinished(bytes);
|
||||
QObject::connect(reply, &QNetworkReply::finished, worker, [
|
||||
data = std::move(data), worker, reply, onFinished = std::move(onFinished)
|
||||
]() mutable {
|
||||
if (data.caller == nullptr) {
|
||||
QByteArray bytes = reply->readAll();
|
||||
data.writeToCache(bytes);
|
||||
onFinished(bytes);
|
||||
|
||||
reply->deleteLater();
|
||||
} else {
|
||||
emit worker->doneUrl(reply);
|
||||
}
|
||||
reply->deleteLater();
|
||||
} else {
|
||||
emit worker->doneUrl(reply);
|
||||
}
|
||||
|
||||
delete worker;
|
||||
});
|
||||
delete worker;
|
||||
});
|
||||
});
|
||||
|
||||
emit requester.requestUrl();
|
||||
|
@ -275,7 +275,7 @@ public:
|
|||
template <typename FinishedCallback>
|
||||
void getJSON(FinishedCallback onFinished)
|
||||
{
|
||||
this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes) -> bool {
|
||||
this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes)->bool {
|
||||
auto object = parseJSONFromData(bytes);
|
||||
onFinished(object);
|
||||
|
||||
|
@ -288,7 +288,7 @@ public:
|
|||
template <typename FinishedCallback>
|
||||
void getJSON2(FinishedCallback onFinished)
|
||||
{
|
||||
this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes) -> bool {
|
||||
this->get([onFinished{std::move(onFinished)}](const QByteArray &bytes)->bool {
|
||||
auto object = parseJSONFromData2(bytes);
|
||||
onFinished(object);
|
||||
|
||||
|
@ -366,8 +366,8 @@ private:
|
|||
worker->moveToThread(&NetworkManager::workerThread);
|
||||
|
||||
if (this->data.caller != nullptr) {
|
||||
QObject::connect(worker, &NetworkWorker::doneUrl, this->data.caller,
|
||||
[data = this->data](auto reply) mutable {
|
||||
QObject::connect(worker, &NetworkWorker::doneUrl,
|
||||
this->data.caller, [data = this->data](auto reply) mutable {
|
||||
if (reply->error() != QNetworkReply::NetworkError::NoError) {
|
||||
if (data.onError) {
|
||||
data.onError(reply->error());
|
||||
|
@ -390,7 +390,7 @@ private:
|
|||
}
|
||||
|
||||
QObject::connect(&requester, &NetworkRequester::requestUrl, worker,
|
||||
[timer, data = std::move(this->data), worker]() {
|
||||
[ timer, data = std::move(this->data), worker ]() {
|
||||
QNetworkReply *reply = nullptr;
|
||||
switch (data.requestType) {
|
||||
case GetRequest: {
|
||||
|
@ -426,7 +426,7 @@ private:
|
|||
}
|
||||
|
||||
QObject::connect(reply, &QNetworkReply::finished, worker,
|
||||
[data = std::move(data), worker, reply]() mutable {
|
||||
[ data = std::move(data), worker, reply ]() mutable {
|
||||
if (data.caller == nullptr) {
|
||||
QByteArray bytes = reply->readAll();
|
||||
data.writeToCache(bytes);
|
||||
|
|
|
@ -3,5 +3,4 @@
|
|||
namespace chatterino {
|
||||
|
||||
enum class ProviderId { Twitch };
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <QObject>
|
||||
|
||||
#include "common/SignalVector2.hpp"
|
||||
#include "controllers/accounts/Account.hpp"
|
||||
#include "providers/twitch/TwitchAccountManager.hpp"
|
||||
#include "util/SharedPtrElementLess.hpp"
|
||||
#include "common/SignalVector2.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
@ -23,8 +23,7 @@ public:
|
|||
TwitchAccountManager twitch;
|
||||
|
||||
private:
|
||||
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>>
|
||||
accounts;
|
||||
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>> accounts;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/SignalVectorModel.hpp"
|
||||
#include "controllers/accounts/Account.hpp"
|
||||
#include "util/QstringHash.hpp"
|
||||
#include "common/SignalVectorModel.hpp"
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
#include "controllers/commands/Command.hpp"
|
||||
#include "common/SignalVector2.hpp"
|
||||
#include "controllers/commands/Command.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
class Channel;
|
||||
|
||||
|
||||
class CommandModel;
|
||||
|
||||
class CommandController
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <QObject>
|
||||
|
||||
#include "controllers/commands/Command.hpp"
|
||||
#include "common/SignalVectorModel.hpp"
|
||||
#include "controllers/commands/Command.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <QObject>
|
||||
|
||||
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||
#include "common/SignalVectorModel.hpp"
|
||||
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
#include "common/SerializeCustom.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
|
@ -94,8 +94,7 @@ struct Deserialize<chatterino::HighlightPhrase> {
|
|||
static chatterino::HighlightPhrase get(const rapidjson::Value &value)
|
||||
{
|
||||
if (!value.IsObject()) {
|
||||
return chatterino::HighlightPhrase(QString(), true, false,
|
||||
false);
|
||||
return chatterino::HighlightPhrase(QString(), true, false, false);
|
||||
}
|
||||
|
||||
QString _pattern;
|
||||
|
@ -108,8 +107,7 @@ struct Deserialize<chatterino::HighlightPhrase> {
|
|||
chatterino::rj::getSafe(value, "sound", _sound);
|
||||
chatterino::rj::getSafe(value, "regex", _isRegex);
|
||||
|
||||
return chatterino::HighlightPhrase(_pattern, _alert, _sound,
|
||||
_isRegex);
|
||||
return chatterino::HighlightPhrase(_pattern, _alert, _sound, _isRegex);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/SignalVector2.hpp"
|
||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "common/SignalVector2.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
@ -20,8 +20,7 @@ public:
|
|||
private:
|
||||
bool initialized = false;
|
||||
|
||||
chatterino::ChatterinoSetting<std::vector<IgnorePhrase>> ignoresSetting = {
|
||||
"/ignore/phrases"};
|
||||
chatterino::ChatterinoSetting<std::vector<IgnorePhrase>> ignoresSetting = {"/ignore/phrases"};
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <QObject>
|
||||
|
||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||
#include "common/SignalVectorModel.hpp"
|
||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
#include "common/SerializeCustom.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "controllers/taggedusers/TaggedUser.hpp"
|
||||
#include "common/SignalVector2.hpp"
|
||||
#include "controllers/taggedusers/TaggedUser.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "controllers/taggedusers/TaggedUser.hpp"
|
||||
#include "common/SignalVectorModel.hpp"
|
||||
#include "controllers/taggedusers/TaggedUser.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/FlagsEnum.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "providers/twitch/PubsubActions.hpp"
|
||||
#include "common/FlagsEnum.hpp"
|
||||
#include "widgets/helper/ScrollbarHighlight.hpp"
|
||||
|
||||
#include <QTime>
|
||||
|
@ -74,8 +74,7 @@ public:
|
|||
|
||||
static std::shared_ptr<Message> createTimeoutMessage(const BanAction &action,
|
||||
uint32_t count = 1);
|
||||
static std::shared_ptr<Message> createUntimeoutMessage(
|
||||
const UnbanAction &action);
|
||||
static std::shared_ptr<Message> createUntimeoutMessage(const UnbanAction &action);
|
||||
};
|
||||
|
||||
using MessagePtr = std::shared_ptr<Message>;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#include "messages/MessageElement.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/Emotemap.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "messages/layouts/MessageLayoutContainer.hpp"
|
||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "common/Emotemap.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "messages/layouts/MessageLayout.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "singletons/EmoteManager.hpp"
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include "messages/layouts/MessageLayoutContainer.hpp"
|
||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
#include "common/FlagsEnum.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/Selection.hpp"
|
||||
#include "common/FlagsEnum.hpp"
|
||||
#include "messages/layouts/MessageLayoutContainer.hpp"
|
||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "providers/bttv/BttvEmotes.hpp"
|
||||
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
@ -37,11 +37,11 @@ void BTTVEmotes::loadGlobalEmotes()
|
|||
|
||||
EmoteData emoteData;
|
||||
emoteData.image1x = new chatterino::Image(getEmoteLink(urlTemplate, id, "1x"), 1, code,
|
||||
code + "<br />Global BTTV Emote");
|
||||
emoteData.image2x = new chatterino::Image(getEmoteLink(urlTemplate, id, "2x"), 0.5, code,
|
||||
code + "<br />Global BTTV Emote");
|
||||
emoteData.image3x = new chatterino::Image(getEmoteLink(urlTemplate, id, "3x"), 0.25, code,
|
||||
code + "<br />Global BTTV Emote");
|
||||
code + "<br />Global BTTV Emote");
|
||||
emoteData.image2x = new chatterino::Image(getEmoteLink(urlTemplate, id, "2x"), 0.5,
|
||||
code, code + "<br />Global BTTV Emote");
|
||||
emoteData.image3x = new chatterino::Image(getEmoteLink(urlTemplate, id, "3x"), 0.25,
|
||||
code, code + "<br />Global BTTV Emote");
|
||||
emoteData.pageLink = "https://manage.betterttv.net/emotes/" + id;
|
||||
|
||||
this->globalEmotes.insert(code, emoteData);
|
||||
|
@ -91,17 +91,17 @@ void BTTVEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr<Emo
|
|||
link.detach();
|
||||
emoteData.image1x =
|
||||
new chatterino::Image(link.replace("{{id}}", id).replace("{{image}}", "1x"), 1,
|
||||
code, code + "<br />Channel BTTV Emote");
|
||||
code, code + "<br />Channel BTTV Emote");
|
||||
link = linkTemplate;
|
||||
link.detach();
|
||||
emoteData.image2x =
|
||||
new chatterino::Image(link.replace("{{id}}", id).replace("{{image}}", "2x"), 0.5,
|
||||
code, code + "<br />Channel BTTV Emote");
|
||||
new chatterino::Image(link.replace("{{id}}", id).replace("{{image}}", "2x"),
|
||||
0.5, code, code + "<br />Channel BTTV Emote");
|
||||
link = linkTemplate;
|
||||
link.detach();
|
||||
emoteData.image3x =
|
||||
new chatterino::Image(link.replace("{{id}}", id).replace("{{image}}", "3x"), 0.25,
|
||||
code, code + "<br />Channel BTTV Emote");
|
||||
new chatterino::Image(link.replace("{{id}}", id).replace("{{image}}", "3x"),
|
||||
0.25, code, code + "<br />Channel BTTV Emote");
|
||||
emoteData.pageLink = "https://manage.betterttv.net/emotes/" + id;
|
||||
|
||||
return emoteData;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/Emotemap.hpp"
|
||||
#include "common/SignalVector.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
#include "common/Emotemap.hpp"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
@ -18,8 +18,7 @@ public:
|
|||
std::map<QString, SignalVector<QString>> channelEmoteCodes;
|
||||
|
||||
void loadGlobalEmotes();
|
||||
void loadChannelEmotes(const QString &channelName,
|
||||
std::weak_ptr<EmoteMap> channelEmoteMap);
|
||||
void loadChannelEmotes(const QString &channelName, std::weak_ptr<EmoteMap> channelEmoteMap);
|
||||
|
||||
private:
|
||||
EmoteMap channelEmoteCache;
|
||||
|
|
|
@ -112,7 +112,7 @@ void Emojis::loadEmojis()
|
|||
|
||||
if (result.Code() != rapidjson::kParseErrorNone) {
|
||||
Log("JSON parse error: {} ({})", rapidjson::GetParseError_En(result.Code()),
|
||||
result.Offset());
|
||||
result.Offset());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -266,8 +266,7 @@ void Emojis::loadEmojiSet()
|
|||
});
|
||||
}
|
||||
|
||||
void Emojis::parse(std::vector<std::tuple<EmoteData, QString>> &parsedWords,
|
||||
const QString &text)
|
||||
void Emojis::parse(std::vector<std::tuple<EmoteData, QString>> &parsedWords, const QString &text)
|
||||
{
|
||||
int lastParsedEmojiEndIndex = 0;
|
||||
|
||||
|
@ -328,13 +327,12 @@ void Emojis::parse(std::vector<std::tuple<EmoteData, QString>> &parsedWords,
|
|||
|
||||
if (charactersFromLastParsedEmoji > 0) {
|
||||
// Add characters inbetween emojis
|
||||
parsedWords.emplace_back(EmoteData(), text.mid(lastParsedEmojiEndIndex,
|
||||
charactersFromLastParsedEmoji));
|
||||
parsedWords.emplace_back(
|
||||
EmoteData(), text.mid(lastParsedEmojiEndIndex, charactersFromLastParsedEmoji));
|
||||
}
|
||||
|
||||
// Push the emoji as a word to parsedWords
|
||||
parsedWords.push_back(
|
||||
std::tuple<EmoteData, QString>(matchedEmoji->emoteData, QString()));
|
||||
parsedWords.push_back(std::tuple<EmoteData, QString>(matchedEmoji->emoteData, QString()));
|
||||
|
||||
lastParsedEmojiEndIndex = currentParsedEmojiEndIndex;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/Emotemap.hpp"
|
||||
#include "common/SignalVector.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
#include "common/Emotemap.hpp"
|
||||
|
||||
#include <QMap>
|
||||
#include <QRegularExpression>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "providers/ffz/FfzEmotes.hpp"
|
||||
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/Emotemap.hpp"
|
||||
#include "common/SignalVector.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
#include "common/Emotemap.hpp"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
@ -18,8 +18,7 @@ public:
|
|||
std::map<QString, SignalVector<QString>> channelEmoteCodes;
|
||||
|
||||
void loadGlobalEmotes();
|
||||
void loadChannelEmotes(const QString &channelName,
|
||||
std::weak_ptr<EmoteMap> channelEmoteMap);
|
||||
void loadChannelEmotes(const QString &channelName, std::weak_ptr<EmoteMap> channelEmoteMap);
|
||||
|
||||
private:
|
||||
ConcurrentMap<int, EmoteData> channelEmoteCache;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "providers/irc/IrcAccount.hpp"
|
||||
#include "providers/irc/AbstractIrcServer.hpp"
|
||||
#include "providers/irc/IrcAccount.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -140,8 +140,7 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
|
|||
auto chan = app->twitch.server->getChannelOrEmpty(chanName);
|
||||
|
||||
if (chan->isEmpty()) {
|
||||
Log("[IrcMessageHandler:handleClearChatMessage] Twitch channel {} not found",
|
||||
chanName);
|
||||
Log("[IrcMessageHandler:handleClearChatMessage] Twitch channel {} not found", chanName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -312,7 +311,7 @@ void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
|
|||
|
||||
if (channel->isEmpty()) {
|
||||
Log("[IrcManager:handleNoticeMessage] Channel {} not found in channel manager ",
|
||||
channelName);
|
||||
channelName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -507,8 +507,8 @@ void PubSub::unlistenAllModerationActions()
|
|||
}
|
||||
}
|
||||
|
||||
void PubSub::listenToChannelModerationActions(
|
||||
const QString &channelID, std::shared_ptr<TwitchAccount> account)
|
||||
void PubSub::listenToChannelModerationActions(const QString &channelID,
|
||||
std::shared_ptr<TwitchAccount> account)
|
||||
{
|
||||
assert(!channelID.isEmpty());
|
||||
assert(account != nullptr);
|
||||
|
@ -527,8 +527,7 @@ void PubSub::listenToChannelModerationActions(
|
|||
this->listenToTopic(topic, account);
|
||||
}
|
||||
|
||||
void PubSub::listenToTopic(const std::string &topic,
|
||||
std::shared_ptr<TwitchAccount> account)
|
||||
void PubSub::listenToTopic(const std::string &topic, std::shared_ptr<TwitchAccount> account)
|
||||
{
|
||||
auto message = createListenMessage({topic}, account);
|
||||
|
||||
|
@ -581,7 +580,7 @@ void PubSub::onMessage(websocketpp::connection_hdl hdl, WebsocketMessagePtr webs
|
|||
|
||||
if (!res) {
|
||||
Log("Error parsing message '{}' from PubSub: {}", payload,
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -713,7 +712,7 @@ void PubSub::handleMessageResponse(const rapidjson::Value &outerData)
|
|||
|
||||
if (!res) {
|
||||
Log("Error parsing message '{}' from PubSub: {}", payload,
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,14 +121,13 @@ public:
|
|||
|
||||
void unlistenAllModerationActions();
|
||||
|
||||
void listenToChannelModerationActions(
|
||||
const QString &channelID, std::shared_ptr<TwitchAccount> account);
|
||||
void listenToChannelModerationActions(const QString &channelID,
|
||||
std::shared_ptr<TwitchAccount> account);
|
||||
|
||||
std::vector<std::unique_ptr<rapidjson::Document>> requests;
|
||||
|
||||
private:
|
||||
void listenToTopic(const std::string &topic,
|
||||
std::shared_ptr<TwitchAccount> account);
|
||||
void listenToTopic(const std::string &topic, std::shared_ptr<TwitchAccount> account);
|
||||
|
||||
void listen(rapidjson::Document &&msg);
|
||||
bool tryListen(rapidjson::Document &msg);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "providers/twitch/TwitchAccount.hpp"
|
||||
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "common/NetworkRequest.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "providers/twitch/TwitchAccountManager.hpp"
|
||||
|
||||
#include "common/Common.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
@ -123,11 +123,10 @@ void TwitchAccountManager::load()
|
|||
auto user = this->findUserByUsername(newUsername);
|
||||
if (user) {
|
||||
Log("[AccountManager:currentUsernameChanged] User successfully updated to {}",
|
||||
newUsername);
|
||||
newUsername);
|
||||
this->currentUser = user;
|
||||
} else {
|
||||
Log(
|
||||
"[AccountManager:currentUsernameChanged] User successfully updated to anonymous");
|
||||
Log("[AccountManager:currentUsernameChanged] User successfully updated to anonymous");
|
||||
this->currentUser = this->anonymousUser;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
|
||||
#include "common/Common.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "providers/twitch/Pubsub.hpp"
|
||||
|
@ -9,7 +10,6 @@
|
|||
#include "singletons/IrcManager.hpp"
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "util/PostToThread.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
|
||||
#include <IrcConnection>
|
||||
#include <QThread>
|
||||
|
@ -84,7 +84,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
|
|||
}
|
||||
|
||||
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->name + "/chatters",
|
||||
QThread::currentThread(), refreshChatters);
|
||||
QThread::currentThread(), refreshChatters);
|
||||
};
|
||||
|
||||
doRefreshChatters();
|
||||
|
@ -145,7 +145,7 @@ void TwitchChannel::sendMessage(const QString &message)
|
|||
// manager" dialog
|
||||
this->addMessage(
|
||||
chatterino::Message::createSystemMessage("You need to log in to send messages. You can "
|
||||
"link your Twitch account in the settings."));
|
||||
"link your Twitch account in the settings."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ void TwitchChannel::addJoinedUser(const QString &user)
|
|||
std::lock_guard<std::mutex> guard(this->joinedUserMutex);
|
||||
|
||||
auto message = chatterino::Message::createSystemMessage("Users joined: " +
|
||||
this->joinedUsers.join(", "));
|
||||
this->joinedUsers.join(", "));
|
||||
message->flags |= chatterino::Message::Collapsed;
|
||||
this->addMessage(message);
|
||||
this->joinedUsers.clear();
|
||||
|
@ -263,7 +263,7 @@ void TwitchChannel::addPartedUser(const QString &user)
|
|||
std::lock_guard<std::mutex> guard(this->partedUserMutex);
|
||||
|
||||
auto message = chatterino::Message::createSystemMessage("Users parted: " +
|
||||
this->partedUsers.join(", "));
|
||||
this->partedUsers.join(", "));
|
||||
message->flags |= chatterino::Message::Collapsed;
|
||||
this->addMessage(message);
|
||||
this->partedUsers.clear();
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
#include "common/Channel.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "common/MutexValue.hpp"
|
||||
#include "singletons/EmoteManager.hpp"
|
||||
#include "singletons/IrcManager.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
#include "common/MutexValue.hpp"
|
||||
|
||||
#include <pajlada/signals/signalholder.hpp>
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/Emotemap.hpp"
|
||||
#include "providers/twitch/EmoteValue.hpp"
|
||||
#include "providers/twitch/TwitchAccount.hpp"
|
||||
#include "providers/twitch/TwitchEmotes.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
#include "common/Emotemap.hpp"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
|
|
@ -32,8 +32,7 @@ void TwitchServer::initialize()
|
|||
[this]() { postToThread([this] { this->connect(); }); });
|
||||
}
|
||||
|
||||
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
|
||||
bool isWrite)
|
||||
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead, bool isWrite)
|
||||
{
|
||||
std::shared_ptr<TwitchAccount> account = getApp()->accounts->twitch.getCurrent();
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include <QtGlobal>
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "WindowManager.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#define DEFAULT_FONT_FAMILY "Segoe UI"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
//#include <future>
|
||||
|
||||
//using namespace chatterino::messages;
|
||||
// using namespace chatterino::messages;
|
||||
|
||||
// void IrcManager::refreshIgnoredUsers(const QString &username, const QString &oauthClient,
|
||||
// const QString &oauthToken)
|
||||
|
|
|
@ -75,9 +75,9 @@ void UpdateManager::installUpdates()
|
|||
return false;
|
||||
}
|
||||
|
||||
QProcess::startDetached(combinePath(QCoreApplication::applicationDirPath(),
|
||||
"updater.1/ChatterinoUpdater.exe"),
|
||||
{filename, "restart"});
|
||||
QProcess::startDetached(
|
||||
combinePath(QCoreApplication::applicationDirPath(), "updater.1/ChatterinoUpdater.exe"),
|
||||
{filename, "restart"});
|
||||
|
||||
QApplication::exit(0);
|
||||
return false;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include "WindowManager.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
#include "singletons/FontManager.hpp"
|
||||
#include "singletons/PathManager.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "util/Clamp.hpp"
|
||||
#include "widgets/AccountSwitchPopupWidget.hpp"
|
||||
#include "widgets/dialogs/SettingsDialog.hpp"
|
||||
|
@ -169,8 +169,7 @@ void WindowManager::initialize()
|
|||
|
||||
// get type
|
||||
QString type_val = window_obj.value("type").toString();
|
||||
Window::WindowType type =
|
||||
type_val == "main" ? Window::Main : Window::Popup;
|
||||
Window::WindowType type = type_val == "main" ? Window::Main : Window::Popup;
|
||||
|
||||
if (type == Window::Main && mainWindow != nullptr) {
|
||||
type = Window::Popup;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "AccountSwitchWidget.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
#include "debug/Log.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/dialogs/SettingsDialog.hpp"
|
||||
#include "widgets/helper/NotebookButton.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/helper/Shortcut.hpp"
|
||||
#include "widgets/dialogs/SettingsDialog.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
|
|
|
@ -16,7 +16,8 @@ QualityPopup::QualityPopup(const QString &_channelName, QStringList options)
|
|||
&QualityPopup::cancelButtonClicked);
|
||||
|
||||
this->ui_.buttonBox.addButton(&this->ui_.okButton, QDialogButtonBox::ButtonRole::AcceptRole);
|
||||
this->ui_.buttonBox.addButton(&this->ui_.cancelButton, QDialogButtonBox::ButtonRole::RejectRole);
|
||||
this->ui_.buttonBox.addButton(&this->ui_.cancelButton,
|
||||
QDialogButtonBox::ButtonRole::RejectRole);
|
||||
|
||||
this->ui_.selector.addItems(options);
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#include "UserInfoPopup.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "singletons/ResourceManager.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "util/PostToThread.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
#include "widgets/helper/Line.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDesktopServices>
|
||||
|
@ -86,8 +86,7 @@ UserInfoPopup::UserInfoPopup()
|
|||
|
||||
// userstate
|
||||
this->userStateChanged.connect([this, mod, unmod]() mutable {
|
||||
TwitchChannel *twitchChannel =
|
||||
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
TwitchChannel *twitchChannel = dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
|
||||
if (twitchChannel) {
|
||||
qDebug() << this->userName_;
|
||||
|
@ -111,8 +110,7 @@ UserInfoPopup::UserInfoPopup()
|
|||
auto timeout = moderation.emplace<TimeoutWidget>();
|
||||
|
||||
this->userStateChanged.connect([this, lineMod, timeout]() mutable {
|
||||
TwitchChannel *twitchChannel =
|
||||
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
TwitchChannel *twitchChannel = dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
|
||||
if (twitchChannel) {
|
||||
lineMod->setVisible(twitchChannel->hasModRights());
|
||||
|
@ -171,8 +169,7 @@ void UserInfoPopup::installEvents()
|
|||
|
||||
this->ui_.follow->setEnabled(false);
|
||||
if (this->ui_.follow->isChecked()) {
|
||||
twitchApiPut(requestUrl,
|
||||
[this](QJsonObject) { this->ui_.follow->setEnabled(true); });
|
||||
twitchApiPut(requestUrl, [this](QJsonObject) { this->ui_.follow->setEnabled(true); });
|
||||
} else {
|
||||
twitchApiDelete(requestUrl, [this] { this->ui_.follow->setEnabled(true); });
|
||||
}
|
||||
|
@ -306,8 +303,7 @@ void UserInfoPopup::loadAvatar(const QUrl &url)
|
|||
UserInfoPopup::TimeoutWidget::TimeoutWidget()
|
||||
: BaseWidget(nullptr)
|
||||
{
|
||||
auto layout =
|
||||
LayoutCreator<TimeoutWidget>(this).setLayoutType<QHBoxLayout>().withoutMargin();
|
||||
auto layout = LayoutCreator<TimeoutWidget>(this).setLayoutType<QHBoxLayout>().withoutMargin();
|
||||
|
||||
QColor color1(255, 255, 255, 80);
|
||||
QColor color2(255, 255, 255, 0);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
#include "ChannelView.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "util/DistanceBetweenPoints.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/TooltipWidget.hpp"
|
||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QDebug>
|
||||
|
@ -271,7 +271,8 @@ QString ChannelView::getSelectedText()
|
|||
{
|
||||
QString result = "";
|
||||
|
||||
chatterino::LimitedQueueSnapshot<MessageLayoutPtr> messagesSnapshot = this->getMessagesSnapshot();
|
||||
chatterino::LimitedQueueSnapshot<MessageLayoutPtr> messagesSnapshot =
|
||||
this->getMessagesSnapshot();
|
||||
|
||||
Selection _selection = this->selection_;
|
||||
|
||||
|
@ -436,7 +437,7 @@ void ChannelView::setChannel(ChannelPtr newChannel)
|
|||
auto snapshot = this->messages.getSnapshot();
|
||||
if (index >= snapshot.getLength()) {
|
||||
Log("Tried to replace out of bounds message. Index: {}. Length: {}", index,
|
||||
snapshot.getLength());
|
||||
snapshot.getLength());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -882,8 +883,7 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
|||
if (this->isMouseDown_) {
|
||||
this->isMouseDown_ = false;
|
||||
|
||||
if (fabsf(distanceBetweenPoints(this->lastPressPosition_, event->screenPos())) >
|
||||
15.f) {
|
||||
if (fabsf(distanceBetweenPoints(this->lastPressPosition_, event->screenPos())) > 15.f) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
@ -893,8 +893,8 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
|||
if (this->isRightMouseDown_) {
|
||||
this->isRightMouseDown_ = false;
|
||||
|
||||
if (fabsf(distanceBetweenPoints(this->lastRightPressPosition_,
|
||||
event->screenPos())) > 15.f) {
|
||||
if (fabsf(distanceBetweenPoints(this->lastRightPressPosition_, event->screenPos())) >
|
||||
15.f) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
#include "common/Channel.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "messages/Selection.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
#include "widgets/Scrollbar.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QScroller>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "widgets/helper/NotebookButton.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "widgets/helper/RippleEffectButton.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/helper/RippleEffectButton.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
|
|
@ -203,4 +203,4 @@ QCompleter *ResizingTextEdit::getCompleter() const
|
|||
return this->completer;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -41,4 +41,4 @@ private slots:
|
|||
void insertCompletion(const QString &completion);
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
#include "widgets/helper/RippleEffectButton.hpp"
|
||||
#include "widgets/helper/SignalLabel.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
|
|
@ -16,8 +16,7 @@ class SettingsDialogTab : public BaseWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SettingsDialogTab(SettingsDialog *dialog, SettingsPage *page,
|
||||
QString imageFileName);
|
||||
SettingsDialogTab(SettingsDialog *dialog, SettingsPage *page, QString imageFileName);
|
||||
|
||||
void setSelected(bool selected);
|
||||
SettingsPage *getSettingsPage();
|
||||
|
|
|
@ -36,4 +36,4 @@ void SignalLabel::mouseMoveEvent(QMouseEvent *event)
|
|||
event->ignore();
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -29,4 +29,4 @@ protected:
|
|||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include "AccountsPage.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/accounts/AccountModel.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "widgets/helper/EditableModelView.hpp"
|
||||
#include "widgets/dialogs/LoginDialog.hpp"
|
||||
#include "widgets/helper/EditableModelView.hpp"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QHeaderView>
|
||||
|
|
|
@ -40,8 +40,7 @@ CommandPage::CommandPage()
|
|||
view->setTitles({"Trigger", "Command"});
|
||||
view->getTableView()->horizontalHeader()->setStretchLastSection(true);
|
||||
view->addButtonPressed.connect([] {
|
||||
getApp()->commands->items.appendItem(
|
||||
Command{"/command", "I made a new command HeyGuys"});
|
||||
getApp()->commands->items.appendItem(Command{"/command", "I made a new command HeyGuys"});
|
||||
});
|
||||
|
||||
layout.append(this->createCheckBox("Also match the trigger at the end of the message",
|
||||
|
|
|
@ -44,8 +44,7 @@ HighlightingPage::HighlightingPage()
|
|||
auto highlights = tabs.appendTab(new QVBoxLayout, "Highlights");
|
||||
{
|
||||
EditableModelView *view =
|
||||
highlights
|
||||
.emplace<EditableModelView>(app->highlights->createModel(nullptr))
|
||||
highlights.emplace<EditableModelView>(app->highlights->createModel(nullptr))
|
||||
.getElement();
|
||||
|
||||
view->setTitles({"Pattern", "Flash taskbar", "Play sound", "Regex"});
|
||||
|
|
|
@ -64,8 +64,7 @@ IgnoreUsersPage::IgnoreUsersPage()
|
|||
auto messages = tabs.appendTab(new QVBoxLayout, "Messages");
|
||||
{
|
||||
EditableModelView *view =
|
||||
messages.emplace<EditableModelView>(app->ignores->createModel(nullptr))
|
||||
.getElement();
|
||||
messages.emplace<EditableModelView>(app->ignores->createModel(nullptr)).getElement();
|
||||
view->setTitles({"Pattern", "Regex"});
|
||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
|
@ -77,8 +76,7 @@ IgnoreUsersPage::IgnoreUsersPage()
|
|||
});
|
||||
|
||||
view->addButtonPressed.connect([] {
|
||||
getApp()->ignores->phrases.appendItem(
|
||||
IgnorePhrase{"my phrase", false});
|
||||
getApp()->ignores->phrases.appendItem(IgnorePhrase{"my phrase", false});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "Application.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "providers/twitch/EmoteValue.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||
|
@ -10,17 +11,16 @@
|
|||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/StreamLink.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/dialogs/QualityPopup.hpp"
|
||||
#include "widgets/dialogs/SelectChannelDialog.hpp"
|
||||
#include "widgets/dialogs/TextInputDialog.hpp"
|
||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||
#include "widgets/helper/DebugPopup.hpp"
|
||||
#include "widgets/helper/SearchPopup.hpp"
|
||||
#include "widgets/helper/Shortcut.hpp"
|
||||
#include "widgets/splits/SplitOverlay.hpp"
|
||||
#include "widgets/dialogs/QualityPopup.hpp"
|
||||
#include "widgets/dialogs/SelectChannelDialog.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/dialogs/TextInputDialog.hpp"
|
||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/splits/SplitOverlay.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
|
@ -449,18 +449,18 @@ void Split::doOpenViewerList()
|
|||
}
|
||||
auto loadingLabel = new QLabel("Loading...");
|
||||
|
||||
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->getChannel()->name + "/chatters",
|
||||
this, [=](QJsonObject obj) {
|
||||
QJsonObject chattersObj = obj.value("chatters").toObject();
|
||||
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->getChannel()->name + "/chatters", this,
|
||||
[=](QJsonObject obj) {
|
||||
QJsonObject chattersObj = obj.value("chatters").toObject();
|
||||
|
||||
loadingLabel->hide();
|
||||
for (int i = 0; i < jsonLabels.size(); i++) {
|
||||
chattersList->addItem(labelList.at(i));
|
||||
foreach (const QJsonValue &v,
|
||||
chattersObj.value(jsonLabels.at(i)).toArray())
|
||||
chattersList->addItem(v.toString());
|
||||
}
|
||||
});
|
||||
loadingLabel->hide();
|
||||
for (int i = 0; i < jsonLabels.size(); i++) {
|
||||
chattersList->addItem(labelList.at(i));
|
||||
foreach (const QJsonValue &v,
|
||||
chattersObj.value(jsonLabels.at(i)).toArray())
|
||||
chattersList->addItem(v.toString());
|
||||
}
|
||||
});
|
||||
|
||||
searchBar->setPlaceholderText("Search User...");
|
||||
QObject::connect(searchBar, &QLineEdit::textEdited, this, [=]() {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/Channel.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "common/NullablePtr.hpp"
|
||||
#include "common/SerializeCustom.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/helper/ChannelView.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "Application.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#include "widgets/splits/SplitHeader.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
#include "singletons/ResourceManager.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
#include "widgets/TooltipWidget.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/TooltipWidget.hpp"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QDrag>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "widgets/splits/SplitInput.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "controllers/commands/CommandController.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
|
@ -8,7 +9,6 @@
|
|||
#include "singletons/SettingsManager.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "widgets/helper/ResizingTextEdit.hpp"
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/dialogs/EmotePopup.hpp"
|
||||
#include "widgets/helper/ResizingTextEdit.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
|
Loading…
Reference in a new issue