Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into chatterino7
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Aug 18, 2024
2 parents be0fb08 + 998920d commit e67b8aa
Show file tree
Hide file tree
Showing 83 changed files with 962 additions and 3,104 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:

- name: Setup sccache (Windows)
# sccache v0.7.4
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
if: startsWith(matrix.os, 'windows')
with:
variant: sccache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: sudo apt-get -y install dos2unix

- name: Check formatting
uses: DoozyX/clang-format-lint-action@v0.17
uses: DoozyX/clang-format-lint-action@v0.18
with:
source: "./src ./tests/src ./benchmarks/src ./mocks/include"
extensions: "hpp,cpp"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

- name: Setup sccache
# sccache v0.7.4
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
# only save on the default (master) branch
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Minor: Replying to a message will now display the message being replied to. (#4350, #5519)
- Minor: Links can now have prefixes and suffixes such as parentheses. (#5486, #5515)
- Minor: Added support for scrolling in splits with touchscreen panning gestures. (#5524)
- Minor: Removed experimental IRC support. (#5547)
- Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426)
- Bugfix: If a network request errors with 200 OK, Qt's error code is now reported instead of the HTTP status. (#5378)
- Bugfix: Fixed restricted users usernames not being clickable. (#5405)
Expand All @@ -32,6 +33,7 @@
- Bugfix: Fixed a crash when tab completing while having an invalid plugin loaded. (#5401)
- Bugfix: Fixed windows on Windows not saving correctly when snapping them to the edges. (#5478)
- Bugfix: Fixed user info card popups adding duplicate line to log files. (#5499)
- Bugfix: Fixed tooltips and input completion popups not working after moving a split. (#5541)
- Bugfix: Fixed `/clearmessages` not working with more than one window. (#5489)
- Bugfix: Fixed splits staying paused after unfocusing Chatterino in certain configurations. (#5504)
- Bugfix: Links with invalid characters in the domain are no longer detected. (#5509)
Expand All @@ -55,10 +57,16 @@
- Dev: Refactor/unsingletonize `UserDataController`. (#5459)
- Dev: Cleanup `BrowserExtension`. (#5465)
- Dev: Deprecate Qt 5.12. (#5396)
- Dev: Refactored `MessageFlag` into its own file. (#5549)
- Dev: The running Qt version is now shown in the about page if it differs from the compiled version. (#5501)
- Dev: `FlagsEnum` is now `constexpr`. (#5510)
- Dev: Documented and added tests to RTL handling. (#5473)
- Dev: Refactored 7TV/BTTV definitions out of `TwitchIrcServer` into `Application`. (#5532)
- Dev: Refactored code that's responsible for deleting old update files. (#5535)
- Dev: Cleanly exit on shutdown. (#5537)
- Dev: Renamed threads created by Chatterino on Linux and Windows. (#5538, #5539, #5544)
- Dev: Refactored a few `#define`s into `const(expr)` and cleaned includes. (#5527)
- Dev: Added `FlagsEnum::isEmpty`. (#5550)
- Dev: Prepared for Qt 6.8 by addressing some deprecations. (#5529)

## 2.5.1
Expand Down
2 changes: 1 addition & 1 deletion lib/expected-lite
11 changes: 11 additions & 0 deletions mocks/include/mocks/BaseApplication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "mocks/DisabledStreamerMode.hpp"
#include "mocks/EmptyApplication.hpp"
#include "providers/bttv/BttvLiveUpdates.hpp"
#include "singletons/Settings.hpp"

#include <QString>
Expand Down Expand Up @@ -30,6 +31,16 @@ class BaseApplication : public EmptyApplication
return &this->streamerMode;
}

BttvLiveUpdates *getBttvLiveUpdates() override
{
return nullptr;
}

SeventvEventAPI *getSeventvEventAPI() override
{
return nullptr;
}

Settings settings;
DisabledStreamerMode streamerMode;
};
Expand Down
4 changes: 4 additions & 0 deletions mocks/include/mocks/DisabledStreamerMode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ class DisabledStreamerMode : public chatterino::IStreamerMode
{
return false;
}

void start() override
{
}
};
16 changes: 15 additions & 1 deletion mocks/include/mocks/EmptyApplication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class EmptyApplication : public IApplication
return nullptr;
}

IAbstractIrcServer *getTwitchAbstract() override
ITwitchIrcServer *getTwitchAbstract() override
{
assert(false && "EmptyApplication::getTwitchAbstract was called "
"without being initialized");
Expand Down Expand Up @@ -245,6 +245,13 @@ class EmptyApplication : public IApplication
return nullptr;
}

BttvLiveUpdates *getBttvLiveUpdates() override
{
assert(false && "EmptyApplication::getBttvLiveUpdates was called "
"without being initialized");
return nullptr;
}

FfzEmotes *getFfzEmotes() override
{
assert(false && "EmptyApplication::getFfzEmotes was called without "
Expand All @@ -259,6 +266,13 @@ class EmptyApplication : public IApplication
return nullptr;
}

SeventvEventAPI *getSeventvEventAPI() override
{
assert(false && "EmptyApplication::getSeventvEventAPI was called "
"without being initialized");
return nullptr;
}

ILinkResolver *getLinkResolver() override
{
assert(false && "EmptyApplication::getLinkResolver was called without "
Expand Down
47 changes: 32 additions & 15 deletions mocks/include/mocks/TwitchIrcServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

#include "mocks/Channel.hpp"
#include "providers/bttv/BttvEmotes.hpp"
#include "providers/bttv/BttvLiveUpdates.hpp"
#include "providers/ffz/FfzEmotes.hpp"
#include "providers/seventv/eventapi/Client.hpp"
#include "providers/seventv/eventapi/Dispatch.hpp"
#include "providers/seventv/eventapi/Message.hpp"
#include "providers/seventv/SeventvEmotes.hpp"
#include "providers/seventv/SeventvEventAPI.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"

namespace chatterino::mock {
Expand All @@ -28,6 +26,38 @@ class MockTwitchIrcServer : public ITwitchIrcServer
{
}

void connect() override
{
}

void sendRawMessage(const QString &rawMessage) override
{
}

ChannelPtr getOrAddChannel(const QString &dirtyChannelName) override
{
assert(false && "unimplemented getOrAddChannel in mock irc server");
return {};
}

ChannelPtr getChannelOrEmpty(const QString &dirtyChannelName) override
{
assert(false && "unimplemented getChannelOrEmpty in mock irc server");
return {};
}

void addFakeMessage(const QString &data) override
{
}

void addGlobalSystemMessage(const QString &messageText) override
{
}

void forEachChannel(std::function<void(ChannelPtr)> func) override
{
}

void forEachChannelAndSpecialChannels(
std::function<void(ChannelPtr)> func) override
{
Expand All @@ -46,16 +76,6 @@ class MockTwitchIrcServer : public ITwitchIrcServer
//
}

std::unique_ptr<BttvLiveUpdates> &getBTTVLiveUpdates() override
{
return this->bttvLiveUpdates;
}

std::unique_ptr<SeventvEventAPI> &getSeventvEventAPI() override
{
return this->seventvEventAPI;
}

const IndirectChannel &getWatchingChannel() const override
{
return this->watchingChannel;
Expand Down Expand Up @@ -103,9 +123,6 @@ class MockTwitchIrcServer : public ITwitchIrcServer
ChannelPtr liveChannel;
ChannelPtr automodChannel;
QString lastUserThatWhisperedMe{"forsen"};

std::unique_ptr<BttvLiveUpdates> bttvLiveUpdates;
std::unique_ptr<SeventvEventAPI> seventvEventAPI;
};

} // namespace chatterino::mock
Loading

0 comments on commit e67b8aa

Please sign in to comment.