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:
pajlada 2023-01-08 13:07:06 +01:00 committed by GitHub
parent c0f0a7e555
commit 18cb4bd6e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 43 additions and 22 deletions

View file

@ -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)

View file

@ -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 ()

View file

@ -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 {

View file

@ -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;
};

View file

@ -4,6 +4,7 @@
#include <memory>
#include <unordered_map>
#include <vector>
namespace chatterino {

View file

@ -5,6 +5,7 @@
#include <boost/variant.hpp>
#include <QMap>
#include <QRegularExpression>
#include <QVector>
#include <map>
#include <set>

View file

@ -1,8 +1,11 @@
#include "providers/seventv/eventapi/SeventvEventAPISubscription.hpp"
#include <QDebug>
#include <QJsonDocument>
#include <QJsonObject>
#include <tuple>
namespace {
using namespace chatterino;

View file

@ -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>

View file

@ -3,6 +3,8 @@
#include <QColor>
#include <QString>
#include <vector>
namespace chatterino {
#ifndef ATTR_UNUSED

View file

@ -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 {

View file

@ -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)

View file

@ -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;

View file

@ -5,6 +5,7 @@
#include <QStringRef>
#include <cmath>
#include <vector>
namespace chatterino {

View file

@ -3,6 +3,8 @@
#include <QHash>
#include <QString>
#include <functional>
namespace std {
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)

View file

@ -4,6 +4,8 @@
#include <QObject>
#include <QString>
#include <functional>
namespace chatterino {
class RatelimitBucket : public QObject

View file

@ -6,6 +6,7 @@
#include <deque>
#include <mutex>
#include <utility>
#include <vector>
namespace chatterino {

View file

@ -3,6 +3,7 @@
#include "widgets/listview/GenericListItem.hpp"
#include <functional>
#include <memory>
namespace chatterino {

View file

@ -4,6 +4,7 @@
#include "widgets/listview/GenericListModel.hpp"
#include <functional>
#include <memory>
namespace chatterino {