Fix warnings that occured on linux using clang
This commit is contained in:
@@ -254,7 +254,7 @@ CommandManager::Command::Command(QString _text)
|
||||
int index = _text.indexOf(' ');
|
||||
|
||||
if (index == -1) {
|
||||
this->name == _text;
|
||||
this->name = _text;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,8 @@ QString GetFFZEmoteLink(const QJsonObject &urls, const QString &emoteScale)
|
||||
return "http:" + emote.toString();
|
||||
}
|
||||
|
||||
void FillInFFZEmoteData(const QJsonObject &urls, const QString &code, const QString &tooltip, util::EmoteData &emoteData)
|
||||
void FillInFFZEmoteData(const QJsonObject &urls, const QString &code, const QString &tooltip,
|
||||
util::EmoteData &emoteData)
|
||||
{
|
||||
QString url1x = GetFFZEmoteLink(urls, "1");
|
||||
QString url2x = GetFFZEmoteLink(urls, "2");
|
||||
@@ -139,7 +140,7 @@ void EmoteManager::reloadBTTVChannelEmotes(const QString &channelName,
|
||||
|
||||
link = link.replace("{{id}}", id).replace("{{image}}", "1x");
|
||||
|
||||
auto emote = this->getBTTVChannelEmoteFromCaches().getOrAdd(id, [this, &code, &link] {
|
||||
auto emote = this->getBTTVChannelEmoteFromCaches().getOrAdd(id, [&code, &link] {
|
||||
return util::EmoteData(new Image(link, 1, code, code + "<br/>Channel BTTV Emote"));
|
||||
});
|
||||
|
||||
@@ -186,13 +187,12 @@ void EmoteManager::reloadFFZChannelEmotes(const QString &channelName,
|
||||
|
||||
QJsonObject urls = emoteObject.value("urls").toObject();
|
||||
|
||||
auto emote =
|
||||
this->getFFZChannelEmoteFromCaches().getOrAdd(id, [this, &code, &urls] {
|
||||
util::EmoteData emoteData;
|
||||
FillInFFZEmoteData(urls, code, code + "<br/>Channel FFZ Emote", emoteData);
|
||||
auto emote = this->getFFZChannelEmoteFromCaches().getOrAdd(id, [&code, &urls] {
|
||||
util::EmoteData emoteData;
|
||||
FillInFFZEmoteData(urls, code, code + "<br/>Channel FFZ Emote", emoteData);
|
||||
|
||||
return emoteData;
|
||||
});
|
||||
return emoteData;
|
||||
});
|
||||
|
||||
this->ffzChannelEmotes.insert(code, emote);
|
||||
map->insert(code, emote);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "singletons/helper/chatterinosetting.hpp"
|
||||
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
||||
void _registerSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting)
|
||||
{
|
||||
_actuallyRegisterSetting(setting);
|
||||
}
|
||||
|
||||
} // namespace singletons
|
||||
} // namespace chatterino
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
||||
static void _registerSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting);
|
||||
void _registerSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting);
|
||||
|
||||
template <typename Type>
|
||||
class ChatterinoSetting : public pajlada::Settings::Setting<Type>
|
||||
@@ -21,8 +21,6 @@ public:
|
||||
_registerSetting(this->data);
|
||||
}
|
||||
|
||||
void saveRecall();
|
||||
|
||||
ChatterinoSetting &operator=(const Type &newValue)
|
||||
{
|
||||
assert(this->data != nullptr);
|
||||
|
||||
@@ -88,6 +88,7 @@ QString LoggingChannel::generateClosingString(const QDateTime &now) const
|
||||
|
||||
void LoggingChannel::appendLine(const QString &line)
|
||||
{
|
||||
/*
|
||||
auto a1 = line.toUtf8();
|
||||
auto a2 = line.toLatin1();
|
||||
auto a3 = line.toLocal8Bit();
|
||||
@@ -95,6 +96,7 @@ void LoggingChannel::appendLine(const QString &line)
|
||||
auto a4 = line.data();
|
||||
|
||||
auto a5 = line.toStdString();
|
||||
*/
|
||||
|
||||
// this->fileHandle.write(a5.c_str(), a5.length());
|
||||
// this->fileHandle.write(a5.c_str(), a5.length());
|
||||
|
||||
@@ -282,11 +282,11 @@ ResourceManager::ResourceManager()
|
||||
, cheerBadge1000(lli(":/images/cheer1000"))
|
||||
, cheerBadge100(lli(":/images/cheer100"))
|
||||
, cheerBadge1(lli(":/images/cheer1"))
|
||||
, buttonBan(lli(":/images/button_ban.png", 0.25))
|
||||
, buttonTimeout(lli(":/images/button_timeout.png", 0.25))
|
||||
, moderationmode_enabled(lli(":/images/moderatormode_enabled"))
|
||||
, moderationmode_disabled(lli(":/images/moderatormode_disabled"))
|
||||
, splitHeaderContext(lli(":/images/tool_moreCollapser_off16.png"))
|
||||
, buttonBan(lli(":/images/button_ban.png", 0.25))
|
||||
, buttonTimeout(lli(":/images/button_timeout.png", 0.25))
|
||||
{
|
||||
this->loadDynamicTwitchBadges();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace singletons {
|
||||
|
||||
std::vector<std::weak_ptr<pajlada::Settings::ISettingData>> _settings;
|
||||
|
||||
void _registerSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting)
|
||||
void _actuallyRegisterSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting)
|
||||
{
|
||||
_settings.push_back(setting);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
||||
static void _registerSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting);
|
||||
void _actuallyRegisterSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting);
|
||||
|
||||
class SettingManager : public QObject
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user