diff --git a/src/Application.cpp b/src/Application.cpp index 7b7ecc5a0..7d2df20f9 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -20,8 +20,6 @@ #include -using namespace chatterino::singletons; - namespace chatterino { namespace { diff --git a/src/Application.hpp b/src/Application.hpp index cc961ad79..d320d99e3 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -7,34 +7,14 @@ namespace chatterino { -namespace providers { -namespace twitch { - class TwitchServer; class PubSub; -} // namespace twitch -} // namespace providers - -namespace controllers { -namespace commands { class CommandController; -} -namespace highlights { class HighlightController; -} -namespace ignores { class IgnoreController; -} -namespace taggedusers { class TaggedUsersController; -} -namespace accounts { class AccountController; -} -} // namespace controllers - -namespace singletons { class ThemeManager; class WindowManager; @@ -47,8 +27,6 @@ class SettingManager; class FontManager; class ResourceManager; -} // namespace singletons - class Application { Application(int _argc, char **_argv); diff --git a/src/common/Channel.cpp b/src/common/Channel.cpp index 29cf426f3..5d6e4e7a4 100644 --- a/src/common/Channel.cpp +++ b/src/common/Channel.cpp @@ -16,8 +16,6 @@ #include #include -using namespace chatterino::messages; - namespace chatterino { Channel::Channel(const QString &_name, Type _type) diff --git a/src/common/Channel.hpp b/src/common/Channel.hpp index df7d5c72e..db9d3bf01 100644 --- a/src/common/Channel.hpp +++ b/src/common/Channel.hpp @@ -13,9 +13,7 @@ #include namespace chatterino { -namespace messages { struct Message; -} // namespace messages class Channel : public std::enable_shared_from_this { diff --git a/src/common/Emotemap.cpp b/src/common/Emotemap.cpp index 1f0b53ac3..b55b1bf20 100644 --- a/src/common/Emotemap.cpp +++ b/src/common/Emotemap.cpp @@ -4,7 +4,6 @@ #include "singletons/SettingsManager.hpp" namespace chatterino { -namespace util { EmoteData::EmoteData(messages::Image *_image) : image1x(_image) @@ -44,5 +43,4 @@ messages::Image *EmoteData::getImage(float scale) const return _image; } -} // namespace util } // namespace chatterino diff --git a/src/common/Emotemap.hpp b/src/common/Emotemap.hpp index 6b5366d4f..87217b28b 100644 --- a/src/common/Emotemap.hpp +++ b/src/common/Emotemap.hpp @@ -4,7 +4,6 @@ #include "util/ConcurrentMap.hpp" namespace chatterino { -namespace util { struct EmoteData { EmoteData() = default; @@ -25,5 +24,4 @@ struct EmoteData { using EmoteMap = ConcurrentMap; -} // namespace util } // namespace chatterino diff --git a/src/common/FlagsEnum.hpp b/src/common/FlagsEnum.hpp index 9e5daed26..b1113a8c5 100644 --- a/src/common/FlagsEnum.hpp +++ b/src/common/FlagsEnum.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace util { // = std::enable_if::value>::type @@ -63,5 +62,4 @@ public: T value; }; -} // namespace util } // namespace chatterino diff --git a/src/common/MutexValue.hpp b/src/common/MutexValue.hpp index a74b2b0e2..05d390817 100644 --- a/src/common/MutexValue.hpp +++ b/src/common/MutexValue.hpp @@ -4,7 +4,6 @@ #include namespace chatterino { -namespace util { template class MutexValue : boost::noncopyable @@ -37,5 +36,4 @@ public: } }; -} // namespace util } // namespace chatterino diff --git a/src/common/NetworkManager.cpp b/src/common/NetworkManager.cpp index 5bc2f1b39..5577afda5 100644 --- a/src/common/NetworkManager.cpp +++ b/src/common/NetworkManager.cpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace util { QThread NetworkManager::workerThread; QNetworkAccessManager NetworkManager::NaM; @@ -20,5 +19,4 @@ void NetworkManager::deinit() NetworkManager::workerThread.wait(); } -} // namespace util } // namespace chatterino diff --git a/src/common/NetworkManager.hpp b/src/common/NetworkManager.hpp index 5e90cf529..a081209a1 100644 --- a/src/common/NetworkManager.hpp +++ b/src/common/NetworkManager.hpp @@ -13,7 +13,6 @@ #include namespace chatterino { -namespace util { static QJsonObject parseJSONFromReplyxD(QNetworkReply *reply) { @@ -169,5 +168,4 @@ public: } }; -} // namespace util } // namespace chatterino diff --git a/src/common/NetworkRequest.cpp b/src/common/NetworkRequest.cpp index 33d51bb41..3c5b4f977 100644 --- a/src/common/NetworkRequest.cpp +++ b/src/common/NetworkRequest.cpp @@ -3,7 +3,6 @@ #include "Application.hpp" namespace chatterino { -namespace util { NetworkRequest::NetworkRequest(const char *url) { @@ -40,5 +39,4 @@ void NetworkRequest::Data::writeToCache(const QByteArray &bytes) } } -} // namespace util } // namespace chatterino diff --git a/src/common/NetworkRequest.hpp b/src/common/NetworkRequest.hpp index 7ae8d98f9..62b79ad58 100644 --- a/src/common/NetworkRequest.hpp +++ b/src/common/NetworkRequest.hpp @@ -12,7 +12,6 @@ #include namespace chatterino { -namespace util { static QJsonObject parseJSONFromData(const QByteArray &data) { @@ -468,5 +467,4 @@ private: } }; -} // namespace util } // namespace chatterino diff --git a/src/common/NetworkRequester.hpp b/src/common/NetworkRequester.hpp index 872fd9a44..95664494d 100644 --- a/src/common/NetworkRequester.hpp +++ b/src/common/NetworkRequester.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace util { class NetworkRequester : public QObject { @@ -13,5 +12,4 @@ signals: void requestUrl(); }; -} // namespace util } // namespace chatterino diff --git a/src/common/NetworkWorker.hpp b/src/common/NetworkWorker.hpp index 21efeeadb..560e5b4f5 100644 --- a/src/common/NetworkWorker.hpp +++ b/src/common/NetworkWorker.hpp @@ -5,7 +5,6 @@ class QNetworkReply; namespace chatterino { -namespace util { class NetworkWorker : public QObject { @@ -15,5 +14,4 @@ signals: void doneUrl(QNetworkReply *); }; -} // namespace util } // namespace chatterino diff --git a/src/common/Property.hpp b/src/common/Property.hpp index 23e6563d1..c888aa16f 100644 --- a/src/common/Property.hpp +++ b/src/common/Property.hpp @@ -3,7 +3,6 @@ #include "boost/noncopyable.hpp" namespace chatterino { -namespace util { template class Property final : boost::noncopyable @@ -32,5 +31,4 @@ protected: T value; }; -} // namespace util } // namespace chatterino diff --git a/src/common/ProviderId.hpp b/src/common/ProviderId.hpp index 1ec190a30..29e68bbbc 100644 --- a/src/common/ProviderId.hpp +++ b/src/common/ProviderId.hpp @@ -1,5 +1,7 @@ #pragma once namespace chatterino { + enum class ProviderId { Twitch }; + } diff --git a/src/common/SignalVector2.hpp b/src/common/SignalVector2.hpp index 81e9f42f9..21c6dbeba 100644 --- a/src/common/SignalVector2.hpp +++ b/src/common/SignalVector2.hpp @@ -9,7 +9,6 @@ #include "debug/AssertInGuiThread.hpp" namespace chatterino { -namespace util { template struct SignalVectorItemArgs { @@ -123,5 +122,4 @@ public: } }; -} // namespace util } // namespace chatterino diff --git a/src/common/SignalVectorModel.hpp b/src/common/SignalVectorModel.hpp index 31352bb5e..14732e255 100644 --- a/src/common/SignalVectorModel.hpp +++ b/src/common/SignalVectorModel.hpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace util { template class SignalVectorModel : public QAbstractTableModel, pajlada::Signals::SignalHolder @@ -317,5 +316,4 @@ private: } }; -} // namespace util } // namespace chatterino diff --git a/src/common/UrlFetch.hpp b/src/common/UrlFetch.hpp index 0a4ccd280..b713bb3a6 100644 --- a/src/common/UrlFetch.hpp +++ b/src/common/UrlFetch.hpp @@ -22,8 +22,6 @@ #include namespace chatterino { -namespace util { -namespace twitch { static void get(QString url, const QObject *caller, std::function successCallback) @@ -155,6 +153,4 @@ static void sendDelete(QUrl url, std::function successCallback) }); } -} // namespace twitch -} // namespace util } // namespace chatterino diff --git a/src/controllers/accounts/Account.cpp b/src/controllers/accounts/Account.cpp index f7119ad56..ae3e0e384 100644 --- a/src/controllers/accounts/Account.cpp +++ b/src/controllers/accounts/Account.cpp @@ -3,8 +3,6 @@ #include namespace chatterino { -namespace controllers { -namespace accounts { Account::Account(ProviderId _providerId) : providerId(_providerId) @@ -38,6 +36,4 @@ bool Account::operator<(const Account &other) const return std::tie(this->category, a) < std::tie(other.category, b); } -} // namespace accounts -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/accounts/Account.hpp b/src/controllers/accounts/Account.hpp index e3e601944..1e9aef5d6 100644 --- a/src/controllers/accounts/Account.hpp +++ b/src/controllers/accounts/Account.hpp @@ -5,8 +5,6 @@ #include namespace chatterino { -namespace controllers { -namespace accounts { class Account { @@ -25,6 +23,4 @@ private: QString category; }; -} // namespace accounts -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/accounts/AccountController.cpp b/src/controllers/accounts/AccountController.cpp index df5c0c0e8..375c972d2 100644 --- a/src/controllers/accounts/AccountController.cpp +++ b/src/controllers/accounts/AccountController.cpp @@ -3,8 +3,6 @@ #include "controllers/accounts/AccountModel.hpp" namespace chatterino { -namespace controllers { -namespace accounts { AccountController::AccountController() { @@ -48,6 +46,4 @@ AccountModel *AccountController::createModel(QObject *parent) return model; } -} // namespace accounts -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/accounts/AccountController.hpp b/src/controllers/accounts/AccountController.hpp index cd10e7f07..4ceb67e9d 100644 --- a/src/controllers/accounts/AccountController.hpp +++ b/src/controllers/accounts/AccountController.hpp @@ -8,8 +8,6 @@ #include "common/SignalVector2.hpp" namespace chatterino { -namespace controllers { -namespace accounts { class AccountModel; @@ -29,6 +27,4 @@ private: accounts; }; -} // namespace accounts -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/accounts/AccountModel.cpp b/src/controllers/accounts/AccountModel.cpp index 8e24be58e..b8589e2f6 100644 --- a/src/controllers/accounts/AccountModel.cpp +++ b/src/controllers/accounts/AccountModel.cpp @@ -3,8 +3,6 @@ #include "util/StandardItemHelper.hpp" namespace chatterino { -namespace controllers { -namespace accounts { AccountModel::AccountModel(QObject *parent) : util::SignalVectorModel>(1, parent) @@ -57,6 +55,4 @@ void AccountModel::afterRemoved(const std::shared_ptr &item, } } -} // namespace accounts -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/accounts/AccountModel.hpp b/src/controllers/accounts/AccountModel.hpp index b85575a45..e631ec2a7 100644 --- a/src/controllers/accounts/AccountModel.hpp +++ b/src/controllers/accounts/AccountModel.hpp @@ -7,8 +7,6 @@ #include namespace chatterino { -namespace controllers { -namespace accounts { class AccountController; @@ -38,6 +36,4 @@ private: std::unordered_map categoryCount; }; -} // namespace accounts -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/commands/Command.cpp b/src/controllers/commands/Command.cpp index 80904f20b..e76b16f18 100644 --- a/src/controllers/commands/Command.cpp +++ b/src/controllers/commands/Command.cpp @@ -1,8 +1,6 @@ #include "Command.hpp" namespace chatterino { -namespace controllers { -namespace commands { // command Command::Command(const QString &_text) @@ -29,6 +27,4 @@ QString Command::toString() const return this->name + " " + this->func; } -} // namespace commands -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/commands/Command.hpp b/src/controllers/commands/Command.hpp index 0495a4cd7..043030bbe 100644 --- a/src/controllers/commands/Command.hpp +++ b/src/controllers/commands/Command.hpp @@ -3,8 +3,6 @@ #include namespace chatterino { -namespace controllers { -namespace commands { struct Command { QString name; @@ -17,6 +15,4 @@ struct Command { QString toString() const; }; -} // namespace commands -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/commands/CommandController.cpp b/src/controllers/commands/CommandController.cpp index a6c6911d6..a92b80300 100644 --- a/src/controllers/commands/CommandController.cpp +++ b/src/controllers/commands/CommandController.cpp @@ -26,8 +26,6 @@ using namespace chatterino::providers::twitch; namespace chatterino { -namespace controllers { -namespace commands { CommandController::CommandController() { @@ -290,6 +288,4 @@ QStringList CommandController::getDefaultTwitchCommandList() return l; } -} // namespace commands -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/commands/CommandController.hpp b/src/controllers/commands/CommandController.hpp index 25534d06c..d07532b21 100644 --- a/src/controllers/commands/CommandController.hpp +++ b/src/controllers/commands/CommandController.hpp @@ -10,8 +10,6 @@ namespace chatterino { class Channel; -namespace controllers { -namespace commands { class CommandModel; @@ -39,6 +37,4 @@ private: QString execCustomCommand(const QStringList &words, const Command &command); }; -} // namespace commands -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/commands/CommandModel.cpp b/src/controllers/commands/CommandModel.cpp index 11b59d16e..c02be86dc 100644 --- a/src/controllers/commands/CommandModel.cpp +++ b/src/controllers/commands/CommandModel.cpp @@ -1,8 +1,6 @@ #include "CommandModel.hpp" namespace chatterino { -namespace controllers { -namespace commands { // commandmodel CommandModel::CommandModel(QObject *parent) @@ -25,6 +23,4 @@ void CommandModel::getRowFromItem(const Command &item, std::vectorsetFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable); } -} // namespace commands -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/commands/CommandModel.hpp b/src/controllers/commands/CommandModel.hpp index 947fd647d..7a66c4e91 100644 --- a/src/controllers/commands/CommandModel.hpp +++ b/src/controllers/commands/CommandModel.hpp @@ -6,8 +6,6 @@ #include "common/SignalVectorModel.hpp" namespace chatterino { -namespace controllers { -namespace commands { class CommandController; @@ -26,6 +24,4 @@ protected: friend class CommandController; }; -} // namespace commands -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/highlights/HighlightController.cpp b/src/controllers/highlights/HighlightController.cpp index 301e8dbe2..10ebeded8 100644 --- a/src/controllers/highlights/HighlightController.cpp +++ b/src/controllers/highlights/HighlightController.cpp @@ -5,8 +5,6 @@ #include "widgets/dialogs/NotificationPopup.hpp" namespace chatterino { -namespace controllers { -namespace highlights { HighlightController::HighlightController() { @@ -43,6 +41,4 @@ void HighlightController::addHighlight(const messages::MessagePtr &msg) // popup.show(); } -} // namespace highlights -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/highlights/HighlightController.hpp b/src/controllers/highlights/HighlightController.hpp index e134222f5..d2cb2b825 100644 --- a/src/controllers/highlights/HighlightController.hpp +++ b/src/controllers/highlights/HighlightController.hpp @@ -6,8 +6,6 @@ #include "common/SignalVector2.hpp" namespace chatterino { -namespace controllers { -namespace highlights { class HighlightModel; @@ -31,6 +29,4 @@ private: "/highlighting/highlights"}; }; -} // namespace highlights -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/highlights/HighlightModel.cpp b/src/controllers/highlights/HighlightModel.cpp index e2d74a922..4ddb1defb 100644 --- a/src/controllers/highlights/HighlightModel.cpp +++ b/src/controllers/highlights/HighlightModel.cpp @@ -5,8 +5,6 @@ #include "util/StandardItemHelper.hpp" namespace chatterino { -namespace controllers { -namespace highlights { // commandmodel HighlightModel::HighlightModel(QObject *parent) @@ -70,6 +68,4 @@ void HighlightModel::customRowSetData(const std::vector &row, i } } -} // namespace highlights -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/highlights/HighlightModel.hpp b/src/controllers/highlights/HighlightModel.hpp index 9f2f639a6..d9311c325 100644 --- a/src/controllers/highlights/HighlightModel.hpp +++ b/src/controllers/highlights/HighlightModel.hpp @@ -6,8 +6,6 @@ #include "common/SignalVectorModel.hpp" namespace chatterino { -namespace controllers { -namespace highlights { class HighlightController; @@ -32,6 +30,4 @@ protected: friend class HighlightController; }; -} // namespace highlights -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/highlights/HighlightPhrase.hpp b/src/controllers/highlights/HighlightPhrase.hpp index 3c14063f9..814bee698 100644 --- a/src/controllers/highlights/HighlightPhrase.hpp +++ b/src/controllers/highlights/HighlightPhrase.hpp @@ -9,8 +9,6 @@ #include namespace chatterino { -namespace controllers { -namespace highlights { class HighlightPhrase { @@ -70,8 +68,6 @@ public: // return this->regex; // } }; -} // namespace highlights -} // namespace controllers } // namespace chatterino namespace pajlada { diff --git a/src/controllers/ignores/IgnoreController.cpp b/src/controllers/ignores/IgnoreController.cpp index d7d7f649a..dc6ec7e36 100644 --- a/src/controllers/ignores/IgnoreController.cpp +++ b/src/controllers/ignores/IgnoreController.cpp @@ -6,8 +6,6 @@ #include namespace chatterino { -namespace controllers { -namespace ignores { void IgnoreController::initialize() { @@ -31,6 +29,4 @@ IgnoreModel *IgnoreController::createModel(QObject *parent) return model; } -} // namespace ignores -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/ignores/IgnoreController.hpp b/src/controllers/ignores/IgnoreController.hpp index 16ff64d66..4d15878ef 100644 --- a/src/controllers/ignores/IgnoreController.hpp +++ b/src/controllers/ignores/IgnoreController.hpp @@ -5,8 +5,6 @@ #include "common/SignalVector2.hpp" namespace chatterino { -namespace controllers { -namespace ignores { class IgnoreModel; @@ -26,6 +24,4 @@ private: "/ignore/phrases"}; }; -} // namespace ignores -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/ignores/IgnoreModel.cpp b/src/controllers/ignores/IgnoreModel.cpp index 5dc86cb0c..6a983c54b 100644 --- a/src/controllers/ignores/IgnoreModel.cpp +++ b/src/controllers/ignores/IgnoreModel.cpp @@ -5,8 +5,6 @@ #include "util/StandardItemHelper.hpp" namespace chatterino { -namespace controllers { -namespace ignores { // commandmodel IgnoreModel::IgnoreModel(QObject *parent) @@ -31,6 +29,4 @@ void IgnoreModel::getRowFromItem(const IgnorePhrase &item, std::vector namespace chatterino { -namespace controllers { -namespace ignores { class IgnorePhrase { @@ -53,8 +51,6 @@ public: return this->isValid() && this->regex.match(subject).hasMatch(); } }; -} // namespace ignores -} // namespace controllers } // namespace chatterino namespace pajlada { diff --git a/src/controllers/taggedusers/TaggedUser.cpp b/src/controllers/taggedusers/TaggedUser.cpp index 43ac76fe4..b020cab32 100644 --- a/src/controllers/taggedusers/TaggedUser.cpp +++ b/src/controllers/taggedusers/TaggedUser.cpp @@ -3,8 +3,6 @@ #include namespace chatterino { -namespace controllers { -namespace taggedusers { TaggedUser::TaggedUser(ProviderId _provider, const QString &_name, const QString &_id) : provider(_provider) @@ -19,6 +17,4 @@ bool TaggedUser::operator<(const TaggedUser &other) const std::tie(other.provider, other.name, other.id); } -} // namespace taggedusers -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/taggedusers/TaggedUser.hpp b/src/controllers/taggedusers/TaggedUser.hpp index c22e26942..192cfd7f1 100644 --- a/src/controllers/taggedusers/TaggedUser.hpp +++ b/src/controllers/taggedusers/TaggedUser.hpp @@ -5,8 +5,6 @@ #include namespace chatterino { -namespace controllers { -namespace taggedusers { class TaggedUser { @@ -20,6 +18,4 @@ public: QString id; }; -} // namespace taggedusers -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/taggedusers/TaggedUsersController.cpp b/src/controllers/taggedusers/TaggedUsersController.cpp index 8ca80c5df..97eebaa39 100644 --- a/src/controllers/taggedusers/TaggedUsersController.cpp +++ b/src/controllers/taggedusers/TaggedUsersController.cpp @@ -3,8 +3,6 @@ #include "controllers/taggedusers/TaggedUsersModel.hpp" namespace chatterino { -namespace controllers { -namespace taggedusers { TaggedUsersController::TaggedUsersController() { @@ -18,6 +16,4 @@ TaggedUsersModel *TaggedUsersController::createModel(QObject *parent) return model; } -} // namespace taggedusers -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/taggedusers/TaggedUsersController.hpp b/src/controllers/taggedusers/TaggedUsersController.hpp index 3aa6f1b56..c66d45b86 100644 --- a/src/controllers/taggedusers/TaggedUsersController.hpp +++ b/src/controllers/taggedusers/TaggedUsersController.hpp @@ -4,8 +4,6 @@ #include "common/SignalVector2.hpp" namespace chatterino { -namespace controllers { -namespace taggedusers { class TaggedUsersModel; @@ -19,6 +17,4 @@ public: TaggedUsersModel *createModel(QObject *parent = nullptr); }; -} // namespace taggedusers -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/taggedusers/TaggedUsersModel.cpp b/src/controllers/taggedusers/TaggedUsersModel.cpp index cf153f8ec..cfd24e4eb 100644 --- a/src/controllers/taggedusers/TaggedUsersModel.cpp +++ b/src/controllers/taggedusers/TaggedUsersModel.cpp @@ -4,8 +4,6 @@ #include "util/StandardItemHelper.hpp" namespace chatterino { -namespace controllers { -namespace taggedusers { // commandmodel TaggedUsersModel::TaggedUsersModel(QObject *parent) @@ -61,6 +59,4 @@ void TaggedUsersModel::afterInit() // } //} -} // namespace taggedusers -} // namespace controllers } // namespace chatterino diff --git a/src/controllers/taggedusers/TaggedUsersModel.hpp b/src/controllers/taggedusers/TaggedUsersModel.hpp index f4a2ad3cf..1b7571176 100644 --- a/src/controllers/taggedusers/TaggedUsersModel.hpp +++ b/src/controllers/taggedusers/TaggedUsersModel.hpp @@ -4,8 +4,6 @@ #include "common/SignalVectorModel.hpp" namespace chatterino { -namespace controllers { -namespace taggedusers { class TaggedUsersController; @@ -29,6 +27,4 @@ protected: friend class TaggedUsersController; }; -} // namespace taggedusers -} // namespace controllers } // namespace chatterino diff --git a/src/debug/AssertInGuiThread.hpp b/src/debug/AssertInGuiThread.hpp index 9ea79ba69..248ba8b1c 100644 --- a/src/debug/AssertInGuiThread.hpp +++ b/src/debug/AssertInGuiThread.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace util { static void assertInGuiThread() { @@ -14,5 +13,4 @@ static void assertInGuiThread() #endif } -} // namespace util } // namespace chatterino diff --git a/src/debug/Benchmark.hpp b/src/debug/Benchmark.hpp index c41caa411..c648382ea 100644 --- a/src/debug/Benchmark.hpp +++ b/src/debug/Benchmark.hpp @@ -13,6 +13,8 @@ qDebug() << BOOST_CURRENT_FUNCTION << __LINE__ \ << static_cast(x.nsecsElapsed()) / 1000000.0 << "ms"; +namespace chatterino { + class BenchmarkGuard : boost::noncopyable { QElapsedTimer timer; @@ -35,3 +37,5 @@ public: return qreal(timer.nsecsElapsed()) / 1000000.0; } }; + +} // namespace chatterino diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp index e55a4abf7..6889139ee 100644 --- a/src/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -6,7 +6,6 @@ #include namespace chatterino { -namespace debug { template inline void Log(const std::string &formatString, Args &&... args) @@ -15,5 +14,4 @@ inline void Log(const std::string &formatString, Args &&... args) << fS(formatString, std::forward(args)...).c_str(); } -} // namespace debug } // namespace chatterino diff --git a/src/messages/Image.cpp b/src/messages/Image.cpp index 1e34b162c..4cc89061a 100644 --- a/src/messages/Image.cpp +++ b/src/messages/Image.cpp @@ -20,7 +20,6 @@ #include namespace chatterino { -namespace messages { bool Image::loadedEventQueued = false; @@ -273,5 +272,4 @@ void Image::setCopyString(const QString &newCopyString) this->copyString = newCopyString; } -} // namespace messages } // namespace chatterino diff --git a/src/messages/Image.hpp b/src/messages/Image.hpp index 89b7ae3d0..c25c4db45 100644 --- a/src/messages/Image.hpp +++ b/src/messages/Image.hpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace messages { class Image : public QObject, boost::noncopyable { @@ -67,5 +66,4 @@ private: void gifUpdateTimout(); }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/LimitedQueue.hpp b/src/messages/LimitedQueue.hpp index 8f24a78e5..7ca1c406f 100644 --- a/src/messages/LimitedQueue.hpp +++ b/src/messages/LimitedQueue.hpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace messages { // // Warning: @@ -267,5 +266,4 @@ private: const size_t chunkSize = 100; }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/LimitedQueueSnapshot.hpp b/src/messages/LimitedQueueSnapshot.hpp index 87918816f..cd73e6d1f 100644 --- a/src/messages/LimitedQueueSnapshot.hpp +++ b/src/messages/LimitedQueueSnapshot.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace messages { template class LimitedQueueSnapshot @@ -55,5 +54,4 @@ private: size_t lastChunkEnd = 0; }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/Link.cpp b/src/messages/Link.cpp index 8432e1ff0..7b5bcdb7d 100644 --- a/src/messages/Link.cpp +++ b/src/messages/Link.cpp @@ -1,7 +1,6 @@ #include "messages/Link.hpp" namespace chatterino { -namespace messages { Link::Link() : type(None) @@ -20,5 +19,4 @@ bool Link::isValid() const return this->type != None; } -} // namespace messages } // namespace chatterino diff --git a/src/messages/Link.hpp b/src/messages/Link.hpp index 945f414fe..a07d21cf3 100644 --- a/src/messages/Link.hpp +++ b/src/messages/Link.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace messages { struct Link { public: @@ -28,5 +27,4 @@ public: bool isValid() const; }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/Message.cpp b/src/messages/Message.cpp index 7bb73d89d..aeb99dc1a 100644 --- a/src/messages/Message.cpp +++ b/src/messages/Message.cpp @@ -6,7 +6,6 @@ using SBHighlight = chatterino::widgets::ScrollbarHighlight; namespace chatterino { -namespace messages { void Message::addElement(MessageElement *element) { @@ -212,5 +211,4 @@ MessagePtr Message::createUntimeoutMessage(const providers::twitch::UnbanAction return msg; } -} // namespace messages } // namespace chatterino diff --git a/src/messages/Message.hpp b/src/messages/Message.hpp index 5938d3c94..784d2f855 100644 --- a/src/messages/Message.hpp +++ b/src/messages/Message.hpp @@ -14,7 +14,6 @@ #include "util/DebugCount.hpp" namespace chatterino { -namespace messages { struct Message { Message() @@ -81,5 +80,4 @@ public: using MessagePtr = std::shared_ptr; -} // namespace messages } // namespace chatterino diff --git a/src/messages/MessageBuilder.cpp b/src/messages/MessageBuilder.cpp index bcf650557..697779ed1 100644 --- a/src/messages/MessageBuilder.cpp +++ b/src/messages/MessageBuilder.cpp @@ -6,7 +6,6 @@ #include namespace chatterino { -namespace messages { MessageBuilder::MessageBuilder() : message(new Message) @@ -62,5 +61,4 @@ QString MessageBuilder::matchLink(const QString &string) return captured; } -} // namespace messages } // namespace chatterino diff --git a/src/messages/MessageBuilder.hpp b/src/messages/MessageBuilder.hpp index 56e185993..3104aab83 100644 --- a/src/messages/MessageBuilder.hpp +++ b/src/messages/MessageBuilder.hpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace messages { struct MessageBuilder { public: @@ -35,5 +34,4 @@ protected: MessagePtr message; }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/MessageColor.cpp b/src/messages/MessageColor.cpp index c56bc8d95..d8f7816f3 100644 --- a/src/messages/MessageColor.cpp +++ b/src/messages/MessageColor.cpp @@ -1,7 +1,6 @@ #include "MessageColor.hpp" namespace chatterino { -namespace messages { MessageColor::MessageColor(const QColor &_color) : type(Type::Custom) @@ -31,5 +30,4 @@ const QColor &MessageColor::getColor(singletons::ThemeManager &themeManager) con return _default; } -} // namespace messages } // namespace chatterino diff --git a/src/messages/MessageColor.hpp b/src/messages/MessageColor.hpp index e29065bcd..363007142 100644 --- a/src/messages/MessageColor.hpp +++ b/src/messages/MessageColor.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace messages { struct MessageColor { enum Type { Custom, Text, Link, System }; @@ -20,5 +19,4 @@ private: QColor customColor; }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/MessageElement.cpp b/src/messages/MessageElement.cpp index d9188b659..dcf77984f 100644 --- a/src/messages/MessageElement.cpp +++ b/src/messages/MessageElement.cpp @@ -8,7 +8,6 @@ #include "common/Emotemap.hpp" namespace chatterino { -namespace messages { MessageElement::MessageElement(Flags _flags) : flags(_flags) @@ -262,5 +261,4 @@ void TwitchModerationElement::addToContainer(MessageLayoutContainer &container, } } -} // namespace messages } // namespace chatterino diff --git a/src/messages/MessageElement.hpp b/src/messages/MessageElement.hpp index 2aee249de..65e44d8c2 100644 --- a/src/messages/MessageElement.hpp +++ b/src/messages/MessageElement.hpp @@ -16,13 +16,8 @@ namespace chatterino { class Channel; -namespace util { struct EmoteData; -} // namespace util -namespace messages { -namespace layouts { struct MessageLayoutContainer; -} // namespace layouts using namespace chatterino::messages::layouts; @@ -206,5 +201,4 @@ public: void addToContainer(MessageLayoutContainer &container, MessageElement::Flags flags) override; }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/MessageParseArgs.hpp b/src/messages/MessageParseArgs.hpp index 8ededccfc..f3d732c4b 100644 --- a/src/messages/MessageParseArgs.hpp +++ b/src/messages/MessageParseArgs.hpp @@ -1,7 +1,6 @@ #pragma once namespace chatterino { -namespace messages { struct MessageParseArgs { bool disablePingSounds = false; @@ -11,5 +10,4 @@ struct MessageParseArgs { bool isStaffOrBroadcaster = false; }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/Selection.hpp b/src/messages/Selection.hpp index 805f48a8d..e5e6f3042 100644 --- a/src/messages/Selection.hpp +++ b/src/messages/Selection.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace messages { struct SelectionItem { int messageIndex; @@ -79,5 +78,4 @@ struct Selection { } }; -} // namespace messages } // namespace chatterino diff --git a/src/messages/layouts/MessageLayout.cpp b/src/messages/layouts/MessageLayout.cpp index 221483b07..a2e53a0da 100644 --- a/src/messages/layouts/MessageLayout.cpp +++ b/src/messages/layouts/MessageLayout.cpp @@ -19,8 +19,6 @@ #define COMPACT_EMOTES_OFFSET 6 namespace chatterino { -namespace messages { -namespace layouts { MessageLayout::MessageLayout(MessagePtr message) : message_(message) @@ -274,6 +272,4 @@ void MessageLayout::addSelectionText(QString &str, int from, int to) this->container_.addSelectionText(str, from, to); } -} // namespace layouts -} // namespace messages } // namespace chatterino diff --git a/src/messages/layouts/MessageLayout.hpp b/src/messages/layouts/MessageLayout.hpp index 9d4a64277..c343c0657 100644 --- a/src/messages/layouts/MessageLayout.hpp +++ b/src/messages/layouts/MessageLayout.hpp @@ -13,8 +13,6 @@ #include namespace chatterino { -namespace messages { -namespace layouts { class MessageLayout : boost::noncopyable { @@ -82,6 +80,4 @@ private: using MessageLayoutPtr = std::shared_ptr; -} // namespace layouts -} // namespace messages } // namespace chatterino diff --git a/src/messages/layouts/MessageLayoutContainer.cpp b/src/messages/layouts/MessageLayoutContainer.cpp index 29f132b15..60c98bcbd 100644 --- a/src/messages/layouts/MessageLayoutContainer.cpp +++ b/src/messages/layouts/MessageLayoutContainer.cpp @@ -12,8 +12,6 @@ #define MAX_UNCOLLAPSED_LINES (getApp()->settings->collpseMessagesMinLines.getValue()) namespace chatterino { -namespace messages { -namespace layouts { int MessageLayoutContainer::getHeight() const { @@ -497,6 +495,4 @@ void MessageLayoutContainer::addSelectionText(QString &str, int from, int to) } } -} // namespace layouts -} // namespace messages } // namespace chatterino diff --git a/src/messages/layouts/MessageLayoutContainer.hpp b/src/messages/layouts/MessageLayoutContainer.hpp index a22ecb7b9..eb4728569 100644 --- a/src/messages/layouts/MessageLayoutContainer.hpp +++ b/src/messages/layouts/MessageLayoutContainer.hpp @@ -12,9 +12,6 @@ class QPainter; namespace chatterino { -namespace messages { - -namespace layouts { class MessageLayoutElement; struct Margin { @@ -113,6 +110,4 @@ private: std::vector lines; }; -} // namespace layouts -} // namespace messages } // namespace chatterino diff --git a/src/messages/layouts/MessageLayoutElement.cpp b/src/messages/layouts/MessageLayoutElement.cpp index ccd33141f..904722a17 100644 --- a/src/messages/layouts/MessageLayoutElement.cpp +++ b/src/messages/layouts/MessageLayoutElement.cpp @@ -8,8 +8,6 @@ #include namespace chatterino { -namespace messages { -namespace layouts { const QRect &MessageLayoutElement::getRect() const { @@ -289,6 +287,4 @@ int TextIconLayoutElement::getXFromIndex(int index) } } -} // namespace layouts -} // namespace messages } // namespace chatterino diff --git a/src/messages/layouts/MessageLayoutElement.hpp b/src/messages/layouts/MessageLayoutElement.hpp index 2b8707240..b4935f387 100644 --- a/src/messages/layouts/MessageLayoutElement.hpp +++ b/src/messages/layouts/MessageLayoutElement.hpp @@ -14,12 +14,9 @@ class QPainter; namespace chatterino { -namespace messages { class MessageElement; class Image; -namespace layouts { - class MessageLayoutElement : boost::noncopyable { public: @@ -113,6 +110,4 @@ private: QString line2; }; -} // namespace layouts -} // namespace messages } // namespace chatterino diff --git a/src/providers/bttv/BttvEmotes.cpp b/src/providers/bttv/BttvEmotes.cpp index e14835f0d..b89baef95 100644 --- a/src/providers/bttv/BttvEmotes.cpp +++ b/src/providers/bttv/BttvEmotes.cpp @@ -5,8 +5,6 @@ #include "common/UrlFetch.hpp" namespace chatterino { -namespace providers { -namespace bttv { namespace { @@ -118,6 +116,4 @@ void BTTVEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr namespace chatterino { -namespace providers { -namespace bttv { class BTTVEmotes { @@ -27,6 +25,4 @@ private: util::EmoteMap channelEmoteCache; }; -} // namespace bttv -} // namespace providers } // namespace chatterino diff --git a/src/providers/emoji/Emojis.cpp b/src/providers/emoji/Emojis.cpp index 017179271..b2aa11a8a 100644 --- a/src/providers/emoji/Emojis.cpp +++ b/src/providers/emoji/Emojis.cpp @@ -7,8 +7,6 @@ #include namespace chatterino { -namespace providers { -namespace emoji { namespace { @@ -379,6 +377,4 @@ QString Emojis::replaceShortCodes(const QString &text) return ret; } -} // namespace emoji -} // namespace providers } // namespace chatterino diff --git a/src/providers/emoji/Emojis.hpp b/src/providers/emoji/Emojis.hpp index e25ae6857..59895a370 100644 --- a/src/providers/emoji/Emojis.hpp +++ b/src/providers/emoji/Emojis.hpp @@ -10,8 +10,6 @@ #include namespace chatterino { -namespace providers { -namespace emoji { struct EmojiData { // actual byte-representation of the emoji (i.e. \154075\156150 which is :male:) @@ -66,6 +64,4 @@ private: QMap>> emojiFirstByte; }; -} // namespace emoji -} // namespace providers } // namespace chatterino diff --git a/src/providers/ffz/FfzEmotes.cpp b/src/providers/ffz/FfzEmotes.cpp index e2ff448af..0bff7571e 100644 --- a/src/providers/ffz/FfzEmotes.cpp +++ b/src/providers/ffz/FfzEmotes.cpp @@ -5,8 +5,6 @@ #include "common/UrlFetch.hpp" namespace chatterino { -namespace providers { -namespace ffz { namespace { @@ -133,6 +131,4 @@ void FFZEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr namespace chatterino { -namespace providers { -namespace ffz { class FFZEmotes { @@ -27,6 +25,4 @@ private: util::ConcurrentMap channelEmoteCache; }; -} // namespace ffz -} // namespace providers } // namespace chatterino diff --git a/src/providers/irc/AbstractIrcServer.cpp b/src/providers/irc/AbstractIrcServer.cpp index ca8d15e9c..39f3d8ecf 100644 --- a/src/providers/irc/AbstractIrcServer.cpp +++ b/src/providers/irc/AbstractIrcServer.cpp @@ -6,11 +6,7 @@ #include -using namespace chatterino::messages; - namespace chatterino { -namespace providers { -namespace irc { AbstractIrcServer::AbstractIrcServer() { @@ -271,6 +267,4 @@ void AbstractIrcServer::forEachChannel(std::function func) } } -} // namespace irc -} // namespace providers } // namespace chatterino diff --git a/src/providers/irc/AbstractIrcServer.hpp b/src/providers/irc/AbstractIrcServer.hpp index 9f3af770e..9e2723c39 100644 --- a/src/providers/irc/AbstractIrcServer.hpp +++ b/src/providers/irc/AbstractIrcServer.hpp @@ -10,8 +10,6 @@ #include namespace chatterino { -namespace providers { -namespace irc { class AbstractIrcServer { @@ -72,6 +70,4 @@ private: // bool autoReconnect_ = false; }; -} // namespace irc -} // namespace providers } // namespace chatterino diff --git a/src/providers/irc/IrcAccount.cpp b/src/providers/irc/IrcAccount.cpp index 660f76f56..1b7afad50 100644 --- a/src/providers/irc/IrcAccount.cpp +++ b/src/providers/irc/IrcAccount.cpp @@ -1,8 +1,7 @@ #include "IrcAccount.hpp" // namespace chatterino { -// namespace providers { -// namespace irc { +// // IrcAccount::IrcAccount(const QString &_userName, const QString &_nickName, const QString // &_realName, // const QString &_password) @@ -32,6 +31,5 @@ //{ // return this->password; //} -//} // namespace irc -//} // namespace providers +// //} // namespace chatterino diff --git a/src/providers/irc/IrcAccount.hpp b/src/providers/irc/IrcAccount.hpp index 351387cd6..5906026c6 100644 --- a/src/providers/irc/IrcAccount.hpp +++ b/src/providers/irc/IrcAccount.hpp @@ -3,8 +3,7 @@ #include // namespace chatterino { -// namespace providers { -// namespace irc { +// // class IrcAccount //{ // public: @@ -22,6 +21,5 @@ // QString realName; // QString password; //}; -//} // namespace irc -//} // namespace providers +// //} // namespace chatterino diff --git a/src/providers/irc/IrcChannel2.cpp b/src/providers/irc/IrcChannel2.cpp index 31a895107..bbdee2086 100644 --- a/src/providers/irc/IrcChannel2.cpp +++ b/src/providers/irc/IrcChannel2.cpp @@ -1,11 +1,9 @@ #include "IrcChannel2.hpp" namespace chatterino { -namespace providers { -namespace irc { + // IrcChannel::IrcChannel() //{ //} -} // namespace irc -} // namespace providers +// } // namespace chatterino diff --git a/src/providers/irc/IrcChannel2.hpp b/src/providers/irc/IrcChannel2.hpp index d8fe790dd..ca6c9e24a 100644 --- a/src/providers/irc/IrcChannel2.hpp +++ b/src/providers/irc/IrcChannel2.hpp @@ -1,13 +1,11 @@ #pragma once namespace chatterino { -namespace providers { -namespace irc { + // class IrcChannel //{ // public: // IrcChannel(); //}; -} // namespace irc -} // namespace providers +// } // namespace chatterino diff --git a/src/providers/irc/IrcConnection2.cpp b/src/providers/irc/IrcConnection2.cpp index b9d7993e1..82d0d1797 100644 --- a/src/providers/irc/IrcConnection2.cpp +++ b/src/providers/irc/IrcConnection2.cpp @@ -1,8 +1,6 @@ #include "IrcConnection2.hpp" namespace chatterino { -namespace providers { -namespace irc { IrcConnection::IrcConnection(QObject *parent) : Communi::IrcConnection(parent) @@ -33,6 +31,4 @@ IrcConnection::IrcConnection(QObject *parent) }); } -} // namespace irc -} // namespace providers } // namespace chatterino diff --git a/src/providers/irc/IrcConnection2.hpp b/src/providers/irc/IrcConnection2.hpp index c9a468b75..7c79c7733 100644 --- a/src/providers/irc/IrcConnection2.hpp +++ b/src/providers/irc/IrcConnection2.hpp @@ -6,8 +6,6 @@ #include namespace chatterino { -namespace providers { -namespace irc { class IrcConnection : public Communi::IrcConnection { @@ -22,6 +20,4 @@ private: std::atomic recentlyReceivedMessage_{true}; }; -} // namespace irc -} // namespace providers } // namespace chatterino diff --git a/src/providers/irc/IrcServer.cpp b/src/providers/irc/IrcServer.cpp index 4c11e7e00..be5623610 100644 --- a/src/providers/irc/IrcServer.cpp +++ b/src/providers/irc/IrcServer.cpp @@ -3,12 +3,10 @@ #include namespace chatterino { -namespace providers { -namespace irc { + // IrcServer::IrcServer(const QString &hostname, int port) //{ // this->initConnection(); //} -} // namespace irc -} // namespace providers +// } // namespace chatterino diff --git a/src/providers/irc/IrcServer.hpp b/src/providers/irc/IrcServer.hpp index e627173f7..645dc2f30 100644 --- a/src/providers/irc/IrcServer.hpp +++ b/src/providers/irc/IrcServer.hpp @@ -4,8 +4,7 @@ #include "providers/irc/AbstractIrcServer.hpp" namespace chatterino { -namespace providers { -namespace irc { + // class IrcServer //{ // public: @@ -20,6 +19,5 @@ namespace irc { // virtual void privateMessageReceived(Communi::IrcPrivateMessage *message); // virtual void messageReceived(Communi::IrcMessage *message); //}; -} // namespace irc -} // namespace providers +// } // namespace chatterino diff --git a/src/providers/twitch/Const.hpp b/src/providers/twitch/Const.hpp index 3fa6ad501..d99bce191 100644 --- a/src/providers/twitch/Const.hpp +++ b/src/providers/twitch/Const.hpp @@ -5,13 +5,6 @@ namespace chatterino { static const char *ANONYMOUS_USERNAME_LABEL ATTR_UNUSED = " - anonymous - "; - -namespace providers { -namespace twitch { - static const char *ANONYMOUS_USERNAME ATTR_UNUSED = "justinfan64537"; -} // namespace twitch -} // namespace providers - } // namespace chatterino diff --git a/src/providers/twitch/EmoteValue.hpp b/src/providers/twitch/EmoteValue.hpp index 4518690e4..decf79851 100644 --- a/src/providers/twitch/EmoteValue.hpp +++ b/src/providers/twitch/EmoteValue.hpp @@ -3,8 +3,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { struct EmoteValue { public: @@ -29,6 +27,4 @@ private: QString _channelName; }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/IrcMessageHandler.cpp b/src/providers/twitch/IrcMessageHandler.cpp index 81354b8d5..f0fb0c51a 100644 --- a/src/providers/twitch/IrcMessageHandler.cpp +++ b/src/providers/twitch/IrcMessageHandler.cpp @@ -17,12 +17,7 @@ #include -using namespace chatterino::singletons; -using namespace chatterino::messages; - namespace chatterino { -namespace providers { -namespace twitch { IrcMessageHandler &IrcMessageHandler::getInstance() { @@ -369,6 +364,4 @@ void IrcMessageHandler::handlePartMessage(Communi::IrcMessage *message) } } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/IrcMessageHandler.hpp b/src/providers/twitch/IrcMessageHandler.hpp index 274c677bd..084c88bcd 100644 --- a/src/providers/twitch/IrcMessageHandler.hpp +++ b/src/providers/twitch/IrcMessageHandler.hpp @@ -3,8 +3,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { class TwitchServer; @@ -34,6 +32,4 @@ private: TwitchServer &server, bool isResub, bool isAction); }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/Pubsub.cpp b/src/providers/twitch/Pubsub.cpp index c80a5ef8d..557efc8f0 100644 --- a/src/providers/twitch/Pubsub.cpp +++ b/src/providers/twitch/Pubsub.cpp @@ -17,8 +17,6 @@ using websocketpp::lib::placeholders::_1; using websocketpp::lib::placeholders::_2; namespace chatterino { -namespace providers { -namespace twitch { static const char *pingPayload = "{\"type\":\"PING\"}"; @@ -772,6 +770,4 @@ void PubSub::runThread() debug::Log("Done with pubsub manager thread"); } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/Pubsub.hpp b/src/providers/twitch/Pubsub.hpp index b885a8ef1..90da3f9ea 100644 --- a/src/providers/twitch/Pubsub.hpp +++ b/src/providers/twitch/Pubsub.hpp @@ -21,8 +21,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { using WebsocketClient = websocketpp::client; using WebsocketHandle = websocketpp::connection_hdl; @@ -159,6 +157,4 @@ private: void runThread(); }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/PubsubActions.cpp b/src/providers/twitch/PubsubActions.cpp index efb83b9d6..689a9a117 100644 --- a/src/providers/twitch/PubsubActions.cpp +++ b/src/providers/twitch/PubsubActions.cpp @@ -3,8 +3,6 @@ #include "providers/twitch/PubsubHelpers.hpp" namespace chatterino { -namespace providers { -namespace twitch { PubSubAction::PubSubAction(const rapidjson::Value &data, const QString &_roomID) : timestamp(std::chrono::steady_clock::now()) @@ -13,6 +11,4 @@ PubSubAction::PubSubAction(const rapidjson::Value &data, const QString &_roomID) getCreatedByUser(data, this->source); } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/PubsubActions.hpp b/src/providers/twitch/PubsubActions.hpp index f108c92b2..095cbad85 100644 --- a/src/providers/twitch/PubsubActions.hpp +++ b/src/providers/twitch/PubsubActions.hpp @@ -7,8 +7,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { struct ActionUser { QString id; @@ -105,6 +103,4 @@ struct ModerationStateAction : PubSubAction { bool modded; }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/PubsubHelpers.cpp b/src/providers/twitch/PubsubHelpers.cpp index 710b59d9d..5f13e1a38 100644 --- a/src/providers/twitch/PubsubHelpers.cpp +++ b/src/providers/twitch/PubsubHelpers.cpp @@ -4,8 +4,6 @@ #include "util/RapidjsonHelpers.hpp" namespace chatterino { -namespace providers { -namespace twitch { const rapidjson::Value &getArgs(const rapidjson::Value &data) { @@ -80,6 +78,4 @@ rapidjson::Document createUnlistenMessage(const std::vector &topics return msg; } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/PubsubHelpers.hpp b/src/providers/twitch/PubsubHelpers.hpp index 8bcb9192f..3be2dbab8 100644 --- a/src/providers/twitch/PubsubHelpers.hpp +++ b/src/providers/twitch/PubsubHelpers.hpp @@ -10,8 +10,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { struct ActionUser; @@ -58,6 +56,4 @@ void runAfter(std::shared_ptr timer, Duration duratio }); } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchAccount.cpp b/src/providers/twitch/TwitchAccount.cpp index 1b4835f85..3cd408510 100644 --- a/src/providers/twitch/TwitchAccount.cpp +++ b/src/providers/twitch/TwitchAccount.cpp @@ -7,8 +7,6 @@ #include "common/UrlFetch.hpp" namespace chatterino { -namespace providers { -namespace twitch { TwitchAccount::TwitchAccount(const QString &_username, const QString &_oauthToken, const QString &_oauthClient, const QString &_userID) @@ -258,6 +256,4 @@ std::set TwitchAccount::getIgnores() const return this->ignores; } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchAccount.hpp b/src/providers/twitch/TwitchAccount.hpp index e47f7788e..cf3ae7df0 100644 --- a/src/providers/twitch/TwitchAccount.hpp +++ b/src/providers/twitch/TwitchAccount.hpp @@ -27,9 +27,6 @@ enum FollowResult { FollowResult_Failed, }; -namespace providers { -namespace twitch { - class TwitchAccount : public controllers::accounts::Account { public: @@ -81,6 +78,4 @@ private: std::set ignores; }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchAccountManager.cpp b/src/providers/twitch/TwitchAccountManager.cpp index 235b6b481..bdb690832 100644 --- a/src/providers/twitch/TwitchAccountManager.cpp +++ b/src/providers/twitch/TwitchAccountManager.cpp @@ -5,8 +5,6 @@ #include "debug/Log.hpp" namespace chatterino { -namespace providers { -namespace twitch { TwitchAccountManager::TwitchAccountManager() : anonymousUser(new TwitchAccount(ANONYMOUS_USERNAME, "", "", "")) @@ -199,6 +197,4 @@ TwitchAccountManager::AddUserResponse TwitchAccountManager::addUser( return AddUserResponse::UserAdded; } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchAccountManager.hpp b/src/providers/twitch/TwitchAccountManager.hpp index cc7d81310..80043b822 100644 --- a/src/providers/twitch/TwitchAccountManager.hpp +++ b/src/providers/twitch/TwitchAccountManager.hpp @@ -15,14 +15,8 @@ // namespace chatterino { -namespace controllers { -namespace accounts { class AccountController; } -} // namespace controllers - -namespace providers { -namespace twitch { class TwitchAccountManager { @@ -74,6 +68,4 @@ private: friend class chatterino::controllers::accounts::AccountController; }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 2e06b03cb..673efb074 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -16,8 +16,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection *_readConnection) : Channel(channelName, Channel::Twitch) @@ -468,6 +466,4 @@ void TwitchChannel::fetchRecentMessages() }); } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchChannel.hpp b/src/providers/twitch/TwitchChannel.hpp index 84b544ffd..2d24e115a 100644 --- a/src/providers/twitch/TwitchChannel.hpp +++ b/src/providers/twitch/TwitchChannel.hpp @@ -14,8 +14,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { class TwitchServer; @@ -133,6 +131,4 @@ private: std::mutex recentChattersMutex; }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchEmotes.cpp b/src/providers/twitch/TwitchEmotes.cpp index 9a9e8ecbd..15fc8a8aa 100644 --- a/src/providers/twitch/TwitchEmotes.cpp +++ b/src/providers/twitch/TwitchEmotes.cpp @@ -9,8 +9,6 @@ #define TWITCH_EMOTE_TEMPLATE "https://static-cdn.jtvnw.net/emoticons/v1/{id}/{scale}" namespace chatterino { -namespace providers { -namespace twitch { namespace { @@ -256,6 +254,4 @@ void TwitchEmotes::loadSetData(std::shared_ptr emoteSet) req.execute(); } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchEmotes.hpp b/src/providers/twitch/TwitchEmotes.hpp index 8bf6e5319..a68d52b68 100644 --- a/src/providers/twitch/TwitchEmotes.hpp +++ b/src/providers/twitch/TwitchEmotes.hpp @@ -11,8 +11,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { class TwitchEmotes { @@ -70,6 +68,4 @@ private: util::ConcurrentMap _twitchEmoteFromCache; }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchHelpers.cpp b/src/providers/twitch/TwitchHelpers.cpp index 8a97dadfc..2ef9c6042 100644 --- a/src/providers/twitch/TwitchHelpers.cpp +++ b/src/providers/twitch/TwitchHelpers.cpp @@ -2,8 +2,6 @@ #include "debug/Log.hpp" namespace chatterino { -namespace providers { -namespace twitch { bool trimChannelName(const QString &channelName, QString &outChannelName) { @@ -17,6 +15,4 @@ bool trimChannelName(const QString &channelName, QString &outChannelName) return true; } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchHelpers.hpp b/src/providers/twitch/TwitchHelpers.hpp index 56f0bb94c..1ef82dea4 100644 --- a/src/providers/twitch/TwitchHelpers.hpp +++ b/src/providers/twitch/TwitchHelpers.hpp @@ -3,11 +3,7 @@ #include namespace chatterino { -namespace providers { -namespace twitch { bool trimChannelName(const QString &channelName, QString &outChannelName); -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index d126cd781..f8e9cd1e9 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -21,8 +21,6 @@ using namespace chatterino::messages; namespace chatterino { -namespace providers { -namespace twitch { TwitchMessageBuilder::TwitchMessageBuilder(Channel *_channel, const Communi::IrcPrivateMessage *_ircMessage, @@ -803,6 +801,4 @@ bool TwitchMessageBuilder::tryParseCheermote(const QString &string) return false; } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchMessageBuilder.hpp b/src/providers/twitch/TwitchMessageBuilder.hpp index a30ba7d15..6155a9d58 100644 --- a/src/providers/twitch/TwitchMessageBuilder.hpp +++ b/src/providers/twitch/TwitchMessageBuilder.hpp @@ -10,10 +10,8 @@ #include namespace chatterino { -class Channel; -namespace providers { -namespace twitch { +class Channel; class TwitchChannel; class TwitchMessageBuilder : public messages::MessageBuilder @@ -70,6 +68,4 @@ private: bool tryParseCheermote(const QString &string); }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchServer.cpp b/src/providers/twitch/TwitchServer.cpp index a17eb6b03..b65381a7d 100644 --- a/src/providers/twitch/TwitchServer.cpp +++ b/src/providers/twitch/TwitchServer.cpp @@ -14,12 +14,9 @@ #include // using namespace Communi; -using namespace chatterino::singletons; using namespace std::chrono_literals; namespace chatterino { -namespace providers { -namespace twitch { TwitchServer::TwitchServer() : whispersChannel(new Channel("/whispers", Channel::TwitchWhispers)) @@ -233,6 +230,4 @@ void TwitchServer::onMessageSendRequested(TwitchChannel *channel, const QString sent = true; } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchServer.hpp b/src/providers/twitch/TwitchServer.hpp index 865062b46..9634a6b05 100644 --- a/src/providers/twitch/TwitchServer.hpp +++ b/src/providers/twitch/TwitchServer.hpp @@ -10,8 +10,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { class TwitchServer final : public irc::AbstractIrcServer { @@ -54,6 +52,4 @@ private: void onMessageSendRequested(TwitchChannel *channel, const QString &message, bool &sent); }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchUser.cpp b/src/providers/twitch/TwitchUser.cpp index f2a75384b..0609dc02a 100644 --- a/src/providers/twitch/TwitchUser.cpp +++ b/src/providers/twitch/TwitchUser.cpp @@ -3,8 +3,6 @@ #include "util/RapidjsonHelpers.hpp" namespace chatterino { -namespace providers { -namespace twitch { TwitchUser TwitchUser::fromJSON(const rapidjson::Value &value) { @@ -29,6 +27,4 @@ TwitchUser TwitchUser::fromJSON(const rapidjson::Value &value) return user; } -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/providers/twitch/TwitchUser.hpp b/src/providers/twitch/TwitchUser.hpp index 50aed9f57..aad39efe0 100644 --- a/src/providers/twitch/TwitchUser.hpp +++ b/src/providers/twitch/TwitchUser.hpp @@ -6,8 +6,6 @@ #include namespace chatterino { -namespace providers { -namespace twitch { struct TwitchUser { QString id; @@ -30,6 +28,4 @@ struct TwitchUser { } }; -} // namespace twitch -} // namespace providers } // namespace chatterino diff --git a/src/singletons/EmoteManager.cpp b/src/singletons/EmoteManager.cpp index 9ee1fe75a..ac7d74aa0 100644 --- a/src/singletons/EmoteManager.cpp +++ b/src/singletons/EmoteManager.cpp @@ -4,7 +4,6 @@ #include "controllers/accounts/AccountController.hpp" namespace chatterino { -namespace singletons { void EmoteManager::initialize() { @@ -21,5 +20,4 @@ void EmoteManager::initialize() this->gifTimer.initialize(); } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/EmoteManager.hpp b/src/singletons/EmoteManager.hpp index 9de3036a9..e8320f59b 100644 --- a/src/singletons/EmoteManager.hpp +++ b/src/singletons/EmoteManager.hpp @@ -9,7 +9,6 @@ #include "singletons/helper/GifTimer.hpp" namespace chatterino { -namespace singletons { class EmoteManager { @@ -26,5 +25,4 @@ public: GIFTimer gifTimer; }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/FontManager.cpp b/src/singletons/FontManager.cpp index 9fbbcd51b..c08976598 100644 --- a/src/singletons/FontManager.cpp +++ b/src/singletons/FontManager.cpp @@ -21,7 +21,6 @@ #endif namespace chatterino { -namespace singletons { FontManager::FontManager() : chatFontFamily("/appearance/currentFontFamily", DEFAULT_FONT_FAMILY) @@ -131,5 +130,4 @@ FontManager::FontData FontManager::createFontData(Type type, float scale) } } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/FontManager.hpp b/src/singletons/FontManager.hpp index 4e4f489e1..5796adfe8 100644 --- a/src/singletons/FontManager.hpp +++ b/src/singletons/FontManager.hpp @@ -10,7 +10,6 @@ #include namespace chatterino { -namespace singletons { class FontManager : boost::noncopyable { @@ -78,8 +77,6 @@ private: std::vector> fontsByType; }; -} // namespace singletons - using FontStyle = singletons::FontManager::Type; } // namespace chatterino diff --git a/src/singletons/LoggingManager.cpp b/src/singletons/LoggingManager.cpp index 354615997..b91975d11 100644 --- a/src/singletons/LoggingManager.cpp +++ b/src/singletons/LoggingManager.cpp @@ -11,7 +11,6 @@ #include namespace chatterino { -namespace singletons { void LoggingManager::initialize() { @@ -37,5 +36,4 @@ void LoggingManager::addMessage(const QString &channelName, messages::MessagePtr } } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/LoggingManager.hpp b/src/singletons/LoggingManager.hpp index 058bab4d9..539a9fd46 100644 --- a/src/singletons/LoggingManager.hpp +++ b/src/singletons/LoggingManager.hpp @@ -6,7 +6,7 @@ #include namespace chatterino { -namespace singletons { + class PathManager; class LoggingManager @@ -26,5 +26,4 @@ private: std::map> loggingChannels; }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/NativeMessagingManager.cpp b/src/singletons/NativeMessagingManager.cpp index 3f01efac2..3bcfd295f 100644 --- a/src/singletons/NativeMessagingManager.cpp +++ b/src/singletons/NativeMessagingManager.cpp @@ -30,7 +30,6 @@ namespace ipc = boost::interprocess; #define MESSAGE_SIZE 1024 namespace chatterino { -namespace singletons { // fourtf: don't add this class to the application class NativeMessagingManager::NativeMessagingManager() @@ -240,5 +239,4 @@ std::string &NativeMessagingManager::getGuiMessageQueueName() return name; } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/NativeMessagingManager.hpp b/src/singletons/NativeMessagingManager.hpp index 1c590b308..d71f89871 100644 --- a/src/singletons/NativeMessagingManager.hpp +++ b/src/singletons/NativeMessagingManager.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace singletons { class NativeMessagingManager { @@ -30,5 +29,4 @@ public: static std::string &getGuiMessageQueueName(); }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/PathManager.cpp b/src/singletons/PathManager.cpp index d64b73b88..52e926449 100644 --- a/src/singletons/PathManager.cpp +++ b/src/singletons/PathManager.cpp @@ -9,7 +9,6 @@ #include "util/CombinePath.hpp" namespace chatterino { -namespace singletons { PathManager *PathManager::instance = nullptr; @@ -116,5 +115,4 @@ void PathManager::initSubDirectories() this->miscDirectory = makePath("Misc"); } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/PathManager.hpp b/src/singletons/PathManager.hpp index 27a672c15..a189f9639 100644 --- a/src/singletons/PathManager.hpp +++ b/src/singletons/PathManager.hpp @@ -4,7 +4,6 @@ #include namespace chatterino { -namespace singletons { class PathManager { @@ -46,5 +45,4 @@ private: void initSubDirectories(); }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/ResourceManager.cpp b/src/singletons/ResourceManager.cpp index bc600458c..9ae25dced 100644 --- a/src/singletons/ResourceManager.cpp +++ b/src/singletons/ResourceManager.cpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace singletons { namespace { @@ -453,5 +452,4 @@ void ResourceManager::loadChatterinoBadges() }); } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/ResourceManager.hpp b/src/singletons/ResourceManager.hpp index 42ac18ce7..fe1b3554b 100644 --- a/src/singletons/ResourceManager.hpp +++ b/src/singletons/ResourceManager.hpp @@ -10,7 +10,6 @@ #include namespace chatterino { -namespace singletons { class ResourceManager { @@ -154,5 +153,4 @@ public: void loadChatterinoBadges(); }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/SettingsManager.cpp b/src/singletons/SettingsManager.cpp index 7a0efa900..72276c11e 100644 --- a/src/singletons/SettingsManager.cpp +++ b/src/singletons/SettingsManager.cpp @@ -6,10 +6,7 @@ #include "singletons/ResourceManager.hpp" #include "singletons/WindowManager.hpp" -using namespace chatterino::messages; - namespace chatterino { -namespace singletons { std::vector> _settings; @@ -227,5 +224,4 @@ void SettingManager::updateModerationActions() } } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/SettingsManager.hpp b/src/singletons/SettingsManager.hpp index 968733b61..809f49c08 100644 --- a/src/singletons/SettingsManager.hpp +++ b/src/singletons/SettingsManager.hpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace singletons { void _actuallyRegisterSetting(std::weak_ptr setting); @@ -148,5 +147,4 @@ private: pajlada::Settings::SettingListener wordFlagsListener; }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/ThemeManager.cpp b/src/singletons/ThemeManager.cpp index fc7e4df29..5ebcef132 100644 --- a/src/singletons/ThemeManager.cpp +++ b/src/singletons/ThemeManager.cpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace singletons { namespace detail { @@ -254,5 +253,4 @@ void ThemeManager::normalizeColor(QColor &color) } } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/ThemeManager.hpp b/src/singletons/ThemeManager.hpp index 6ffbb04ab..d0157f183 100644 --- a/src/singletons/ThemeManager.hpp +++ b/src/singletons/ThemeManager.hpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace singletons { class WindowManager; @@ -151,5 +150,4 @@ private: friend class WindowManager; }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/UpdateManager.cpp b/src/singletons/UpdateManager.cpp index 0e0760f19..7c0215136 100644 --- a/src/singletons/UpdateManager.cpp +++ b/src/singletons/UpdateManager.cpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace singletons { UpdateManager::UpdateManager() : currentVersion_(CHATTERINO_VERSION) @@ -155,5 +154,4 @@ void UpdateManager::setStatus_(UpdateStatus status) } } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/UpdateManager.hpp b/src/singletons/UpdateManager.hpp index f188422ed..e2f7a7b17 100644 --- a/src/singletons/UpdateManager.hpp +++ b/src/singletons/UpdateManager.hpp @@ -4,7 +4,6 @@ #include namespace chatterino { -namespace singletons { class UpdateManager { @@ -43,5 +42,4 @@ private: void setStatus_(UpdateStatus status); }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/WindowManager.cpp b/src/singletons/WindowManager.cpp index b65b45b22..56f9369ec 100644 --- a/src/singletons/WindowManager.cpp +++ b/src/singletons/WindowManager.cpp @@ -20,7 +20,6 @@ #define SETTINGS_FILENAME "/window-layout.json" namespace chatterino { -namespace singletons { using SplitNode = widgets::SplitContainer::Node; using SplitDirection = widgets::SplitContainer::Direction; @@ -464,5 +463,4 @@ float WindowManager::getUiScaleValue(int scale) } } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/WindowManager.hpp b/src/singletons/WindowManager.hpp index 79fa06e59..fa978f3c1 100644 --- a/src/singletons/WindowManager.hpp +++ b/src/singletons/WindowManager.hpp @@ -4,10 +4,6 @@ #include "widgets/Window.hpp" namespace chatterino { -// namespace widgets { -// struct SplitContainer::Node; -//} -namespace singletons { class WindowManager { @@ -65,5 +61,4 @@ public: static IndirectChannel decodeChannel(const QJsonObject &obj); }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/ChatterinoSetting.cpp b/src/singletons/helper/ChatterinoSetting.cpp index 6a3b40797..9e3de9c24 100644 --- a/src/singletons/helper/ChatterinoSetting.cpp +++ b/src/singletons/helper/ChatterinoSetting.cpp @@ -3,12 +3,10 @@ #include "singletons/SettingsManager.hpp" namespace chatterino { -namespace singletons { void _registerSetting(std::weak_ptr setting) { _actuallyRegisterSetting(setting); } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/ChatterinoSetting.hpp b/src/singletons/helper/ChatterinoSetting.hpp index 824cb1633..373d9f6fd 100644 --- a/src/singletons/helper/ChatterinoSetting.hpp +++ b/src/singletons/helper/ChatterinoSetting.hpp @@ -1,7 +1,6 @@ #pragma once namespace chatterino { -namespace singletons { void _registerSetting(std::weak_ptr setting); @@ -42,5 +41,4 @@ public: using pajlada::Settings::Setting::operator const Type; }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/GifTimer.cpp b/src/singletons/helper/GifTimer.cpp index 6bc416fed..2c17e38b9 100644 --- a/src/singletons/helper/GifTimer.cpp +++ b/src/singletons/helper/GifTimer.cpp @@ -5,7 +5,6 @@ #include "singletons/WindowManager.hpp" namespace chatterino { -namespace singletons { void GIFTimer::initialize() { @@ -27,5 +26,4 @@ void GIFTimer::initialize() }); } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/GifTimer.hpp b/src/singletons/helper/GifTimer.hpp index 5078bb06a..b44fcfb7f 100644 --- a/src/singletons/helper/GifTimer.hpp +++ b/src/singletons/helper/GifTimer.hpp @@ -4,7 +4,6 @@ #include namespace chatterino { -namespace singletons { class GIFTimer { @@ -17,5 +16,4 @@ private: QTimer timer; }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/LoggingChannel.cpp b/src/singletons/helper/LoggingChannel.cpp index 033963f7e..15d0b66a0 100644 --- a/src/singletons/helper/LoggingChannel.cpp +++ b/src/singletons/helper/LoggingChannel.cpp @@ -10,7 +10,6 @@ #include namespace chatterino { -namespace singletons { QByteArray endline("\n"); @@ -132,5 +131,4 @@ QString LoggingChannel::generateDateString(const QDateTime &now) return now.toString("yyyy-MM-dd"); } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/LoggingChannel.hpp b/src/singletons/helper/LoggingChannel.hpp index 0204a2088..83ff6f809 100644 --- a/src/singletons/helper/LoggingChannel.hpp +++ b/src/singletons/helper/LoggingChannel.hpp @@ -10,7 +10,6 @@ #include namespace chatterino { -namespace singletons { class LoggingChannel : boost::noncopyable { @@ -41,5 +40,4 @@ private: friend class LoggingManager; }; -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/ModerationAction.cpp b/src/singletons/helper/ModerationAction.cpp index dbd542b24..7a5f061a4 100644 --- a/src/singletons/helper/ModerationAction.cpp +++ b/src/singletons/helper/ModerationAction.cpp @@ -3,7 +3,6 @@ #include "singletons/ResourceManager.hpp" namespace chatterino { -namespace singletons { ModerationAction::ModerationAction(messages::Image *_image, const QString &_action) : _isImage(true) @@ -47,5 +46,4 @@ const QString &ModerationAction::getAction() const return this->action; } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/ModerationAction.hpp b/src/singletons/helper/ModerationAction.hpp index 0f081c9f4..7d37ccaca 100644 --- a/src/singletons/helper/ModerationAction.hpp +++ b/src/singletons/helper/ModerationAction.hpp @@ -4,11 +4,7 @@ namespace chatterino { -namespace messages { class Image; -} // namespace messages - -namespace singletons { class ModerationAction { @@ -30,5 +26,4 @@ private: QString action; }; -} // namespace singletons } // namespace chatterino diff --git a/src/util/Clamp.hpp b/src/util/Clamp.hpp index 767c0f1cf..5a3e46e72 100644 --- a/src/util/Clamp.hpp +++ b/src/util/Clamp.hpp @@ -1,7 +1,6 @@ #pragma once namespace chatterino { -namespace util { // http://en.cppreference.com/w/cpp/algorithm/clamp @@ -11,5 +10,4 @@ constexpr const T &clamp(const T &v, const T &lo, const T &hi) return assert(!(hi < lo)), (v < lo) ? lo : (hi < v) ? hi : v; } -} // namespace util } // namespace chatterino diff --git a/src/util/CombinePath.hpp b/src/util/CombinePath.hpp index 79a4262b9..c7ed22b1a 100644 --- a/src/util/CombinePath.hpp +++ b/src/util/CombinePath.hpp @@ -4,7 +4,6 @@ #include namespace chatterino { -namespace util { // https://stackoverflow.com/a/13014491 static QString combinePath(const QString &a, const QString &b) @@ -12,5 +11,4 @@ static QString combinePath(const QString &a, const QString &b) return QDir::cleanPath(a + QDir::separator() + b); } -} // namespace util } // namespace chatterino diff --git a/src/util/ConcurrentMap.hpp b/src/util/ConcurrentMap.hpp index d06023517..2db2d9f58 100644 --- a/src/util/ConcurrentMap.hpp +++ b/src/util/ConcurrentMap.hpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace util { template class ConcurrentMap @@ -95,5 +94,4 @@ private: QMap data; }; -} // namespace util } // namespace chatterino diff --git a/src/util/DebugCount.cpp b/src/util/DebugCount.cpp index 79261c1db..f75015eb4 100644 --- a/src/util/DebugCount.cpp +++ b/src/util/DebugCount.cpp @@ -1,10 +1,8 @@ #include "DebugCount.hpp" namespace chatterino { -namespace util { QMap DebugCount::counts; std::mutex DebugCount::mut; -} // namespace util } // namespace chatterino diff --git a/src/util/DebugCount.hpp b/src/util/DebugCount.hpp index 275e5692c..faea3ebef 100644 --- a/src/util/DebugCount.hpp +++ b/src/util/DebugCount.hpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace util { class DebugCount { @@ -56,5 +55,4 @@ public: } }; -} // namespace util } // namespace chatterino diff --git a/src/util/DistanceBetweenPoints.hpp b/src/util/DistanceBetweenPoints.hpp index 098aab1a6..591706381 100644 --- a/src/util/DistanceBetweenPoints.hpp +++ b/src/util/DistanceBetweenPoints.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace util { static float distanceBetweenPoints(const QPointF &p1, const QPointF &p2) { @@ -18,5 +17,4 @@ static float distanceBetweenPoints(const QPointF &p1, const QPointF &p2) return sqrt(distance); } -} // namespace util } // namespace chatterino diff --git a/src/util/IrcHelpers.hpp b/src/util/IrcHelpers.hpp index 6816c8a82..6ae09d94b 100644 --- a/src/util/IrcHelpers.hpp +++ b/src/util/IrcHelpers.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace util { inline QString parseTagString(const QString &input) { @@ -50,5 +49,4 @@ inline QString parseTagString(const QString &input) return output; } -} // namespace util } // namespace chatterino diff --git a/src/util/LayoutCreator.hpp b/src/util/LayoutCreator.hpp index 318765f35..7cdec41b4 100644 --- a/src/util/LayoutCreator.hpp +++ b/src/util/LayoutCreator.hpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace util { template class LayoutCreator @@ -151,5 +150,4 @@ private: } }; -} // namespace util } // namespace chatterino diff --git a/src/util/NativeEventHelper.hpp b/src/util/NativeEventHelper.hpp index b78f8dae6..b9b0522a2 100644 --- a/src/util/NativeEventHelper.hpp +++ b/src/util/NativeEventHelper.hpp @@ -8,7 +8,6 @@ #include namespace chatterino { -namespace util { // static boost::optional getWindowDpi(quintptr ptr) //{ @@ -51,7 +50,6 @@ namespace util { //}; //#endif -} // namespace util } // namespace chatterino #endif diff --git a/src/util/PostToThread.hpp b/src/util/PostToThread.hpp index 12bdb9a37..add2bceac 100644 --- a/src/util/PostToThread.hpp +++ b/src/util/PostToThread.hpp @@ -10,7 +10,6 @@ #define async_exec(a) QThreadPool::globalInstance()->start(new LambdaRunnable(a)); namespace chatterino { -namespace util { class LambdaRunnable : public QRunnable { @@ -56,5 +55,4 @@ static void postToThread(F &&fun, QObject *obj = qApp) QCoreApplication::postEvent(obj, new Event(std::forward(fun))); } -} // namespace util } // namespace chatterino diff --git a/src/util/QstringHash.hpp b/src/util/QstringHash.hpp index d108de7cc..2d75ae251 100644 --- a/src/util/QstringHash.hpp +++ b/src/util/QstringHash.hpp @@ -4,6 +4,7 @@ #include namespace std { + template <> struct hash { std::size_t operator()(const QString &s) const @@ -11,4 +12,5 @@ struct hash { return qHash(s); } }; + } // namespace std diff --git a/src/util/RemoveScrollAreaBackground.hpp b/src/util/RemoveScrollAreaBackground.hpp index 48bc14637..66629c4e7 100644 --- a/src/util/RemoveScrollAreaBackground.hpp +++ b/src/util/RemoveScrollAreaBackground.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace util { static void removeScrollAreaBackground(QScrollArea *scrollArea, QWidget *childWidget) { @@ -16,5 +15,4 @@ static void removeScrollAreaBackground(QScrollArea *scrollArea, QWidget *childWi childWidget->setPalette(p); } -} // namespace util } // namespace chatterino diff --git a/src/util/SharedPtrElementLess.hpp b/src/util/SharedPtrElementLess.hpp index a046fec10..0fa121a1d 100644 --- a/src/util/SharedPtrElementLess.hpp +++ b/src/util/SharedPtrElementLess.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace util { template struct SharedPtrElementLess { @@ -13,5 +12,4 @@ struct SharedPtrElementLess { } }; -} // namespace util } // namespace chatterino diff --git a/src/util/StandardItemHelper.hpp b/src/util/StandardItemHelper.hpp index 42535d8f1..860dddc2a 100644 --- a/src/util/StandardItemHelper.hpp +++ b/src/util/StandardItemHelper.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace util { static void setBoolItem(QStandardItem *item, bool value, bool userCheckable = true, bool selectable = true) @@ -28,5 +27,4 @@ static QStandardItem *emptyItem() return item; } -} // namespace util } // namespace chatterino diff --git a/src/util/StreamLink.cpp b/src/util/StreamLink.cpp index 15a807ec3..e34c90b35 100644 --- a/src/util/StreamLink.cpp +++ b/src/util/StreamLink.cpp @@ -12,7 +12,6 @@ #include namespace chatterino { -namespace streamlink { namespace { @@ -202,5 +201,4 @@ void Start(const QString &channel) OpenStreamlink(channelURL, quality, args); } -} // namespace streamlink } // namespace chatterino diff --git a/src/util/StreamLink.hpp b/src/util/StreamLink.hpp index b38da260e..fcbdaa003 100644 --- a/src/util/StreamLink.hpp +++ b/src/util/StreamLink.hpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace streamlink { class Exception : public std::runtime_error { @@ -24,5 +23,4 @@ void OpenStreamlink(const QString &channelURL, const QString &quality, // and opening a quality dialog if the quality is "Choose" void Start(const QString &channel); -} // namespace streamlink } // namespace chatterino diff --git a/src/util/WindowsHelper.cpp b/src/util/WindowsHelper.cpp index 97cd2a28c..743362ade 100644 --- a/src/util/WindowsHelper.cpp +++ b/src/util/WindowsHelper.cpp @@ -3,7 +3,6 @@ #ifdef USEWINSDK namespace chatterino { -namespace util { typedef enum MONITOR_DPI_TYPE { MDT_EFFECTIVE_DPI = 0, @@ -32,7 +31,6 @@ boost::optional getWindowDpi(HWND hwnd) return boost::none; } -} // namespace util } // namespace chatterino #endif diff --git a/src/util/WindowsHelper.hpp b/src/util/WindowsHelper.hpp index 5ecc03424..fdbafa9c2 100644 --- a/src/util/WindowsHelper.hpp +++ b/src/util/WindowsHelper.hpp @@ -6,11 +6,9 @@ #include namespace chatterino { -namespace util { boost::optional getWindowDpi(HWND hwnd); -} // namespace util } // namespace chatterino #endif diff --git a/src/widgets/AccountSwitchPopupWidget.cpp b/src/widgets/AccountSwitchPopupWidget.cpp index 044250a6d..f4abcc4b9 100644 --- a/src/widgets/AccountSwitchPopupWidget.cpp +++ b/src/widgets/AccountSwitchPopupWidget.cpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace widgets { AccountSwitchPopupWidget::AccountSwitchPopupWidget(QWidget *parent) : QWidget(parent) @@ -58,5 +57,4 @@ void AccountSwitchPopupWidget::paintEvent(QPaintEvent *) painter.drawRect(0, 0, this->width() - 1, this->height() - 1); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/AccountSwitchPopupWidget.hpp b/src/widgets/AccountSwitchPopupWidget.hpp index 4cc8f09b8..7e80b5258 100644 --- a/src/widgets/AccountSwitchPopupWidget.hpp +++ b/src/widgets/AccountSwitchPopupWidget.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace widgets { class AccountSwitchPopupWidget : public QWidget { @@ -26,5 +25,4 @@ private: } ui; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/AccountSwitchWidget.cpp b/src/widgets/AccountSwitchWidget.cpp index ae126a4fe..9eccaef67 100644 --- a/src/widgets/AccountSwitchWidget.cpp +++ b/src/widgets/AccountSwitchWidget.cpp @@ -5,7 +5,6 @@ #include "controllers/accounts/AccountController.hpp" namespace chatterino { -namespace widgets { AccountSwitchWidget::AccountSwitchWidget(QWidget *parent) : QListWidget(parent) @@ -81,5 +80,4 @@ void AccountSwitchWidget::refreshSelection() this->blockSignals(false); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/AccountSwitchWidget.hpp b/src/widgets/AccountSwitchWidget.hpp index 14a29a020..8d236766d 100644 --- a/src/widgets/AccountSwitchWidget.hpp +++ b/src/widgets/AccountSwitchWidget.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace widgets { class AccountSwitchWidget : public QListWidget { @@ -18,5 +17,4 @@ private: void refreshSelection(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/AttachedWindow.cpp b/src/widgets/AttachedWindow.cpp index 0adb1ed83..5a68d3686 100644 --- a/src/widgets/AttachedWindow.cpp +++ b/src/widgets/AttachedWindow.cpp @@ -17,7 +17,6 @@ #endif namespace chatterino { -namespace widgets { AttachedWindow::AttachedWindow(void *_target, int _yOffset) : QWidget(nullptr, Qt::FramelessWindowHint | Qt::Window) @@ -214,5 +213,4 @@ void AttachedWindow::updateWindowRect_(void *_attachedPtr) std::vector AttachedWindow::items; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/AttachedWindow.hpp b/src/widgets/AttachedWindow.hpp index ccf16142c..ca4317250 100644 --- a/src/widgets/AttachedWindow.hpp +++ b/src/widgets/AttachedWindow.hpp @@ -6,7 +6,6 @@ #include "widgets/splits/Split.hpp" namespace chatterino { -namespace widgets { class AttachedWindow : public QWidget { @@ -58,5 +57,4 @@ private: static std::vector items; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/BaseWidget.cpp b/src/widgets/BaseWidget.cpp index c0cee0484..9e33b20d9 100644 --- a/src/widgets/BaseWidget.cpp +++ b/src/widgets/BaseWidget.cpp @@ -13,7 +13,6 @@ #include namespace chatterino { -namespace widgets { BaseWidget::BaseWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) @@ -150,5 +149,4 @@ void BaseWidget::themeRefreshEvent() // Do any color scheme updates here } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/BaseWidget.hpp b/src/widgets/BaseWidget.hpp index 681c8e944..7bead3ea0 100644 --- a/src/widgets/BaseWidget.hpp +++ b/src/widgets/BaseWidget.hpp @@ -5,12 +5,8 @@ #include namespace chatterino { -namespace singletons { + class ThemeManager; -} // namespace singletons - -namespace widgets { - class BaseWindow; class BaseWidget : public QWidget @@ -60,5 +56,4 @@ private: friend class BaseWindow; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index b48ca7202..e29fdf234 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -39,7 +39,6 @@ #include "widgets/helper/TitlebarButton.hpp" namespace chatterino { -namespace widgets { BaseWindow::BaseWindow(QWidget *parent, Flags _flags) : BaseWidget(parent, @@ -172,7 +171,6 @@ void BaseWindow::init() // this->setWindowFlag(Qt::WindowStaysOnTopHint); // } #endif -} // namespace widgets void BaseWindow::setStayInScreenRect(bool value) { @@ -686,5 +684,4 @@ void BaseWindow::calcButtonsSizes() } } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/BaseWindow.hpp b/src/widgets/BaseWindow.hpp index f41dbec06..f4505ec0d 100644 --- a/src/widgets/BaseWindow.hpp +++ b/src/widgets/BaseWindow.hpp @@ -9,7 +9,6 @@ class QHBoxLayout; namespace chatterino { -namespace widgets { class RippleEffectButton; class RippleEffectLabel; @@ -97,5 +96,4 @@ private: pajlada::Signals::SignalHolder connections_; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Label.cpp b/src/widgets/Label.cpp index a990f8ac5..ca851d4b5 100644 --- a/src/widgets/Label.cpp +++ b/src/widgets/Label.cpp @@ -6,8 +6,6 @@ namespace chatterino { -namespace widgets { - Label::Label(QString text, FontStyle style) : Label(nullptr, text, style) { @@ -134,5 +132,4 @@ int Label::getOffset() return this->hasOffset_ ? int(8 * this->getScale()) : 0; } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Label.hpp b/src/widgets/Label.hpp index 2c6b47ca1..ed2d0d3aa 100644 --- a/src/widgets/Label.hpp +++ b/src/widgets/Label.hpp @@ -6,7 +6,6 @@ #include namespace chatterino { -namespace widgets { class Label : public BaseWidget { @@ -47,5 +46,4 @@ private: int getOffset(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Notebook.cpp b/src/widgets/Notebook.cpp index ff7a2e79e..14ebed1a9 100644 --- a/src/widgets/Notebook.cpp +++ b/src/widgets/Notebook.cpp @@ -23,7 +23,6 @@ #include namespace chatterino { -namespace widgets { Notebook::Notebook(QWidget *parent) : BaseWidget(parent) @@ -467,5 +466,4 @@ SplitContainer *SplitNotebook::getOrAddSelectedPage() return selectedPage != nullptr ? (SplitContainer *)selectedPage : this->addPage(); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Notebook.hpp b/src/widgets/Notebook.hpp index c25925ca5..757495f2d 100644 --- a/src/widgets/Notebook.hpp +++ b/src/widgets/Notebook.hpp @@ -11,7 +11,6 @@ #include namespace chatterino { -namespace widgets { class Window; @@ -93,5 +92,4 @@ private: std::vector uniqueConnections; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Scrollbar.cpp b/src/widgets/Scrollbar.cpp index d8fd70151..d3a9e1dee 100644 --- a/src/widgets/Scrollbar.cpp +++ b/src/widgets/Scrollbar.cpp @@ -14,7 +14,6 @@ #define MIN_THUMB_HEIGHT 10 namespace chatterino { -namespace widgets { Scrollbar::Scrollbar(ChannelView *parent) : BaseWidget(parent) @@ -382,5 +381,4 @@ void Scrollbar::updateScroll() this->update(); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Scrollbar.hpp b/src/widgets/Scrollbar.hpp index b6f11896c..17db6a2ca 100644 --- a/src/widgets/Scrollbar.hpp +++ b/src/widgets/Scrollbar.hpp @@ -12,8 +12,6 @@ namespace chatterino { -namespace widgets { - class ChannelView; class Scrollbar : public BaseWidget @@ -100,5 +98,4 @@ private: void updateScroll(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/StreamView.cpp b/src/widgets/StreamView.cpp index 5d5b25e46..f59fadd13 100644 --- a/src/widgets/StreamView.cpp +++ b/src/widgets/StreamView.cpp @@ -10,7 +10,6 @@ #endif namespace chatterino { -namespace widgets { StreamView::StreamView(ChannelPtr channel, const QUrl &url) { @@ -30,5 +29,4 @@ StreamView::StreamView(ChannelPtr channel, const QUrl &url) this->layout()->setMargin(0); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/StreamView.hpp b/src/widgets/StreamView.hpp index af54f4fe6..a542e7764 100644 --- a/src/widgets/StreamView.hpp +++ b/src/widgets/StreamView.hpp @@ -11,8 +11,6 @@ namespace chatterino { class Channel; -namespace widgets { - class StreamView : public QWidget { public: @@ -24,5 +22,4 @@ private: #endif }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/TooltipWidget.cpp b/src/widgets/TooltipWidget.cpp index f30734f92..fca89cd5f 100644 --- a/src/widgets/TooltipWidget.cpp +++ b/src/widgets/TooltipWidget.cpp @@ -14,7 +14,6 @@ #endif namespace chatterino { -namespace widgets { TooltipWidget *TooltipWidget::getInstance() { @@ -96,5 +95,4 @@ void TooltipWidget::leaveEvent(QEvent *) // clear parents event } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/TooltipWidget.hpp b/src/widgets/TooltipWidget.hpp index ac89e0d81..ac452e726 100644 --- a/src/widgets/TooltipWidget.hpp +++ b/src/widgets/TooltipWidget.hpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace widgets { class TooltipWidget : public BaseWindow { @@ -38,5 +37,4 @@ private: void updateFont(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index 93e284103..7c34bfa58 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -25,7 +25,6 @@ #include namespace chatterino { -namespace widgets { Window::Window(WindowType _type) : BaseWindow(nullptr, BaseWindow::EnableCustomFrame) @@ -282,5 +281,4 @@ void Window::closeEvent(QCloseEvent *) } } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/Window.hpp b/src/widgets/Window.hpp index fe431500c..1d0784e92 100644 --- a/src/widgets/Window.hpp +++ b/src/widgets/Window.hpp @@ -12,11 +12,8 @@ #include namespace chatterino { -namespace singletons { -class ThemeManager; -} // namespace singletons -namespace widgets { +class ThemeManager; class Window : public BaseWindow { @@ -58,5 +55,4 @@ public: void save(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/EmotePopup.cpp b/src/widgets/dialogs/EmotePopup.cpp index 91595b220..d3b0181f7 100644 --- a/src/widgets/dialogs/EmotePopup.cpp +++ b/src/widgets/dialogs/EmotePopup.cpp @@ -10,11 +10,7 @@ #include #include -using namespace chatterino::providers::twitch; -using namespace chatterino::messages; - namespace chatterino { -namespace widgets { EmotePopup::EmotePopup() : BaseWindow(nullptr, BaseWindow::EnableCustomFrame) @@ -162,5 +158,4 @@ void EmotePopup::loadEmojis() this->viewEmojis->setChannel(emojiChannel); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/EmotePopup.hpp b/src/widgets/dialogs/EmotePopup.hpp index 2fd655944..37436ede3 100644 --- a/src/widgets/dialogs/EmotePopup.hpp +++ b/src/widgets/dialogs/EmotePopup.hpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace widgets { class EmotePopup : public BaseWindow { @@ -24,5 +23,4 @@ private: ChannelView *viewEmojis; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/LastRunCrashDialog.cpp b/src/widgets/dialogs/LastRunCrashDialog.cpp index 427856eb5..d5c3248b0 100644 --- a/src/widgets/dialogs/LastRunCrashDialog.cpp +++ b/src/widgets/dialogs/LastRunCrashDialog.cpp @@ -10,7 +10,6 @@ #include "util/PostToThread.hpp" namespace chatterino { -namespace widgets { LastRunCrashDialog::LastRunCrashDialog() { @@ -85,5 +84,4 @@ LastRunCrashDialog::LastRunCrashDialog() // }); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/LastRunCrashDialog.hpp b/src/widgets/dialogs/LastRunCrashDialog.hpp index 23bcd2e36..106ed0961 100644 --- a/src/widgets/dialogs/LastRunCrashDialog.hpp +++ b/src/widgets/dialogs/LastRunCrashDialog.hpp @@ -4,7 +4,6 @@ #include namespace chatterino { -namespace widgets { class LastRunCrashDialog : public QDialog, pajlada::Signals::SignalHolder { @@ -12,5 +11,4 @@ public: LastRunCrashDialog(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/LoginDialog.cpp b/src/widgets/dialogs/LoginDialog.cpp index 0ef7edfcb..ac9848076 100644 --- a/src/widgets/dialogs/LoginDialog.cpp +++ b/src/widgets/dialogs/LoginDialog.cpp @@ -13,7 +13,6 @@ #include namespace chatterino { -namespace widgets { namespace { @@ -215,5 +214,4 @@ LoginWidget::LoginWidget() this->ui.mainLayout.addWidget(&this->ui.buttonBox); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/LoginDialog.hpp b/src/widgets/dialogs/LoginDialog.hpp index 23c1195a3..6394868df 100644 --- a/src/widgets/dialogs/LoginDialog.hpp +++ b/src/widgets/dialogs/LoginDialog.hpp @@ -18,7 +18,6 @@ #include namespace chatterino { -namespace widgets { class BasicLoginWidget : public QWidget { @@ -86,5 +85,4 @@ private: } ui; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/NotificationPopup.cpp b/src/widgets/dialogs/NotificationPopup.cpp index 7de2a434c..21965e10a 100644 --- a/src/widgets/dialogs/NotificationPopup.cpp +++ b/src/widgets/dialogs/NotificationPopup.cpp @@ -7,7 +7,6 @@ #include namespace chatterino { -namespace widgets { NotificationPopup::NotificationPopup() : BaseWindow((QWidget *)nullptr, BaseWindow::Frameless) @@ -46,5 +45,4 @@ void NotificationPopup::addMessage(messages::MessagePtr msg) // QTimer::singleShot(5000, this, [this, msg] { this->channel->remove }); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/NotificationPopup.hpp b/src/widgets/dialogs/NotificationPopup.hpp index e343db3ab..cb2e15ff2 100644 --- a/src/widgets/dialogs/NotificationPopup.hpp +++ b/src/widgets/dialogs/NotificationPopup.hpp @@ -5,7 +5,6 @@ #include "widgets/BaseWindow.hpp" namespace chatterino { -namespace widgets { class ChannelView; @@ -23,5 +22,4 @@ private: ChannelPtr channel; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/QualityPopup.cpp b/src/widgets/dialogs/QualityPopup.cpp index 27e3d898a..eb2a2d00b 100644 --- a/src/widgets/dialogs/QualityPopup.cpp +++ b/src/widgets/dialogs/QualityPopup.cpp @@ -3,7 +3,6 @@ #include "util/StreamLink.hpp" namespace chatterino { -namespace widgets { QualityPopup::QualityPopup(const QString &_channelName, QStringList options) : channelName(_channelName) @@ -57,5 +56,4 @@ void QualityPopup::cancelButtonClicked() this->close(); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/QualityPopup.hpp b/src/widgets/dialogs/QualityPopup.hpp index 251cecfc0..640441e25 100644 --- a/src/widgets/dialogs/QualityPopup.hpp +++ b/src/widgets/dialogs/QualityPopup.hpp @@ -8,7 +8,6 @@ #include namespace chatterino { -namespace widgets { class QualityPopup : public BaseWindow { @@ -31,5 +30,4 @@ private: void cancelButtonClicked(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/SelectChannelDialog.cpp b/src/widgets/dialogs/SelectChannelDialog.cpp index 3e0e14571..a7b4adacb 100644 --- a/src/widgets/dialogs/SelectChannelDialog.cpp +++ b/src/widgets/dialogs/SelectChannelDialog.cpp @@ -14,7 +14,6 @@ #define TAB_TWITCH 0 namespace chatterino { -namespace widgets { SelectChannelDialog::SelectChannelDialog(QWidget *parent) : BaseWindow(parent, BaseWindow::EnableCustomFrame) @@ -279,5 +278,4 @@ void SelectChannelDialog::themeRefreshEvent() } } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/SelectChannelDialog.hpp b/src/widgets/dialogs/SelectChannelDialog.hpp index e41bccb4b..c48e921ca 100644 --- a/src/widgets/dialogs/SelectChannelDialog.hpp +++ b/src/widgets/dialogs/SelectChannelDialog.hpp @@ -10,7 +10,6 @@ #include namespace chatterino { -namespace widgets { class SelectChannelDialog : public BaseWindow { @@ -57,5 +56,4 @@ private: friend class EventFilter; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/SettingsDialog.cpp b/src/widgets/dialogs/SettingsDialog.cpp index 7e97d3e1d..c48a321cd 100644 --- a/src/widgets/dialogs/SettingsDialog.cpp +++ b/src/widgets/dialogs/SettingsDialog.cpp @@ -21,7 +21,6 @@ #include namespace chatterino { -namespace widgets { SettingsDialog *SettingsDialog::handle = nullptr; @@ -224,5 +223,4 @@ void SettingsDialog::cancelButtonClicked() this->close(); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/SettingsDialog.hpp b/src/widgets/dialogs/SettingsDialog.hpp index 9eefadf56..0fc4581ad 100644 --- a/src/widgets/dialogs/SettingsDialog.hpp +++ b/src/widgets/dialogs/SettingsDialog.hpp @@ -9,12 +9,8 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { class SettingsPage; -} // namespace settingspages - class SettingsDialogTab; class SettingsDialog : public BaseWindow @@ -65,5 +61,4 @@ private: // static void setChildrensFont(QLayout *object, QFont &font, int indent = 0); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/TextInputDialog.cpp b/src/widgets/dialogs/TextInputDialog.cpp index 589e06b24..ddcef0008 100644 --- a/src/widgets/dialogs/TextInputDialog.cpp +++ b/src/widgets/dialogs/TextInputDialog.cpp @@ -2,7 +2,6 @@ #include namespace chatterino { -namespace widgets { TextInputDialog::TextInputDialog(QWidget *parent) : QDialog(parent) @@ -42,5 +41,4 @@ void TextInputDialog::highlightText() this->_lineEdit.selectAll(); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/TextInputDialog.hpp b/src/widgets/dialogs/TextInputDialog.hpp index feb7b0471..698818498 100644 --- a/src/widgets/dialogs/TextInputDialog.hpp +++ b/src/widgets/dialogs/TextInputDialog.hpp @@ -8,7 +8,6 @@ #include namespace chatterino { -namespace widgets { class TextInputDialog : public QDialog { @@ -41,5 +40,4 @@ private slots: void cancelButtonClicked(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index e7d31cb7b..3c3f3b3b9 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -19,7 +19,6 @@ #define TEXT_CREATED "Created: " namespace chatterino { -namespace widgets { UserInfoPopup::UserInfoPopup() : BaseWindow(nullptr, BaseWindow::Flags(BaseWindow::Frameless | BaseWindow::DeleteOnFocusOut | @@ -404,5 +403,4 @@ void UserInfoPopup::TimeoutWidget::paintEvent(QPaintEvent *) // painter.drawLine(0, this->height() / 2, this->width(), this->height() / 2); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/UserInfoPopup.hpp b/src/widgets/dialogs/UserInfoPopup.hpp index 373f5e01b..df3cc1674 100644 --- a/src/widgets/dialogs/UserInfoPopup.hpp +++ b/src/widgets/dialogs/UserInfoPopup.hpp @@ -8,7 +8,6 @@ class QCheckBox; namespace chatterino { -namespace widgets { class Label; @@ -68,5 +67,4 @@ private: }; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/WelcomeDialog.cpp b/src/widgets/dialogs/WelcomeDialog.cpp index b20adca1a..b3d2b898a 100644 --- a/src/widgets/dialogs/WelcomeDialog.cpp +++ b/src/widgets/dialogs/WelcomeDialog.cpp @@ -1,7 +1,6 @@ #include "WelcomeDialog.hpp" namespace chatterino { -namespace widgets { WelcomeDialog::WelcomeDialog() : BaseWindow(nullptr, BaseWindow::EnableCustomFrame) @@ -9,5 +8,4 @@ WelcomeDialog::WelcomeDialog() this->setWindowTitle("Chatterino quick setup"); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/dialogs/WelcomeDialog.hpp b/src/widgets/dialogs/WelcomeDialog.hpp index 775257681..4864947a1 100644 --- a/src/widgets/dialogs/WelcomeDialog.hpp +++ b/src/widgets/dialogs/WelcomeDialog.hpp @@ -3,7 +3,6 @@ #include "widgets/BaseWindow.hpp" namespace chatterino { -namespace widgets { class WelcomeDialog : public BaseWindow { @@ -11,5 +10,4 @@ public: WelcomeDialog(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index ad20f4bc9..43babc8af 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -31,11 +31,7 @@ #define SELECTION_RESUME_SCROLLING_MSG_THRESHOLD 3 #define CHAT_HOVER_PAUSE_DURATION 1000 -using namespace chatterino::messages; -using namespace chatterino::providers::twitch; - namespace chatterino { -namespace widgets { ChannelView::ChannelView(BaseWidget *parent) : BaseWidget(parent) @@ -1211,5 +1207,4 @@ int ChannelView::getLayoutWidth() const return this->width(); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/ChannelView.hpp b/src/widgets/helper/ChannelView.hpp index 9f0422d51..90f5261c3 100644 --- a/src/widgets/helper/ChannelView.hpp +++ b/src/widgets/helper/ChannelView.hpp @@ -20,7 +20,6 @@ #include namespace chatterino { -namespace widgets { class ChannelView : public BaseWidget { @@ -160,5 +159,4 @@ private slots: } }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/ComboBoxItemDelegate.cpp b/src/widgets/helper/ComboBoxItemDelegate.cpp index f67b0c547..6d7bf23b6 100644 --- a/src/widgets/helper/ComboBoxItemDelegate.cpp +++ b/src/widgets/helper/ComboBoxItemDelegate.cpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace widgets { ComboBoxItemDelegate::ComboBoxItemDelegate(QObject *parent) : QStyledItemDelegate(parent) @@ -53,5 +52,4 @@ void ComboBoxItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *mod else QStyledItemDelegate::setModelData(editor, model, index); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/ComboBoxItemDelegate.hpp b/src/widgets/helper/ComboBoxItemDelegate.hpp index 618948d2f..19433e2cb 100644 --- a/src/widgets/helper/ComboBoxItemDelegate.hpp +++ b/src/widgets/helper/ComboBoxItemDelegate.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace widgets { // stolen from https://wiki.qt.io/Combo_Boxes_in_Item_Views @@ -22,5 +21,4 @@ public: const QModelIndex &index) const; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/DebugPopup.cpp b/src/widgets/helper/DebugPopup.cpp index a9bae87dc..453dc13e3 100644 --- a/src/widgets/helper/DebugPopup.cpp +++ b/src/widgets/helper/DebugPopup.cpp @@ -8,7 +8,6 @@ #include namespace chatterino { -namespace widgets { DebugPopup::DebugPopup() { @@ -26,5 +25,4 @@ DebugPopup::DebugPopup() layout->addWidget(text); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/DebugPopup.hpp b/src/widgets/helper/DebugPopup.hpp index c9a4c7431..b70c97d57 100644 --- a/src/widgets/helper/DebugPopup.hpp +++ b/src/widgets/helper/DebugPopup.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace widgets { class DebugPopup : public QWidget { @@ -11,5 +10,4 @@ public: DebugPopup(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/DropPreview.cpp b/src/widgets/helper/DropPreview.cpp index d9258f0cf..21a126533 100644 --- a/src/widgets/helper/DropPreview.cpp +++ b/src/widgets/helper/DropPreview.cpp @@ -6,7 +6,6 @@ #include namespace chatterino { -namespace widgets { NotebookPageDropPreview::NotebookPageDropPreview(BaseWidget *parent) : BaseWidget(parent) @@ -51,5 +50,4 @@ void NotebookPageDropPreview::setBounds(const QRect &rect) // this->animate = true; } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/DropPreview.hpp b/src/widgets/helper/DropPreview.hpp index 39069de68..4dc04e7c4 100644 --- a/src/widgets/helper/DropPreview.hpp +++ b/src/widgets/helper/DropPreview.hpp @@ -6,7 +6,6 @@ #include namespace chatterino { -namespace widgets { class NotebookPageDropPreview : public BaseWidget { @@ -24,5 +23,4 @@ protected: // bool animate = false; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/EditableModelView.cpp b/src/widgets/helper/EditableModelView.cpp index c157c88d3..a62dec22a 100644 --- a/src/widgets/helper/EditableModelView.cpp +++ b/src/widgets/helper/EditableModelView.cpp @@ -8,8 +8,6 @@ #include namespace chatterino { -namespace widgets { -namespace helper { EditableModelView::EditableModelView(QAbstractTableModel *_model) : tableView(new QTableView(this)) @@ -71,6 +69,4 @@ QAbstractTableModel *EditableModelView::getModel() return this->model; } -} // namespace helper -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/EditableModelView.hpp b/src/widgets/helper/EditableModelView.hpp index 9553c8538..bd883d784 100644 --- a/src/widgets/helper/EditableModelView.hpp +++ b/src/widgets/helper/EditableModelView.hpp @@ -8,8 +8,6 @@ class QAbstractTableModel; class QTableView; namespace chatterino { -namespace widgets { -namespace helper { class EditableModelView : public QWidget { @@ -28,6 +26,4 @@ private: QAbstractTableModel *model; }; -} // namespace helper -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/Line.hpp b/src/widgets/helper/Line.hpp index 5939ba6fe..463e30e80 100644 --- a/src/widgets/helper/Line.hpp +++ b/src/widgets/helper/Line.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace widgets { class Line : public BaseWidget { @@ -38,5 +37,4 @@ private: bool vertical_; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/NotebookButton.cpp b/src/widgets/helper/NotebookButton.cpp index 01d8e6fca..37ee00052 100644 --- a/src/widgets/helper/NotebookButton.cpp +++ b/src/widgets/helper/NotebookButton.cpp @@ -12,7 +12,6 @@ #define nuuls nullptr namespace chatterino { -namespace widgets { NotebookButton::NotebookButton(BaseWidget *parent) : RippleEffectButton(parent) @@ -158,5 +157,4 @@ void NotebookButton::dropEvent(QDropEvent *event) } } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/NotebookButton.hpp b/src/widgets/helper/NotebookButton.hpp index 2aed8c315..360498bbc 100644 --- a/src/widgets/helper/NotebookButton.hpp +++ b/src/widgets/helper/NotebookButton.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace widgets { class NotebookButton : public RippleEffectButton { @@ -35,5 +34,4 @@ private: QPoint mousePos_; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/NotebookTab.cpp b/src/widgets/helper/NotebookTab.cpp index f9b05ea9f..e74425e97 100644 --- a/src/widgets/helper/NotebookTab.cpp +++ b/src/widgets/helper/NotebookTab.cpp @@ -19,7 +19,6 @@ #include namespace chatterino { -namespace widgets { NotebookTab::NotebookTab(Notebook *notebook) : RippleEffectButton(notebook) @@ -454,5 +453,4 @@ QRect NotebookTab::getXRect() static_cast(16 * s), static_cast(16 * s)); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/NotebookTab.hpp b/src/widgets/helper/NotebookTab.hpp index d44016542..5b6070fcf 100644 --- a/src/widgets/helper/NotebookTab.hpp +++ b/src/widgets/helper/NotebookTab.hpp @@ -10,7 +10,6 @@ #include namespace chatterino { -namespace widgets { #define NOTEBOOK_TAB_HEIGHT 28 @@ -90,5 +89,4 @@ private: void titleUpdated(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/ResizingTextEdit.cpp b/src/widgets/helper/ResizingTextEdit.cpp index 2cb953cb8..251e10e46 100644 --- a/src/widgets/helper/ResizingTextEdit.cpp +++ b/src/widgets/helper/ResizingTextEdit.cpp @@ -2,6 +2,8 @@ #include "common/Common.hpp" #include "common/CompletionModel.hpp" +namespace chatterino { + ResizingTextEdit::ResizingTextEdit() { auto sizePolicy = this->sizePolicy(); @@ -200,3 +202,5 @@ QCompleter *ResizingTextEdit::getCompleter() const { return this->completer; } + +} diff --git a/src/widgets/helper/ResizingTextEdit.hpp b/src/widgets/helper/ResizingTextEdit.hpp index 4102ca00f..c2adc9597 100644 --- a/src/widgets/helper/ResizingTextEdit.hpp +++ b/src/widgets/helper/ResizingTextEdit.hpp @@ -5,6 +5,8 @@ #include #include +namespace chatterino { + class ResizingTextEdit : public QTextEdit { public: @@ -38,3 +40,5 @@ private: private slots: void insertCompletion(const QString &completion); }; + +} diff --git a/src/widgets/helper/RippleEffectButton.cpp b/src/widgets/helper/RippleEffectButton.cpp index 4942aa55d..90492e1db 100644 --- a/src/widgets/helper/RippleEffectButton.cpp +++ b/src/widgets/helper/RippleEffectButton.cpp @@ -6,7 +6,6 @@ #include "singletons/ThemeManager.hpp" namespace chatterino { -namespace widgets { RippleEffectButton::RippleEffectButton(BaseWidget *parent) : BaseWidget(parent) @@ -191,5 +190,4 @@ void RippleEffectButton::onMouseEffectTimeout() } } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/RippleEffectButton.hpp b/src/widgets/helper/RippleEffectButton.hpp index 3087ff66a..6fc4a2b1c 100644 --- a/src/widgets/helper/RippleEffectButton.hpp +++ b/src/widgets/helper/RippleEffectButton.hpp @@ -11,7 +11,6 @@ #include namespace chatterino { -namespace widgets { class RippleEffectButton : public BaseWidget { @@ -66,5 +65,4 @@ private: void onMouseEffectTimeout(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/RippleEffectLabel.cpp b/src/widgets/helper/RippleEffectLabel.cpp index 2186be1f3..4b9a006e2 100644 --- a/src/widgets/helper/RippleEffectLabel.cpp +++ b/src/widgets/helper/RippleEffectLabel.cpp @@ -6,7 +6,6 @@ #include namespace chatterino { -namespace widgets { RippleEffectLabel::RippleEffectLabel(BaseWidget *parent, int spacing) : RippleEffectButton(parent) @@ -43,5 +42,4 @@ Label &RippleEffectLabel2::getLabel() return this->label_; } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/RippleEffectLabel.hpp b/src/widgets/helper/RippleEffectLabel.hpp index a0282755d..0ddbebc48 100644 --- a/src/widgets/helper/RippleEffectLabel.hpp +++ b/src/widgets/helper/RippleEffectLabel.hpp @@ -11,7 +11,6 @@ #include namespace chatterino { -namespace widgets { class RippleEffectLabel : public RippleEffectButton { @@ -39,5 +38,4 @@ private: Label label_; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/ScrollbarHighlight.cpp b/src/widgets/helper/ScrollbarHighlight.cpp index 958ebf7c2..4ffd3536a 100644 --- a/src/widgets/helper/ScrollbarHighlight.cpp +++ b/src/widgets/helper/ScrollbarHighlight.cpp @@ -3,7 +3,6 @@ #include "widgets/Scrollbar.hpp" namespace chatterino { -namespace widgets { ScrollbarHighlight::ScrollbarHighlight() : color(Color::Highlight) @@ -32,5 +31,4 @@ bool ScrollbarHighlight::isNull() const return this->style == None; } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/ScrollbarHighlight.hpp b/src/widgets/helper/ScrollbarHighlight.hpp index 4fb9ee93b..16b9a08fd 100644 --- a/src/widgets/helper/ScrollbarHighlight.hpp +++ b/src/widgets/helper/ScrollbarHighlight.hpp @@ -3,7 +3,6 @@ #include namespace chatterino { -namespace widgets { class ScrollbarHighlight { @@ -23,5 +22,4 @@ private: Style style; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/SearchPopup.cpp b/src/widgets/helper/SearchPopup.cpp index 832684434..017a6d02b 100644 --- a/src/widgets/helper/SearchPopup.cpp +++ b/src/widgets/helper/SearchPopup.cpp @@ -8,7 +8,7 @@ #include "widgets/helper/ChannelView.hpp" namespace chatterino { -namespace widgets { + SearchPopup::SearchPopup() { this->initLayout(); @@ -83,5 +83,5 @@ void SearchPopup::performSearch() this->channelView->setChannel(channel); } -} // namespace widgets + } // namespace chatterino diff --git a/src/widgets/helper/SearchPopup.hpp b/src/widgets/helper/SearchPopup.hpp index 471780b41..e893092aa 100644 --- a/src/widgets/helper/SearchPopup.hpp +++ b/src/widgets/helper/SearchPopup.hpp @@ -11,9 +11,6 @@ class QLineEdit; namespace chatterino { class Channel; - -namespace widgets { - class ChannelView; class SearchPopup : public BaseWindow @@ -32,5 +29,4 @@ private: void performSearch(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/SettingsDialogTab.cpp b/src/widgets/helper/SettingsDialogTab.cpp index 1e02ca88e..9d22aa831 100644 --- a/src/widgets/helper/SettingsDialogTab.cpp +++ b/src/widgets/helper/SettingsDialogTab.cpp @@ -6,7 +6,6 @@ #include namespace chatterino { -namespace widgets { SettingsDialogTab::SettingsDialogTab(SettingsDialog *_dialog, settingspages::SettingsPage *_page, QString imageFileName) @@ -68,5 +67,4 @@ void SettingsDialogTab::mousePressEvent(QMouseEvent *event) this->dialog->select(this); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/SettingsDialogTab.hpp b/src/widgets/helper/SettingsDialogTab.hpp index 37d2d85e8..03dfe3b28 100644 --- a/src/widgets/helper/SettingsDialogTab.hpp +++ b/src/widgets/helper/SettingsDialogTab.hpp @@ -7,11 +7,8 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { -class SettingsPage; -} // namespace settingspages +class SettingsPage; class SettingsDialog; class SettingsDialogTab : public BaseWidget @@ -44,5 +41,4 @@ private: bool selected = false; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/Shortcut.hpp b/src/widgets/helper/Shortcut.hpp index a45ce2276..cb5efde08 100644 --- a/src/widgets/helper/Shortcut.hpp +++ b/src/widgets/helper/Shortcut.hpp @@ -4,7 +4,6 @@ #include namespace chatterino { -namespace widgets { template inline void CreateShortcut(WidgetType *w, const char *key, Func func) @@ -22,5 +21,4 @@ inline void CreateWindowShortcut(WidgetType *w, const char *key, Func func) QObject::connect(s, &QShortcut::activated, w, func); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/SignalLabel.cpp b/src/widgets/helper/SignalLabel.cpp index fe62bd2c2..4e6944c79 100644 --- a/src/widgets/helper/SignalLabel.cpp +++ b/src/widgets/helper/SignalLabel.cpp @@ -1,5 +1,7 @@ #include "widgets/helper/SignalLabel.hpp" +namespace chatterino { + SignalLabel::SignalLabel(QWidget *parent, Qt::WindowFlags f) : QLabel(parent, f) { @@ -33,3 +35,5 @@ void SignalLabel::mouseMoveEvent(QMouseEvent *event) emit this->mouseMove(event); event->ignore(); } + +} diff --git a/src/widgets/helper/SignalLabel.hpp b/src/widgets/helper/SignalLabel.hpp index 9e89257b8..f9c936739 100644 --- a/src/widgets/helper/SignalLabel.hpp +++ b/src/widgets/helper/SignalLabel.hpp @@ -5,6 +5,8 @@ #include #include +namespace chatterino { + class SignalLabel : public QLabel { Q_OBJECT @@ -26,3 +28,5 @@ protected: void mouseReleaseEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; }; + +} diff --git a/src/widgets/helper/TitlebarButton.cpp b/src/widgets/helper/TitlebarButton.cpp index 6972afb2a..758697fed 100644 --- a/src/widgets/helper/TitlebarButton.cpp +++ b/src/widgets/helper/TitlebarButton.cpp @@ -3,7 +3,6 @@ #include "singletons/ThemeManager.hpp" namespace chatterino { -namespace widgets { TitleBarButton::TitleBarButton() : RippleEffectButton(nullptr) @@ -119,5 +118,4 @@ void TitleBarButton::paintEvent(QPaintEvent *) this->fancyPaint(painter); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/helper/TitlebarButton.hpp b/src/widgets/helper/TitlebarButton.hpp index c718dd1a6..3612e3e36 100644 --- a/src/widgets/helper/TitlebarButton.hpp +++ b/src/widgets/helper/TitlebarButton.hpp @@ -3,7 +3,6 @@ #include "widgets/helper/RippleEffectButton.hpp" namespace chatterino { -namespace widgets { class TitleBarButton : public RippleEffectButton { @@ -22,5 +21,4 @@ private: Style style; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/AboutPage.cpp b/src/widgets/settingspages/AboutPage.cpp index c0932f389..3b5d0f793 100644 --- a/src/widgets/settingspages/AboutPage.cpp +++ b/src/widgets/settingspages/AboutPage.cpp @@ -13,8 +13,6 @@ #define PIXMAP_WIDTH 500 namespace chatterino { -namespace widgets { -namespace settingspages { AboutPage::AboutPage() : SettingsPage("About", ":/images/about.svg") @@ -132,6 +130,4 @@ void AboutPage::addLicense(QFormLayout *form, const QString &name, const QString form->addRow(a, b); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/AboutPage.hpp b/src/widgets/settingspages/AboutPage.hpp index f04702f9e..e9b936709 100644 --- a/src/widgets/settingspages/AboutPage.hpp +++ b/src/widgets/settingspages/AboutPage.hpp @@ -6,8 +6,6 @@ class QLabel; class QFormLayout; namespace chatterino { -namespace widgets { -namespace settingspages { class AboutPage : public SettingsPage { @@ -21,6 +19,4 @@ private: const QString &licenseLink); }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/AccountsPage.cpp b/src/widgets/settingspages/AccountsPage.cpp index 640fc7022..f346a127d 100644 --- a/src/widgets/settingspages/AccountsPage.cpp +++ b/src/widgets/settingspages/AccountsPage.cpp @@ -15,8 +15,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { AccountsPage::AccountsPage() : SettingsPage("Accounts", ":/images/accounts.svg") @@ -66,6 +64,4 @@ AccountsPage::AccountsPage() // }); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/AccountsPage.hpp b/src/widgets/settingspages/AccountsPage.hpp index 90b4e810b..e905bd697 100644 --- a/src/widgets/settingspages/AccountsPage.hpp +++ b/src/widgets/settingspages/AccountsPage.hpp @@ -6,8 +6,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { class AccountsPage : public SettingsPage { @@ -20,6 +18,4 @@ private: AccountSwitchWidget *accSwitchWidget; }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/AppearancePage.cpp b/src/widgets/settingspages/AppearancePage.cpp index 60889c2c1..e18ccf411 100644 --- a/src/widgets/settingspages/AppearancePage.cpp +++ b/src/widgets/settingspages/AppearancePage.cpp @@ -30,8 +30,6 @@ // clang-format on namespace chatterino { -namespace widgets { -namespace settingspages { AppearancePage::AppearancePage() : SettingsPage("Look", ":/images/theme.svg") @@ -271,6 +269,4 @@ QLayout *AppearancePage::createUiScaleSlider() return layout; } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/AppearancePage.hpp b/src/widgets/settingspages/AppearancePage.hpp index 062772087..fbd6803c2 100644 --- a/src/widgets/settingspages/AppearancePage.hpp +++ b/src/widgets/settingspages/AppearancePage.hpp @@ -6,8 +6,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { class AppearancePage : public SettingsPage { @@ -21,6 +19,4 @@ public: std::vector connections_; }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/BehaviourPage.cpp b/src/widgets/settingspages/BehaviourPage.cpp index 51a11932c..592a11a34 100644 --- a/src/widgets/settingspages/BehaviourPage.cpp +++ b/src/widgets/settingspages/BehaviourPage.cpp @@ -19,8 +19,6 @@ #define LIMIT_CHATTERS_FOR_SMALLER_STREAMERS "Only fetch chatters list for viewers under X viewers" namespace chatterino { -namespace widgets { -namespace settingspages { BehaviourPage::BehaviourPage() : SettingsPage("Feel", ":/images/behave.svg") @@ -90,6 +88,4 @@ QSlider *BehaviourPage::createMouseScrollSlider() return slider; } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/BehaviourPage.hpp b/src/widgets/settingspages/BehaviourPage.hpp index 4f3c2b96b..6e95acbba 100644 --- a/src/widgets/settingspages/BehaviourPage.hpp +++ b/src/widgets/settingspages/BehaviourPage.hpp @@ -5,8 +5,6 @@ #include "widgets/settingspages/SettingsPage.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class BehaviourPage : public SettingsPage { @@ -17,6 +15,4 @@ private: QSlider *createMouseScrollSlider(); }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/BrowserextensionPage.cpp b/src/widgets/settingspages/BrowserextensionPage.cpp index d453e643d..caaa07b32 100644 --- a/src/widgets/settingspages/BrowserextensionPage.cpp +++ b/src/widgets/settingspages/BrowserextensionPage.cpp @@ -11,8 +11,6 @@ "https://addons.mozilla.org/en-US/firefox/addon/chatterino-native-host/" namespace chatterino { -namespace widgets { -namespace settingspages { BrowserExtensionPage::BrowserExtensionPage() : SettingsPage("Browser Extension", "") @@ -33,6 +31,4 @@ BrowserExtensionPage::BrowserExtensionPage() layout->addStretch(1); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/BrowserextensionPage.hpp b/src/widgets/settingspages/BrowserextensionPage.hpp index cdd2613b7..d9561eb48 100644 --- a/src/widgets/settingspages/BrowserextensionPage.hpp +++ b/src/widgets/settingspages/BrowserextensionPage.hpp @@ -3,8 +3,6 @@ #include "widgets/settingspages/SettingsPage.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class BrowserExtensionPage : public SettingsPage { @@ -12,6 +10,4 @@ public: BrowserExtensionPage(); }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/CommandPage.cpp b/src/widgets/settingspages/CommandPage.cpp index 964dc127d..9aee2a138 100644 --- a/src/widgets/settingspages/CommandPage.cpp +++ b/src/widgets/settingspages/CommandPage.cpp @@ -25,8 +25,6 @@ // clang-format on namespace chatterino { -namespace widgets { -namespace settingspages { CommandPage::CommandPage() : SettingsPage("Commands", ":/images/commands.svg") @@ -57,6 +55,4 @@ CommandPage::CommandPage() this->commandsEditTimer.setSingleShot(true); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/CommandPage.hpp b/src/widgets/settingspages/CommandPage.hpp index c15d02cf0..6407eb211 100644 --- a/src/widgets/settingspages/CommandPage.hpp +++ b/src/widgets/settingspages/CommandPage.hpp @@ -6,8 +6,6 @@ #include "widgets/settingspages/SettingsPage.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class CommandPage : public SettingsPage { @@ -18,6 +16,4 @@ private: QTimer commandsEditTimer; }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/EmotesPage.cpp b/src/widgets/settingspages/EmotesPage.cpp index 2e54a962b..3cdc0ccd8 100644 --- a/src/widgets/settingspages/EmotesPage.cpp +++ b/src/widgets/settingspages/EmotesPage.cpp @@ -3,8 +3,6 @@ #include "util/LayoutCreator.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { EmotesPage::EmotesPage() : SettingsPage("Emotes", ":/images/emote.svg") @@ -25,6 +23,4 @@ EmotesPage::EmotesPage() // layout->addStretch(1); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/EmotesPage.hpp b/src/widgets/settingspages/EmotesPage.hpp index adbe94d2e..be3876955 100644 --- a/src/widgets/settingspages/EmotesPage.hpp +++ b/src/widgets/settingspages/EmotesPage.hpp @@ -3,8 +3,6 @@ #include "widgets/settingspages/SettingsPage.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class EmotesPage : public SettingsPage { @@ -12,6 +10,4 @@ public: EmotesPage(); }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/ExternaltoolsPage.cpp b/src/widgets/settingspages/ExternaltoolsPage.cpp index 17d6bb8ae..b263a9985 100644 --- a/src/widgets/settingspages/ExternaltoolsPage.cpp +++ b/src/widgets/settingspages/ExternaltoolsPage.cpp @@ -8,8 +8,6 @@ #define STREAMLINK_QUALITY "Choose", "Source", "High", "Medium", "Low", "Audio only" namespace chatterino { -namespace widgets { -namespace settingspages { namespace { @@ -74,6 +72,4 @@ ExternalToolsPage::ExternalToolsPage() layout->addStretch(1); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/ExternaltoolsPage.hpp b/src/widgets/settingspages/ExternaltoolsPage.hpp index d5c631836..92f0bf62a 100644 --- a/src/widgets/settingspages/ExternaltoolsPage.hpp +++ b/src/widgets/settingspages/ExternaltoolsPage.hpp @@ -3,8 +3,6 @@ #include "widgets/settingspages/SettingsPage.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class ExternalToolsPage : public SettingsPage { @@ -12,6 +10,4 @@ public: ExternalToolsPage(); }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/HighlightingPage.cpp b/src/widgets/settingspages/HighlightingPage.cpp index c2608efca..0572e0cab 100644 --- a/src/widgets/settingspages/HighlightingPage.cpp +++ b/src/widgets/settingspages/HighlightingPage.cpp @@ -25,8 +25,6 @@ #define ALWAYS_PLAY "Always play highlight sound (Even if Chatterino is focused)" namespace chatterino { -namespace widgets { -namespace settingspages { HighlightingPage::HighlightingPage() : SettingsPage("Highlights", ":/images/notifications.svg") @@ -106,6 +104,4 @@ HighlightingPage::HighlightingPage() this->disabledUsersChangedTimer.setSingleShot(true); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/HighlightingPage.hpp b/src/widgets/settingspages/HighlightingPage.hpp index 9bb19753e..80152db9e 100644 --- a/src/widgets/settingspages/HighlightingPage.hpp +++ b/src/widgets/settingspages/HighlightingPage.hpp @@ -9,8 +9,6 @@ class QPushButton; class QListWidget; namespace chatterino { -namespace widgets { -namespace settingspages { class HighlightingPage : public SettingsPage { @@ -21,6 +19,4 @@ private: QTimer disabledUsersChangedTimer; }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/IgnoreusersPage.cpp b/src/widgets/settingspages/IgnoreusersPage.cpp index 98e035990..1f0f93f44 100644 --- a/src/widgets/settingspages/IgnoreusersPage.cpp +++ b/src/widgets/settingspages/IgnoreusersPage.cpp @@ -22,8 +22,6 @@ // clang-format on namespace chatterino { -namespace widgets { -namespace settingspages { IgnoreUsersPage::IgnoreUsersPage() : SettingsPage("Ignores", "") @@ -106,6 +104,4 @@ void IgnoreUsersPage::onShow() this->userListModel.setStringList(users); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/IgnoreusersPage.hpp b/src/widgets/settingspages/IgnoreusersPage.hpp index 32f6ab9be..2109d9512 100644 --- a/src/widgets/settingspages/IgnoreusersPage.hpp +++ b/src/widgets/settingspages/IgnoreusersPage.hpp @@ -5,8 +5,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { class IgnoreUsersPage : public SettingsPage { @@ -19,6 +17,4 @@ private: QStringListModel userListModel; }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/KeyboardsettingsPage.cpp b/src/widgets/settingspages/KeyboardsettingsPage.cpp index ccc5fc5a2..aeffaf7f6 100644 --- a/src/widgets/settingspages/KeyboardsettingsPage.cpp +++ b/src/widgets/settingspages/KeyboardsettingsPage.cpp @@ -6,8 +6,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { KeyboardSettingsPage::KeyboardSettingsPage() : SettingsPage("Keybindings", "") @@ -39,6 +37,4 @@ KeyboardSettingsPage::KeyboardSettingsPage() form->addRow(new QLabel("Ctrl + F"), new QLabel("Search in current channel")); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/KeyboardsettingsPage.hpp b/src/widgets/settingspages/KeyboardsettingsPage.hpp index fcbafb10f..1717da1d5 100644 --- a/src/widgets/settingspages/KeyboardsettingsPage.hpp +++ b/src/widgets/settingspages/KeyboardsettingsPage.hpp @@ -3,8 +3,6 @@ #include "widgets/settingspages/SettingsPage.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class KeyboardSettingsPage : public SettingsPage { @@ -12,6 +10,4 @@ public: KeyboardSettingsPage(); }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/ModerationPage.cpp b/src/widgets/settingspages/ModerationPage.cpp index e23541d3d..e6f719d5e 100644 --- a/src/widgets/settingspages/ModerationPage.cpp +++ b/src/widgets/settingspages/ModerationPage.cpp @@ -20,8 +20,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { inline QString CreateLink(const QString &url, bool file = false) { @@ -138,6 +136,4 @@ ModerationPage::ModerationPage() this->itemsChangedTimer.setSingleShot(true); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/ModerationPage.hpp b/src/widgets/settingspages/ModerationPage.hpp index 2ed59c86d..954c20cde 100644 --- a/src/widgets/settingspages/ModerationPage.hpp +++ b/src/widgets/settingspages/ModerationPage.hpp @@ -7,8 +7,6 @@ class QPushButton; namespace chatterino { -namespace widgets { -namespace settingspages { class ModerationPage : public SettingsPage { @@ -19,6 +17,4 @@ private: QTimer itemsChangedTimer; }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/SettingsPage.cpp b/src/widgets/settingspages/SettingsPage.cpp index 3921c5bd0..081c1172a 100644 --- a/src/widgets/settingspages/SettingsPage.cpp +++ b/src/widgets/settingspages/SettingsPage.cpp @@ -3,8 +3,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { SettingsPage::SettingsPage(const QString &_name, const QString &_iconResource) : name(_name) @@ -93,6 +91,4 @@ QSpinBox *SettingsPage::createSpinBox(pajlada::Settings::Setting &setting, return w; } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/SettingsPage.hpp b/src/widgets/settingspages/SettingsPage.hpp index 97c7d26e5..2175da1d4 100644 --- a/src/widgets/settingspages/SettingsPage.hpp +++ b/src/widgets/settingspages/SettingsPage.hpp @@ -9,8 +9,6 @@ #include "singletons/SettingsManager.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class SettingsPage : public QWidget { @@ -40,6 +38,4 @@ protected: std::vector managedConnections; }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/SpecialChannelsPage.cpp b/src/widgets/settingspages/SpecialChannelsPage.cpp index 002bd5275..c9ddcea5f 100644 --- a/src/widgets/settingspages/SpecialChannelsPage.cpp +++ b/src/widgets/settingspages/SpecialChannelsPage.cpp @@ -9,8 +9,6 @@ #include namespace chatterino { -namespace widgets { -namespace settingspages { SpecialChannelsPage::SpecialChannelsPage() : SettingsPage("Special channels", "") @@ -33,6 +31,4 @@ SpecialChannelsPage::SpecialChannelsPage() layout->addStretch(1); } -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/SpecialChannelsPage.hpp b/src/widgets/settingspages/SpecialChannelsPage.hpp index ac0ff1e6d..e91db9bbd 100644 --- a/src/widgets/settingspages/SpecialChannelsPage.hpp +++ b/src/widgets/settingspages/SpecialChannelsPage.hpp @@ -3,8 +3,6 @@ #include "widgets/settingspages/SettingsPage.hpp" namespace chatterino { -namespace widgets { -namespace settingspages { class SpecialChannelsPage : public SettingsPage { @@ -12,6 +10,4 @@ public: SpecialChannelsPage(); }; -} // namespace settingspages -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index a92e22410..cb1396d30 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -35,11 +35,7 @@ #include #include -using namespace chatterino::providers::twitch; -using namespace chatterino::messages; - namespace chatterino { -namespace widgets { pajlada::Signals::Signal Split::modifierStatusChanged; Qt::KeyboardModifiers Split::modifierStatus = Qt::NoModifier; @@ -578,5 +574,4 @@ void Split::drag() } } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/Split.hpp b/src/widgets/splits/Split.hpp index fb7fdca2c..92065f888 100644 --- a/src/widgets/splits/Split.hpp +++ b/src/widgets/splits/Split.hpp @@ -19,7 +19,6 @@ #include namespace chatterino { -namespace widgets { class SplitContainer; class SplitOverlay; @@ -154,5 +153,4 @@ public slots: void doOpenViewerList(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitColumn.hpp b/src/widgets/splits/SplitColumn.hpp index 4c519c321..2fc191a07 100644 --- a/src/widgets/splits/SplitColumn.hpp +++ b/src/widgets/splits/SplitColumn.hpp @@ -5,7 +5,6 @@ #include namespace chatterino { -namespace helper { class SplitColumn { @@ -21,5 +20,4 @@ private: std::vector items; }; -} // namespace helper } // namespace chatterino diff --git a/src/widgets/splits/SplitContainer.cpp b/src/widgets/splits/SplitContainer.cpp index aeb87b1c1..f4a68c301 100644 --- a/src/widgets/splits/SplitContainer.cpp +++ b/src/widgets/splits/SplitContainer.cpp @@ -25,7 +25,6 @@ #include namespace chatterino { -namespace widgets { bool SplitContainer::isDraggingSplit = false; Split *SplitContainer::draggingSplit = nullptr; @@ -1151,5 +1150,4 @@ void SplitContainer::ResizeHandle::mouseMoveEvent(QMouseEvent *event) } } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitContainer.hpp b/src/widgets/splits/SplitContainer.hpp index 8e294459e..900cb619d 100644 --- a/src/widgets/splits/SplitContainer.hpp +++ b/src/widgets/splits/SplitContainer.hpp @@ -22,7 +22,6 @@ class QJsonObject; namespace chatterino { -namespace widgets { // // Note: This class is a spaghetti container. There is a lot of spaghetti code inside but it doesn't @@ -243,5 +242,4 @@ private: void decodeNodeRecusively(QJsonObject &obj, Node *node); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 17a0296b7..894601b1a 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -22,10 +22,7 @@ #include "widgets/StreamView.hpp" #endif -using namespace chatterino::providers::twitch; - namespace chatterino { -namespace widgets { SplitHeader::SplitHeader(Split *_split) : BaseWidget(_split) @@ -501,5 +498,4 @@ void SplitHeader::menuShowChangelog() { } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitHeader.hpp b/src/widgets/splits/SplitHeader.hpp index 38c202e19..7235cde1b 100644 --- a/src/widgets/splits/SplitHeader.hpp +++ b/src/widgets/splits/SplitHeader.hpp @@ -19,7 +19,6 @@ #include namespace chatterino { -namespace widgets { class Split; class Label; @@ -92,5 +91,4 @@ public slots: void menuShowChangelog(); }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 4a8065f68..4133ecee1 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -17,7 +17,6 @@ #include namespace chatterino { -namespace widgets { SplitInput::SplitInput(Split *_chatWidget) : BaseWidget(_chatWidget) @@ -363,5 +362,4 @@ void SplitInput::mousePressEvent(QMouseEvent *) this->split_->giveFocus(Qt::MouseFocusReason); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitInput.hpp b/src/widgets/splits/SplitInput.hpp index 64131465e..a2e87ebfb 100644 --- a/src/widgets/splits/SplitInput.hpp +++ b/src/widgets/splits/SplitInput.hpp @@ -14,7 +14,6 @@ #include namespace chatterino { -namespace widgets { class Split; @@ -68,5 +67,4 @@ private slots: friend class Split; }; -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitOverlay.cpp b/src/widgets/splits/SplitOverlay.cpp index a7124d46d..58b870c3f 100644 --- a/src/widgets/splits/SplitOverlay.cpp +++ b/src/widgets/splits/SplitOverlay.cpp @@ -14,7 +14,6 @@ #include "widgets/splits/SplitContainer.hpp" namespace chatterino { -namespace widgets { SplitOverlay::SplitOverlay(Split *parent) : BaseWidget(parent) @@ -211,5 +210,4 @@ bool SplitOverlay::ButtonEventFilter::eventFilter(QObject *watched, QEvent *even return QObject::eventFilter(watched, event); } -} // namespace widgets } // namespace chatterino diff --git a/src/widgets/splits/SplitOverlay.hpp b/src/widgets/splits/SplitOverlay.hpp index a12edb9bc..1601a86c9 100644 --- a/src/widgets/splits/SplitOverlay.hpp +++ b/src/widgets/splits/SplitOverlay.hpp @@ -7,7 +7,6 @@ #include "widgets/BaseWidget.hpp" namespace chatterino { -namespace widgets { class Split; @@ -48,5 +47,4 @@ private: friend class ButtonEventFilter; }; -} // namespace widgets } // namespace chatterino