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: Migrated to C++ 20 (#4252, #4257)
|
||||
- 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 unused operators in `Image` (#4267)
|
||||
- Dev: Removed usage of deprecated `QDesktopWidget` (#4287)
|
||||
|
|
|
@ -64,6 +64,8 @@ find_package(Qt${MAJOR_QT_VERSION} REQUIRED
|
|||
Concurrent
|
||||
)
|
||||
|
||||
message(STATUS "Qt version: ${Qt${MAJOR_QT_VERSION}_VERSION}")
|
||||
|
||||
if (WIN32)
|
||||
find_package(WinToast REQUIRED)
|
||||
endif ()
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#include "controllers/nicknames/NicknamesModel.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "controllers/nicknames/Nickname.hpp"
|
||||
#include "providers/twitch/api/Helix.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "util/StandardItemHelper.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <QObject>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class Nickname;
|
||||
|
@ -15,11 +17,11 @@ public:
|
|||
|
||||
protected:
|
||||
// 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;
|
||||
|
||||
// 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;
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <boost/variant.hpp>
|
||||
#include <QMap>
|
||||
#include <QRegularExpression>
|
||||
#include <QVector>
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#include "providers/seventv/eventapi/SeventvEventAPISubscription.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace chatterino;
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
|
||||
#include "common/ChatterinoSetting.hpp"
|
||||
#include "common/SignalVector.hpp"
|
||||
#include "util/QStringHash.hpp"
|
||||
#include "util/RapidJsonSerializeQString.hpp"
|
||||
|
||||
#include <boost/signals2.hpp>
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#include <QColor>
|
||||
#include <QString>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
#ifndef ATTR_UNUSED
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include "providers/twitch/TwitchEmotes.hpp"
|
||||
|
||||
#include "common/QLogging.hpp"
|
||||
#include "messages/Emote.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "util/QStringHash.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -22,6 +22,19 @@ namespace chatterino {
|
|||
|
||||
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,
|
||||
ResultCallback<std::vector<HelixUser>> successCallback,
|
||||
HelixFailureCallback failureCallback)
|
||||
|
|
|
@ -357,20 +357,7 @@ struct HelixChatters {
|
|||
|
||||
HelixChatters() = default;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
explicit HelixChatters(const QJsonObject &jsonObject);
|
||||
};
|
||||
|
||||
using HelixModerator = HelixVip;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <QStringRef>
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#include <QHash>
|
||||
#include <QString>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace std {
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class RatelimitBucket : public QObject
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <deque>
|
||||
#include <mutex>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "widgets/listview/GenericListItem.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "widgets/listview/GenericListModel.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
Loading…
Reference in a new issue