Skip to content

Commit

Permalink
refactor: move Network files from src/common/ to src/common/network/ (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada authored Jan 15, 2024
1 parent ad69755 commit 93e2bc1
Show file tree
Hide file tree
Showing 42 changed files with 72 additions and 71 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
- Dev: Move `clang-tidy` checker to its own CI job. (#4996)
- Dev: Refactored the Image Uploader feature. (#4971)
- Dev: Refactored the SplitOverlay code. (#5082)
- Dev: Moved the Network files to their own folder. (#5089)
- Dev: Fixed deadlock and use-after-free in tests. (#4981)
- Dev: Moved all `.clang-format` files to the root directory. (#5037)
- Dev: Load less message history upon reconnects. (#5001, #5018)
Expand Down
22 changes: 11 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@ set(SOURCE_FILES
common/Literals.hpp
common/Modes.cpp
common/Modes.hpp
common/NetworkCommon.cpp
common/NetworkCommon.hpp
common/NetworkManager.cpp
common/NetworkManager.hpp
common/NetworkPrivate.cpp
common/NetworkPrivate.hpp
common/NetworkRequest.cpp
common/NetworkRequest.hpp
common/NetworkResult.cpp
common/NetworkResult.hpp
common/QLogging.cpp
common/QLogging.hpp
common/WindowDescriptors.cpp
common/WindowDescriptors.hpp

common/enums/MessageOverflow.hpp

common/network/NetworkTask.hpp
common/network/NetworkCommon.cpp
common/network/NetworkCommon.hpp
common/network/NetworkManager.cpp
common/network/NetworkManager.hpp
common/network/NetworkPrivate.cpp
common/network/NetworkPrivate.hpp
common/network/NetworkRequest.cpp
common/network/NetworkRequest.hpp
common/network/NetworkResult.cpp
common/network/NetworkResult.hpp
common/network/NetworkTask.cpp
common/network/NetworkTask.hpp

controllers/accounts/Account.cpp
controllers/accounts/Account.hpp
Expand Down
2 changes: 1 addition & 1 deletion src/RunGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "Application.hpp"
#include "common/Args.hpp"
#include "common/Modes.hpp"
#include "common/NetworkManager.hpp"
#include "common/network/NetworkManager.hpp"
#include "common/QLogging.hpp"
#include "singletons/CrashHandler.hpp"
#include "singletons/Paths.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/NetworkCommon.hpp"
#include "common/network/NetworkCommon.hpp"

#include <QStringList>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/NetworkManager.hpp"
#include "common/network/NetworkManager.hpp"

#include <QNetworkAccessManager>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "common/NetworkPrivate.hpp"
#include "common/network/NetworkPrivate.hpp"

#include "common/network/NetworkManager.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/network/NetworkTask.hpp"
#include "common/NetworkManager.hpp"
#include "common/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "singletons/Paths.hpp"
#include "util/AbandonObject.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "common/Common.hpp"
#include "common/NetworkCommon.hpp"
#include "common/network/NetworkCommon.hpp"

#include <QHttpMultiPart>
#include <QNetworkRequest>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common/NetworkRequest.hpp"
#include "common/network/NetworkRequest.hpp"

#include "common/NetworkPrivate.hpp"
#include "common/network/NetworkPrivate.hpp"
#include "common/QLogging.hpp"
#include "common/Version.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "common/NetworkCommon.hpp"
#include "common/network/NetworkCommon.hpp"

#include <QHttpMultiPart>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/NetworkResult.hpp"
#include "common/network/NetworkResult.hpp"

#include "common/QLogging.hpp"

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/common/network/NetworkTask.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "common/network/NetworkTask.hpp"

#include "common/NetworkManager.hpp"
#include "common/NetworkPrivate.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkManager.hpp"
#include "common/network/NetworkPrivate.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "singletons/Paths.hpp"
#include "util/AbandonObject.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/DeleteMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Application.hpp"
#include "common/Channel.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkResult.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/commands/CommandContext.hpp"
#include "messages/Message.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/UpdateChannel.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "controllers/commands/builtin/twitch/UpdateChannel.hpp"

#include "common/Channel.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkResult.hpp"
#include "controllers/commands/CommandContext.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/api/Helix.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/messages/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include "Application.hpp"
#include "common/Common.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "debug/AssertInGuiThread.hpp"
#include "debug/Benchmark.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/providers/IvrApi.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "IvrApi.hpp"

#include "common/NetworkResult.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"

#include <QUrlQuery>
Expand Down
2 changes: 1 addition & 1 deletion src/providers/IvrApi.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "common/NetworkRequest.hpp"
#include "common/network/NetworkRequest.hpp"
#include "providers/twitch/TwitchEmotes.hpp"

#include <QJsonArray>
Expand Down
4 changes: 2 additions & 2 deletions src/providers/LinkResolver.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "providers/LinkResolver.hpp"

#include "common/Env.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "messages/Image.hpp"
#include "messages/Link.hpp"
#include "singletons/Settings.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/bttv/BttvEmotes.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "providers/bttv/BttvEmotes.hpp"

#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/Outcome.hpp"
#include "common/QLogging.hpp"
#include "messages/Emote.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/chatterino/ChatterinoBadges.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ChatterinoBadges.hpp"

#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "messages/Emote.hpp"

#include <QJsonArray>
Expand Down
4 changes: 2 additions & 2 deletions src/providers/ffz/FfzBadges.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "FfzBadges.hpp"

#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "messages/Emote.hpp"
#include "providers/ffz/FfzUtil.hpp"

Expand Down
4 changes: 2 additions & 2 deletions src/providers/ffz/FfzEmotes.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "providers/ffz/FfzEmotes.hpp"

#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "messages/Emote.hpp"
#include "messages/Image.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/recentmessages/Api.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "providers/recentmessages/Api.hpp"

#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "providers/recentmessages/Impl.hpp"
#include "providers/twitch/TwitchMessageBuilder.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/seventv/SeventvAPI.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "providers/seventv/SeventvAPI.hpp"

#include "common/Literals.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"

namespace {

Expand Down
2 changes: 1 addition & 1 deletion src/providers/seventv/SeventvEmotes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Application.hpp"
#include "common/Literals.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "messages/Emote.hpp"
#include "messages/Image.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/TwitchAccount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "Application.hpp"
#include "common/Channel.hpp"
#include "common/Env.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "debug/AssertInGuiThread.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/twitch/TwitchBadges.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "TwitchBadges.hpp"

#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "messages/Emote.hpp"
#include "messages/Image.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/twitch/TwitchChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "Application.hpp"
#include "common/Common.hpp"
#include "common/Env.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/notifications/NotificationController.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/twitch/api/Helix.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "providers/twitch/api/Helix.hpp"

#include "common/Literals.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "util/CancellationToken.hpp"

Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/api/Helix.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "common/Aliases.hpp"
#include "common/NetworkRequest.hpp"
#include "common/network/NetworkRequest.hpp"
#include "providers/twitch/TwitchEmotes.hpp"
#include "util/Helpers.hpp"
#include "util/QStringHash.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/singletons/ImageUploader.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "singletons/ImageUploader.hpp"

#include "common/Env.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/TwitchMessageBuilder.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/singletons/Updates.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "Updates.hpp"

#include "common/Modes.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "common/Version.hpp"
#include "Settings.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dialogs/LoginDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Application.hpp"
#include "common/Common.hpp"
#include "common/NetworkRequest.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "providers/twitch/TwitchAccount.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dialogs/UserInfoPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Application.hpp"
#include "common/Channel.hpp"
#include "common/NetworkRequest.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/commands/CommandController.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/splits/Split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include "Application.hpp"
#include "common/Common.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/commands/CommandController.hpp"
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/splits/SplitHeader.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "widgets/splits/SplitHeader.hpp"

#include "Application.hpp"
#include "common/NetworkCommon.hpp"
#include "common/NetworkRequest.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkCommon.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/network/NetworkResult.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/commands/CommandController.hpp"
#include "controllers/hotkeys/Hotkey.hpp"
Expand Down
2 changes: 1 addition & 1 deletion tests/src/NetworkCommon.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/NetworkCommon.hpp"
#include "common/network/NetworkCommon.hpp"

#include <gtest/gtest.h>

Expand Down
6 changes: 3 additions & 3 deletions tests/src/NetworkRequest.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common/NetworkRequest.hpp"
#include "common/network/NetworkRequest.hpp"

#include "common/NetworkManager.hpp"
#include "common/NetworkResult.hpp"
#include "common/network/NetworkManager.hpp"
#include "common/network/NetworkResult.hpp"

#include <gtest/gtest.h>
#include <QCoreApplication>
Expand Down
2 changes: 1 addition & 1 deletion tests/src/NetworkResult.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/NetworkResult.hpp"
#include "common/network/NetworkResult.hpp"

#include <gtest/gtest.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/NetworkManager.hpp"
#include "common/network/NetworkManager.hpp"
#include "singletons/Resources.hpp"
#include "singletons/Settings.hpp"

Expand Down

0 comments on commit 93e2bc1

Please sign in to comment.