mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Massage includes some more (#4294)
* Add `<functional>` include to QStringHash.hpp This ensures the base `std::hash` template is declared before this specialization * Add missing includes to `src/providers/twitch/TwitchAccountManager.hpp` * Move explicit HelixChatters constructor to the source file * Remove unused includes & add used includes to NicknamesModel.hpp * NicknamesModel.hpp: Remove `virtual` when `override` is used * Add missing QStringHash include to TwitchEmotes.cpp * Add missing includes to various files * Print Qt version in cmake step Technically unrelated, but I'm sneaking it in * Add changelog entry
This commit is contained in:
parent
c0f0a7e555
commit
18cb4bd6e5
|
@ -25,7 +25,7 @@
|
||||||
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
||||||
- Dev: Migrated to C++ 20 (#4252, #4257)
|
- Dev: Migrated to C++ 20 (#4252, #4257)
|
||||||
- Dev: Enable LTO for main branch builds. (#4258, #4260)
|
- Dev: Enable LTO for main branch builds. (#4258, #4260)
|
||||||
- Dev: Removed unused include directives. (#4266, #4275)
|
- Dev: Removed unused include directives. (#4266, #4275, #4294)
|
||||||
- Dev: Removed TooltipPreviewImage. (#4268)
|
- Dev: Removed TooltipPreviewImage. (#4268)
|
||||||
- Dev: Removed unused operators in `Image` (#4267)
|
- Dev: Removed unused operators in `Image` (#4267)
|
||||||
- Dev: Removed usage of deprecated `QDesktopWidget` (#4287)
|
- Dev: Removed usage of deprecated `QDesktopWidget` (#4287)
|
||||||
|
|
|
@ -64,6 +64,8 @@ find_package(Qt${MAJOR_QT_VERSION} REQUIRED
|
||||||
Concurrent
|
Concurrent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
message(STATUS "Qt version: ${Qt${MAJOR_QT_VERSION}_VERSION}")
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
find_package(WinToast REQUIRED)
|
find_package(WinToast REQUIRED)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
#include "controllers/nicknames/NicknamesModel.hpp"
|
#include "controllers/nicknames/NicknamesModel.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
|
||||||
#include "controllers/nicknames/Nickname.hpp"
|
#include "controllers/nicknames/Nickname.hpp"
|
||||||
#include "providers/twitch/api/Helix.hpp"
|
|
||||||
#include "singletons/Settings.hpp"
|
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class Nickname;
|
class Nickname;
|
||||||
|
@ -15,12 +17,12 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// turn a vector item into a model row
|
// turn a vector item into a model row
|
||||||
virtual Nickname getItemFromRow(std::vector<QStandardItem *> &row,
|
Nickname getItemFromRow(std::vector<QStandardItem *> &row,
|
||||||
const Nickname &original) override;
|
const Nickname &original) override;
|
||||||
|
|
||||||
// turns a row in the model into a vector item
|
// turns a row in the model into a vector item
|
||||||
virtual void getRowFromItem(const Nickname &item,
|
void getRowFromItem(const Nickname &item,
|
||||||
std::vector<QStandardItem *> &row) override;
|
std::vector<QStandardItem *> &row) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
#include "providers/seventv/eventapi/SeventvEventAPISubscription.hpp"
|
#include "providers/seventv/eventapi/SeventvEventAPISubscription.hpp"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
using namespace chatterino;
|
using namespace chatterino;
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
|
|
||||||
#include "common/ChatterinoSetting.hpp"
|
#include "common/ChatterinoSetting.hpp"
|
||||||
#include "common/SignalVector.hpp"
|
#include "common/SignalVector.hpp"
|
||||||
|
#include "util/QStringHash.hpp"
|
||||||
#include "util/RapidJsonSerializeQString.hpp"
|
#include "util/RapidJsonSerializeQString.hpp"
|
||||||
|
|
||||||
#include <boost/signals2.hpp>
|
#include <boost/signals2.hpp>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
#ifndef ATTR_UNUSED
|
#ifndef ATTR_UNUSED
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#include "providers/twitch/TwitchEmotes.hpp"
|
#include "providers/twitch/TwitchEmotes.hpp"
|
||||||
|
|
||||||
|
#include "common/QLogging.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
#include "messages/Image.hpp"
|
#include "messages/Image.hpp"
|
||||||
|
#include "util/QStringHash.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,19 @@ namespace chatterino {
|
||||||
|
|
||||||
static IHelix *instance = nullptr;
|
static IHelix *instance = nullptr;
|
||||||
|
|
||||||
|
HelixChatters::HelixChatters(const QJsonObject &jsonObject)
|
||||||
|
: total(jsonObject.value("total").toInt())
|
||||||
|
, cursor(
|
||||||
|
jsonObject.value("pagination").toObject().value("cursor").toString())
|
||||||
|
{
|
||||||
|
const auto &data = jsonObject.value("data").toArray();
|
||||||
|
for (const auto &chatter : data)
|
||||||
|
{
|
||||||
|
auto userLogin = chatter.toObject().value("user_login").toString();
|
||||||
|
this->chatters.insert(userLogin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Helix::fetchUsers(QStringList userIds, QStringList userLogins,
|
void Helix::fetchUsers(QStringList userIds, QStringList userLogins,
|
||||||
ResultCallback<std::vector<HelixUser>> successCallback,
|
ResultCallback<std::vector<HelixUser>> successCallback,
|
||||||
HelixFailureCallback failureCallback)
|
HelixFailureCallback failureCallback)
|
||||||
|
|
|
@ -357,20 +357,7 @@ struct HelixChatters {
|
||||||
|
|
||||||
HelixChatters() = default;
|
HelixChatters() = default;
|
||||||
|
|
||||||
explicit HelixChatters(const QJsonObject &jsonObject)
|
explicit HelixChatters(const QJsonObject &jsonObject);
|
||||||
: total(jsonObject.value("total").toInt())
|
|
||||||
, cursor(jsonObject.value("pagination")
|
|
||||||
.toObject()
|
|
||||||
.value("cursor")
|
|
||||||
.toString())
|
|
||||||
{
|
|
||||||
const auto &data = jsonObject.value("data").toArray();
|
|
||||||
for (const auto &chatter : data)
|
|
||||||
{
|
|
||||||
auto userLogin = chatter.toObject().value("user_login").toString();
|
|
||||||
this->chatters.insert(userLogin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
using HelixModerator = HelixVip;
|
using HelixModerator = HelixVip;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QStringRef>
|
#include <QStringRef>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class RatelimitBucket : public QObject
|
class RatelimitBucket : public QObject
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "widgets/listview/GenericListItem.hpp"
|
#include "widgets/listview/GenericListItem.hpp"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "widgets/listview/GenericListModel.hpp"
|
#include "widgets/listview/GenericListModel.hpp"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue