From b1cbf09427098815580aae340ffe3c18c3eccf8b Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 7 Oct 2019 15:46:08 +0200 Subject: [PATCH] removed appbase directory --- chatterino.pro | 48 ++++++++- lib/appbase.pri | 3 - lib/appbase/.clang-format | 34 ------ lib/appbase/common/Aliases.hpp | 36 ------- lib/appbase/main.cpp | 31 ------ lib/appbase/main.pro | 100 ------------------ {lib/appbase => src}/BaseSettings.cpp | 4 +- {lib/appbase => src}/BaseSettings.hpp | 4 +- {lib/appbase => src}/BaseTheme.cpp | 10 +- {lib/appbase => src}/BaseTheme.hpp | 4 +- .../common/ChatterinoSetting.cpp | 4 +- .../common/ChatterinoSetting.hpp | 4 +- {lib/appbase => src}/common/FlagsEnum.hpp | 0 {lib/appbase => src}/common/Outcome.hpp | 0 {lib/appbase => src}/common/Singleton.hpp | 4 +- .../debug/AssertInGuiThread.hpp | 4 +- {lib/appbase => src}/debug/Benchmark.cpp | 4 +- {lib/appbase => src}/debug/Benchmark.hpp | 4 +- {lib/appbase => src}/debug/Log.hpp | 4 +- {lib/appbase => src}/singletons/Fonts.cpp | 6 +- {lib/appbase => src}/singletons/Fonts.hpp | 4 +- {lib/appbase => src}/util/Clamp.hpp | 4 +- {lib/appbase => src}/util/CombinePath.hpp | 0 .../util/DistanceBetweenPoints.hpp | 0 .../util/FunctionEventFilter.cpp | 4 +- .../util/FunctionEventFilter.hpp | 4 +- {lib/appbase => src}/util/FuzzyConvert.cpp | 0 {lib/appbase => src}/util/FuzzyConvert.hpp | 0 {lib/appbase => src}/util/Helpers.cpp | 4 +- {lib/appbase => src}/util/Helpers.hpp | 4 +- {lib/appbase => src}/util/LayoutHelper.hpp | 0 {lib/appbase => src}/util/PostToThread.hpp | 4 +- .../util/RapidJsonSerializeQString.hpp | 0 {lib/appbase => src}/util/Shortcut.hpp | 4 +- {lib/appbase => src}/util/WindowsHelper.cpp | 4 +- {lib/appbase => src}/util/WindowsHelper.hpp | 4 +- {lib/appbase => src}/widgets/BaseWidget.cpp | 4 +- {lib/appbase => src}/widgets/BaseWidget.hpp | 4 +- {lib/appbase => src}/widgets/BaseWindow.cpp | 4 +- {lib/appbase => src}/widgets/BaseWindow.hpp | 4 +- {lib/appbase => src}/widgets/Label.cpp | 4 +- {lib/appbase => src}/widgets/Label.hpp | 4 +- .../appbase => src}/widgets/TooltipWidget.cpp | 4 +- .../appbase => src}/widgets/TooltipWidget.hpp | 4 +- .../appbase => src}/widgets/helper/Button.cpp | 4 +- .../appbase => src}/widgets/helper/Button.hpp | 4 +- .../widgets/helper/EffectLabel.cpp | 4 +- .../widgets/helper/EffectLabel.hpp | 4 +- .../widgets/helper/SignalLabel.cpp | 4 +- .../widgets/helper/SignalLabel.hpp | 4 +- .../widgets/helper/TitlebarButton.cpp | 4 +- .../widgets/helper/TitlebarButton.hpp | 4 +- 52 files changed, 126 insertions(+), 286 deletions(-) delete mode 100644 lib/appbase.pri delete mode 100644 lib/appbase/.clang-format delete mode 100644 lib/appbase/common/Aliases.hpp delete mode 100644 lib/appbase/main.cpp delete mode 100644 lib/appbase/main.pro rename {lib/appbase => src}/BaseSettings.cpp (98%) rename {lib/appbase => src}/BaseSettings.hpp (95%) rename {lib/appbase => src}/BaseTheme.cpp (96%) rename {lib/appbase => src}/BaseTheme.hpp (97%) rename {lib/appbase => src}/common/ChatterinoSetting.cpp (78%) rename {lib/appbase => src}/common/ChatterinoSetting.hpp (97%) rename {lib/appbase => src}/common/FlagsEnum.hpp (100%) rename {lib/appbase => src}/common/Outcome.hpp (100%) rename {lib/appbase => src}/common/Singleton.hpp (85%) rename {lib/appbase => src}/debug/AssertInGuiThread.hpp (83%) rename {lib/appbase => src}/debug/Benchmark.cpp (86%) rename {lib/appbase => src}/debug/Benchmark.hpp (84%) rename {lib/appbase => src}/debug/Log.hpp (92%) rename {lib/appbase => src}/singletons/Fonts.cpp (98%) rename {lib/appbase => src}/singletons/Fonts.hpp (97%) rename {lib/appbase => src}/util/Clamp.hpp (80%) rename {lib/appbase => src}/util/CombinePath.hpp (100%) rename {lib/appbase => src}/util/DistanceBetweenPoints.hpp (100%) rename {lib/appbase => src}/util/FunctionEventFilter.cpp (86%) rename {lib/appbase => src}/util/FunctionEventFilter.hpp (88%) rename {lib/appbase => src}/util/FuzzyConvert.cpp (100%) rename {lib/appbase => src}/util/FuzzyConvert.hpp (100%) rename {lib/appbase => src}/util/Helpers.cpp (93%) rename {lib/appbase => src}/util/Helpers.hpp (92%) rename {lib/appbase => src}/util/LayoutHelper.hpp (100%) rename {lib/appbase => src}/util/PostToThread.hpp (95%) rename {lib/appbase => src}/util/RapidJsonSerializeQString.hpp (100%) rename {lib/appbase => src}/util/Shortcut.hpp (91%) rename {lib/appbase => src}/util/WindowsHelper.cpp (97%) rename {lib/appbase => src}/util/WindowsHelper.hpp (82%) rename {lib/appbase => src}/widgets/BaseWidget.cpp (98%) rename {lib/appbase => src}/widgets/BaseWidget.hpp (96%) rename {lib/appbase => src}/widgets/BaseWindow.cpp (99%) rename {lib/appbase => src}/widgets/BaseWindow.hpp (98%) rename {lib/appbase => src}/widgets/Label.cpp (98%) rename {lib/appbase => src}/widgets/Label.hpp (95%) rename {lib/appbase => src}/widgets/TooltipWidget.cpp (98%) rename {lib/appbase => src}/widgets/TooltipWidget.hpp (94%) rename {lib/appbase => src}/widgets/helper/Button.cpp (99%) rename {lib/appbase => src}/widgets/helper/Button.hpp (97%) rename {lib/appbase => src}/widgets/helper/EffectLabel.cpp (94%) rename {lib/appbase => src}/widgets/helper/EffectLabel.hpp (92%) rename {lib/appbase => src}/widgets/helper/SignalLabel.cpp (92%) rename {lib/appbase => src}/widgets/helper/SignalLabel.hpp (92%) rename {lib/appbase => src}/widgets/helper/TitlebarButton.cpp (98%) rename {lib/appbase => src}/widgets/helper/TitlebarButton.hpp (89%) diff --git a/chatterino.pro b/chatterino.pro index 3c016fca..14e69030 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -8,7 +8,6 @@ TEMPLATE = app PRECOMPILED_HEADER = src/PrecompiledHeader.hpp CONFIG += precompile_header DEFINES += CHATTERINO -DEFINES += "AB_NAMESPACE=chatterino" DEFINES += AB_CUSTOM_THEME DEFINES += AB_CUSTOM_SETTINGS CONFIG += AB_NOT_STANDALONE @@ -46,7 +45,6 @@ CONFIG(debug, debug|release) { # Submodules include(lib/warnings.pri) -include(lib/appbase.pri) include(lib/fmt.pri) include(lib/humanize.pri) include(lib/libcommuni.pri) @@ -80,10 +78,13 @@ else{ SOURCES += \ src/Application.cpp \ src/autogenerated/ResourcesAutogen.cpp \ + src/BaseSettings.cpp \ + src/BaseTheme.cpp \ src/BrowserExtension.cpp \ src/common/Args.cpp \ src/common/Channel.cpp \ src/common/ChannelChatters.cpp \ + src/common/ChatterinoSetting.cpp \ src/common/CompletionModel.cpp \ src/common/Credentials.cpp \ src/common/DownloadManager.cpp \ @@ -118,6 +119,7 @@ SOURCES += \ src/controllers/taggedusers/TaggedUser.cpp \ src/controllers/taggedusers/TaggedUsersController.cpp \ src/controllers/taggedusers/TaggedUsersModel.cpp \ + src/debug/Benchmark.cpp \ src/main.cpp \ src/messages/Emote.cpp \ src/messages/Image.cpp \ @@ -167,6 +169,7 @@ SOURCES += \ src/RunGui.cpp \ src/singletons/Badges.cpp \ src/singletons/Emotes.cpp \ + src/singletons/Fonts.cpp \ src/singletons/helper/GifTimer.cpp \ src/singletons/helper/LoggingChannel.cpp \ src/singletons/Logging.cpp \ @@ -181,14 +184,20 @@ SOURCES += \ src/singletons/WindowManager.cpp \ src/util/DebugCount.cpp \ src/util/FormatTime.cpp \ + src/util/FunctionEventFilter.cpp \ + src/util/FuzzyConvert.cpp \ + src/util/Helpers.cpp \ src/util/IncognitoBrowser.cpp \ src/util/InitUpdateButton.cpp \ src/util/JsonQuery.cpp \ src/util/RapidjsonHelpers.cpp \ src/util/StreamLink.cpp \ + src/util/WindowsHelper.cpp \ src/widgets/AccountSwitchPopup.cpp \ src/widgets/AccountSwitchWidget.cpp \ src/widgets/AttachedWindow.cpp \ + src/widgets/BaseWidget.cpp \ + src/widgets/BaseWindow.cpp \ src/widgets/dialogs/EmotePopup.cpp \ src/widgets/dialogs/IrcConnectionEditor.cpp \ src/widgets/dialogs/LastRunCrashDialog.cpp \ @@ -202,16 +211,21 @@ SOURCES += \ src/widgets/dialogs/UpdateDialog.cpp \ src/widgets/dialogs/UserInfoPopup.cpp \ src/widgets/dialogs/WelcomeDialog.cpp \ + src/widgets/helper/Button.cpp \ src/widgets/helper/ChannelView.cpp \ src/widgets/helper/ComboBoxItemDelegate.cpp \ src/widgets/helper/DebugPopup.cpp \ src/widgets/helper/EditableModelView.cpp \ + src/widgets/helper/EffectLabel.cpp \ src/widgets/helper/NotebookButton.cpp \ src/widgets/helper/NotebookTab.cpp \ src/widgets/helper/ResizingTextEdit.cpp \ src/widgets/helper/ScrollbarHighlight.cpp \ src/widgets/helper/SearchPopup.cpp \ src/widgets/helper/SettingsDialogTab.cpp \ + src/widgets/helper/SignalLabel.cpp \ + src/widgets/helper/TitlebarButton.cpp \ + src/widgets/Label.cpp \ src/widgets/Notebook.cpp \ src/widgets/Scrollbar.cpp \ src/widgets/settingspages/AboutPage.cpp \ @@ -232,23 +246,28 @@ SOURCES += \ src/widgets/splits/SplitInput.cpp \ src/widgets/splits/SplitOverlay.cpp \ src/widgets/StreamView.cpp \ + src/widgets/TooltipWidget.cpp \ src/widgets/Window.cpp \ HEADERS += \ src/Application.hpp \ src/autogenerated/ResourcesAutogen.hpp \ + src/BaseSettings.hpp \ + src/BaseTheme.hpp \ src/BrowserExtension.hpp \ src/common/Aliases.hpp \ src/common/Args.hpp \ src/common/Atomic.hpp \ src/common/Channel.hpp \ src/common/ChannelChatters.hpp \ + src/common/ChatterinoSetting.hpp \ src/common/Common.hpp \ src/common/CompletionModel.hpp \ src/common/ConcurrentMap.hpp \ src/common/Credentials.hpp \ src/common/DownloadManager.hpp \ src/common/Env.hpp \ + src/common/FlagsEnum.hpp \ src/common/LinkParser.hpp \ src/common/Modes.hpp \ src/common/NetworkCommon.hpp \ @@ -257,9 +276,11 @@ HEADERS += \ src/common/NetworkRequest.hpp \ src/common/NetworkResult.hpp \ src/common/NullablePtr.hpp \ + src/common/Outcome.hpp \ src/common/ProviderId.hpp \ src/common/SignalVector.hpp \ src/common/SignalVectorModel.hpp \ + src/common/Singleton.hpp \ src/common/UniqueAccess.hpp \ src/common/UsernameSet.hpp \ src/common/Version.hpp \ @@ -288,6 +309,9 @@ HEADERS += \ src/controllers/taggedusers/TaggedUser.hpp \ src/controllers/taggedusers/TaggedUsersController.hpp \ src/controllers/taggedusers/TaggedUsersModel.hpp \ + src/debug/AssertInGuiThread.hpp \ + src/debug/Benchmark.hpp \ + src/debug/Log.hpp \ src/ForwardDecl.hpp \ src/messages/Emote.hpp \ src/messages/Image.hpp \ @@ -345,6 +369,7 @@ HEADERS += \ src/RunGui.hpp \ src/singletons/Badges.hpp \ src/singletons/Emotes.hpp \ + src/singletons/Fonts.hpp \ src/singletons/helper/GifTimer.hpp \ src/singletons/helper/LoggingChannel.hpp \ src/singletons/Logging.hpp \ @@ -357,28 +382,41 @@ HEADERS += \ src/singletons/TooltipPreviewImage.hpp \ src/singletons/Updates.hpp \ src/singletons/WindowManager.hpp \ + src/util/Clamp.hpp \ + src/util/CombinePath.hpp \ src/util/ConcurrentMap.hpp \ src/util/DebugCount.hpp \ + src/util/DistanceBetweenPoints.hpp \ src/util/FormatTime.hpp \ + src/util/FunctionEventFilter.hpp \ + src/util/FuzzyConvert.hpp \ + src/util/Helpers.hpp \ src/util/IncognitoBrowser.hpp \ src/util/InitUpdateButton.hpp \ src/util/IrcHelpers.hpp \ src/util/IsBigEndian.hpp \ src/util/JsonQuery.hpp \ src/util/LayoutCreator.hpp \ + src/util/LayoutHelper.hpp \ src/util/Overloaded.hpp \ + src/util/PostToThread.hpp \ src/util/QObjectRef.hpp \ src/util/QStringHash.hpp \ src/util/rangealgorithm.hpp \ src/util/RapidjsonHelpers.hpp \ + src/util/RapidJsonSerializeQString.hpp \ src/util/RemoveScrollAreaBackground.hpp \ src/util/SampleCheerMessages.hpp \ src/util/SharedPtrElementLess.hpp \ + src/util/Shortcut.hpp \ src/util/StandardItemHelper.hpp \ src/util/StreamLink.hpp \ + src/util/WindowsHelper.hpp \ src/widgets/AccountSwitchPopup.hpp \ src/widgets/AccountSwitchWidget.hpp \ src/widgets/AttachedWindow.hpp \ + src/widgets/BaseWidget.hpp \ + src/widgets/BaseWindow.hpp \ src/widgets/dialogs/EmotePopup.hpp \ src/widgets/dialogs/IrcConnectionEditor.hpp \ src/widgets/dialogs/LastRunCrashDialog.hpp \ @@ -392,11 +430,13 @@ HEADERS += \ src/widgets/dialogs/UpdateDialog.hpp \ src/widgets/dialogs/UserInfoPopup.hpp \ src/widgets/dialogs/WelcomeDialog.hpp \ + src/widgets/helper/Button.hpp \ src/widgets/helper/ChannelView.hpp \ src/widgets/helper/ComboBoxItemDelegate.hpp \ src/widgets/helper/CommonTexts.hpp \ src/widgets/helper/DebugPopup.hpp \ src/widgets/helper/EditableModelView.hpp \ + src/widgets/helper/EffectLabel.hpp \ src/widgets/helper/Line.hpp \ src/widgets/helper/NotebookButton.hpp \ src/widgets/helper/NotebookTab.hpp \ @@ -404,6 +444,9 @@ HEADERS += \ src/widgets/helper/ScrollbarHighlight.hpp \ src/widgets/helper/SearchPopup.hpp \ src/widgets/helper/SettingsDialogTab.hpp \ + src/widgets/helper/SignalLabel.hpp \ + src/widgets/helper/TitlebarButton.hpp \ + src/widgets/Label.hpp \ src/widgets/Notebook.hpp \ src/widgets/Scrollbar.hpp \ src/widgets/settingspages/AboutPage.hpp \ @@ -424,6 +467,7 @@ HEADERS += \ src/widgets/splits/SplitInput.hpp \ src/widgets/splits/SplitOverlay.hpp \ src/widgets/StreamView.hpp \ + src/widgets/TooltipWidget.hpp \ src/widgets/Window.hpp \ RESOURCES += \ diff --git a/lib/appbase.pri b/lib/appbase.pri deleted file mode 100644 index cbae08c5..00000000 --- a/lib/appbase.pri +++ /dev/null @@ -1,3 +0,0 @@ -# include appbase -include($$PWD/appbase/main.pro) -INCLUDEPATH += $$PWD/appbase diff --git a/lib/appbase/.clang-format b/lib/appbase/.clang-format deleted file mode 100644 index fd28e7c2..00000000 --- a/lib/appbase/.clang-format +++ /dev/null @@ -1,34 +0,0 @@ -Language: Cpp - -AccessModifierOffset: -1 -AccessModifierOffset: -4 -AlignEscapedNewlinesLeft: true -AllowShortFunctionsOnASingleLine: false -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: false -AlwaysBreakBeforeMultilineStrings: false -BasedOnStyle: Google -BraceWrapping: { - AfterNamespace: 'false' - AfterClass: 'true' - BeforeElse: 'true' - AfterControlStatement: 'true' - AfterFunction: 'true' - BeforeCatch: 'true' -} -BreakBeforeBraces: Custom -BreakConstructorInitializersBeforeComma: true -ColumnLimit: 80 -ConstructorInitializerAllOnOneLineOrOnePerLine: false -DerivePointerBinding: false -FixNamespaceComments: true -IndentCaseLabels: true -IndentWidth: 4 -IndentWrappedFunctionNames: true -IndentPPDirectives: AfterHash -NamespaceIndentation: Inner -PointerBindsToType: false -SpacesBeforeTrailingComments: 2 -Standard: Auto -ReflowComments: false diff --git a/lib/appbase/common/Aliases.hpp b/lib/appbase/common/Aliases.hpp deleted file mode 100644 index 2dea876b..00000000 --- a/lib/appbase/common/Aliases.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include -#include -#include - -#define QStringAlias(name) \ - namespace chatterino { \ - struct name { \ - QString string; \ - bool operator==(const name &other) const \ - { \ - return this->string == other.string; \ - } \ - bool operator!=(const name &other) const \ - { \ - return this->string != other.string; \ - } \ - }; \ - } /* namespace chatterino */ \ - namespace std { \ - template <> \ - struct hash { \ - size_t operator()(const chatterino::name &s) const \ - { \ - return qHash(s.string); \ - } \ - }; \ - } /* namespace std */ - -QStringAlias(UserName); -QStringAlias(UserId); -QStringAlias(Url); -QStringAlias(Tooltip); -QStringAlias(EmoteId); -QStringAlias(EmoteName); diff --git a/lib/appbase/main.cpp b/lib/appbase/main.cpp deleted file mode 100644 index 6b95a9c2..00000000 --- a/lib/appbase/main.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include -#include - -#include "ABSettings.hpp" -#include "ABTheme.hpp" -#include "singletons/Fonts.hpp" -#include "widgets/BaseWindow.hpp" - -int main(int argc, char *argv[]) -{ - using namespace AB_NAMESPACE; - - QApplication a(argc, argv); - - auto path = - QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); - qDebug() << path; - - QDir(path).mkdir("."); - - new Settings(path); - new Fonts(); - - BaseWindow widget(nullptr, BaseWindow::EnableCustomFrame); - widget.setWindowTitle("asdf"); - widget.show(); - - return a.exec(); -} diff --git a/lib/appbase/main.pro b/lib/appbase/main.pro deleted file mode 100644 index bc464553..00000000 --- a/lib/appbase/main.pro +++ /dev/null @@ -1,100 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2018-11-19T19:03:22 -# -#------------------------------------------------- - -!AB_NOT_STANDALONE { - message(appbase standalone) - QT += core gui widgets - TARGET = main - TEMPLATE = app - SOURCES += main.cpp - - # https://bugreports.qt.io/browse/QTBUG-27018 - equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") { - TARGET = bin/appbase - } -} - -#DEFINES += QT_DEPRECATED_WARNINGS -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 - -macx { - # osx (Tested on macOS Mojave and High Sierra) - CONFIG += c++17 -} else { - CONFIG += c++17 - win32-msvc* { - # win32 msvc - QMAKE_CXXFLAGS += /std:c++17 - } else { - # clang/gcc on linux or win32 - QMAKE_CXXFLAGS += -std=c++17 - } -} - -debug { - DEFINES += QT_DEBUG -} - -linux { - LIBS += -lrt - QMAKE_LFLAGS += -lrt -} - -macx { - INCLUDEPATH += /usr/local/include - INCLUDEPATH += /usr/local/opt/openssl/include - LIBS += -L/usr/local/opt/openssl/lib -} - -SOURCES += \ - $$PWD/BaseSettings.cpp \ - $$PWD/BaseTheme.cpp \ - $$PWD/common/ChatterinoSetting.cpp \ - $$PWD/debug/Benchmark.cpp \ - $$PWD/singletons/Fonts.cpp \ - $$PWD/util/FunctionEventFilter.cpp \ - $$PWD/util/FuzzyConvert.cpp \ - $$PWD/util/Helpers.cpp \ - $$PWD/util/WindowsHelper.cpp \ - $$PWD/widgets/BaseWidget.cpp \ - $$PWD/widgets/BaseWindow.cpp \ - $$PWD/widgets/Label.cpp \ - $$PWD/widgets/TooltipWidget.cpp \ - $$PWD/widgets/helper/Button.cpp \ - $$PWD/widgets/helper/EffectLabel.cpp \ - $$PWD/widgets/helper/SignalLabel.cpp \ - $$PWD/widgets/helper/TitlebarButton.cpp \ - -HEADERS += \ - $$PWD/BaseSettings.hpp \ - $$PWD/BaseTheme.hpp \ - $$PWD/common/ChatterinoSetting.hpp \ - $$PWD/common/FlagsEnum.hpp \ - $$PWD/common/Outcome.hpp \ - $$PWD/common/Singleton.hpp \ - $$PWD/debug/AssertInGuiThread.hpp \ - $$PWD/debug/Benchmark.hpp \ - $$PWD/debug/Log.hpp \ - $$PWD/singletons/Fonts.hpp \ - $$PWD/util/Clamp.hpp \ - $$PWD/util/CombinePath.hpp \ - $$PWD/util/DistanceBetweenPoints.hpp \ - $$PWD/util/FunctionEventFilter.hpp \ - $$PWD/util/FuzzyConvert.hpp \ - $$PWD/util/Helpers.hpp \ - $$PWD/util/LayoutHelper.hpp \ - $$PWD/util/PostToThread.hpp \ - $$PWD/util/RapidJsonSerializeQString.hpp \ - $$PWD/util/Shortcut.hpp \ - $$PWD/util/WindowsHelper.hpp \ - $$PWD/widgets/BaseWidget.hpp \ - $$PWD/widgets/BaseWindow.hpp \ - $$PWD/widgets/Label.hpp \ - $$PWD/widgets/TooltipWidget.hpp \ - $$PWD/widgets/helper/Button.hpp \ - $$PWD/widgets/helper/EffectLabel.hpp \ - $$PWD/widgets/helper/SignalLabel.hpp \ - $$PWD/widgets/helper/TitlebarButton.hpp \ diff --git a/lib/appbase/BaseSettings.cpp b/src/BaseSettings.cpp similarity index 98% rename from lib/appbase/BaseSettings.cpp rename to src/BaseSettings.cpp index 01897555..8d29fccb 100644 --- a/lib/appbase/BaseSettings.cpp +++ b/src/BaseSettings.cpp @@ -4,7 +4,7 @@ #include "util/Clamp.hpp" -namespace AB_NAMESPACE { +namespace chatterino { std::vector> _settings; @@ -125,4 +125,4 @@ AB_SETTINGS_CLASS *getABSettings() return AB_SETTINGS_CLASS::instance; } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/BaseSettings.hpp b/src/BaseSettings.hpp similarity index 95% rename from lib/appbase/BaseSettings.hpp rename to src/BaseSettings.hpp index 58b1f846..0e1ff58a 100644 --- a/lib/appbase/BaseSettings.hpp +++ b/src/BaseSettings.hpp @@ -14,7 +14,7 @@ # define AB_SETTINGS_CLASS Settings #endif -namespace AB_NAMESPACE { +namespace chatterino { class Settings; @@ -44,7 +44,7 @@ private: Settings *getSettings(); AB_SETTINGS_CLASS *getABSettings(); -} // namespace AB_NAMESPACE +} // namespace chatterino #ifdef CHATTERINO # include "singletons/Settings.hpp" diff --git a/lib/appbase/BaseTheme.cpp b/src/BaseTheme.cpp similarity index 96% rename from lib/appbase/BaseTheme.cpp rename to src/BaseTheme.cpp index ab4e314d..cc40a981 100644 --- a/lib/appbase/BaseTheme.cpp +++ b/src/BaseTheme.cpp @@ -1,6 +1,6 @@ #include "BaseTheme.hpp" -namespace AB_NAMESPACE { +namespace chatterino { namespace { double getMultiplierByTheme(const QString &themeName) { @@ -63,9 +63,9 @@ void AB_THEME_CLASS::actuallyUpdate(double hue, double multiplier) /// WINDOW { #ifdef Q_OS_LINUX - this->window.background = lightWin ? "#fff" : QColor(61, 60, 56); + this->window.background = lightWin ? "#fff" : QColor(61, 60, 56); #else - this->window.background = lightWin ? "#fff" : "#111"; + this->window.background = lightWin ? "#fff" : "#111"; #endif QColor fg = this->window.text = lightWin ? "#000" : "#eee"; @@ -149,7 +149,7 @@ void AB_THEME_CLASS::actuallyUpdate(double hue, double multiplier) // QColor("#777"), QColor("#666")}}; this->tabs.bottomLine = this->tabs.selected.backgrounds.regular.color(); - } // namespace AB_NAMESPACE + } // Split bool flat = isLight_; @@ -222,4 +222,4 @@ Theme *getTheme() } #endif -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/BaseTheme.hpp b/src/BaseTheme.hpp similarity index 97% rename from lib/appbase/BaseTheme.hpp rename to src/BaseTheme.hpp index 21c6c46c..d9980813 100644 --- a/lib/appbase/BaseTheme.hpp +++ b/src/BaseTheme.hpp @@ -11,7 +11,7 @@ # define AB_THEME_CLASS Theme #endif -namespace AB_NAMESPACE { +namespace chatterino { class Theme; @@ -109,7 +109,7 @@ private: // Otherwise implemented in BaseThemecpp Theme *getTheme(); -} // namespace AB_NAMESPACE +} // namespace chatterino #ifdef CHATTERINO # include "singletons/Theme.hpp" diff --git a/lib/appbase/common/ChatterinoSetting.cpp b/src/common/ChatterinoSetting.cpp similarity index 78% rename from lib/appbase/common/ChatterinoSetting.cpp rename to src/common/ChatterinoSetting.cpp index 0f249c28..100babaa 100644 --- a/lib/appbase/common/ChatterinoSetting.cpp +++ b/src/common/ChatterinoSetting.cpp @@ -2,11 +2,11 @@ #include "BaseSettings.hpp" -namespace AB_NAMESPACE { +namespace chatterino { void _registerSetting(std::weak_ptr setting) { _actuallyRegisterSetting(setting); } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/common/ChatterinoSetting.hpp b/src/common/ChatterinoSetting.hpp similarity index 97% rename from lib/appbase/common/ChatterinoSetting.hpp rename to src/common/ChatterinoSetting.hpp index d7764841..2e48956b 100644 --- a/lib/appbase/common/ChatterinoSetting.hpp +++ b/src/common/ChatterinoSetting.hpp @@ -3,7 +3,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { void _registerSetting(std::weak_ptr setting); @@ -85,4 +85,4 @@ public: } }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/common/FlagsEnum.hpp b/src/common/FlagsEnum.hpp similarity index 100% rename from lib/appbase/common/FlagsEnum.hpp rename to src/common/FlagsEnum.hpp diff --git a/lib/appbase/common/Outcome.hpp b/src/common/Outcome.hpp similarity index 100% rename from lib/appbase/common/Outcome.hpp rename to src/common/Outcome.hpp diff --git a/lib/appbase/common/Singleton.hpp b/src/common/Singleton.hpp similarity index 85% rename from lib/appbase/common/Singleton.hpp rename to src/common/Singleton.hpp index 5bf3857a..401716d7 100644 --- a/lib/appbase/common/Singleton.hpp +++ b/src/common/Singleton.hpp @@ -2,7 +2,7 @@ #include -namespace AB_NAMESPACE { +namespace chatterino { class Settings; class Paths; @@ -23,4 +23,4 @@ public: } }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/debug/AssertInGuiThread.hpp b/src/debug/AssertInGuiThread.hpp similarity index 83% rename from lib/appbase/debug/AssertInGuiThread.hpp rename to src/debug/AssertInGuiThread.hpp index b43f2695..6dc14496 100644 --- a/lib/appbase/debug/AssertInGuiThread.hpp +++ b/src/debug/AssertInGuiThread.hpp @@ -4,7 +4,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { static bool isGuiThread() { @@ -18,4 +18,4 @@ static void assertInGuiThread() #endif } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/debug/Benchmark.cpp b/src/debug/Benchmark.cpp similarity index 86% rename from lib/appbase/debug/Benchmark.cpp rename to src/debug/Benchmark.cpp index afa80cf2..6541545c 100644 --- a/lib/appbase/debug/Benchmark.cpp +++ b/src/debug/Benchmark.cpp @@ -1,6 +1,6 @@ #include "Benchmark.hpp" -namespace AB_NAMESPACE { +namespace chatterino { BenchmarkGuard::BenchmarkGuard(const QString &_name) : name_(_name) @@ -18,4 +18,4 @@ qreal BenchmarkGuard::getElapsedMs() return qreal(timer_.nsecsElapsed()) / 1000000.0; } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/debug/Benchmark.hpp b/src/debug/Benchmark.hpp similarity index 84% rename from lib/appbase/debug/Benchmark.hpp rename to src/debug/Benchmark.hpp index c477aa34..065048e8 100644 --- a/lib/appbase/debug/Benchmark.hpp +++ b/src/debug/Benchmark.hpp @@ -5,7 +5,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class BenchmarkGuard : boost::noncopyable { @@ -19,4 +19,4 @@ private: QString name_; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/debug/Log.hpp b/src/debug/Log.hpp similarity index 92% rename from lib/appbase/debug/Log.hpp rename to src/debug/Log.hpp index af8b136e..31536781 100644 --- a/lib/appbase/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -5,7 +5,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { template inline void log(const std::string &formatString, Args &&... args) @@ -26,4 +26,4 @@ inline void log(const QString &formatString, Args &&... args) log(formatString.toStdString(), std::forward(args)...); } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/singletons/Fonts.cpp b/src/singletons/Fonts.cpp similarity index 98% rename from lib/appbase/singletons/Fonts.cpp rename to src/singletons/Fonts.cpp index 2cc29b0b..521baefa 100644 --- a/lib/appbase/singletons/Fonts.cpp +++ b/src/singletons/Fonts.cpp @@ -24,7 +24,7 @@ # endif #endif -namespace AB_NAMESPACE { +namespace chatterino { namespace { int getBoldness() { @@ -89,7 +89,7 @@ void Fonts::initialize(Settings &, Paths &) }, false); #endif -} // namespace AB_NAMESPACE +} QFont Fonts::getFont(FontStyle type, float scale) { @@ -178,4 +178,4 @@ Fonts *getFonts() return Fonts::instance; } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/singletons/Fonts.hpp b/src/singletons/Fonts.hpp similarity index 97% rename from lib/appbase/singletons/Fonts.hpp rename to src/singletons/Fonts.hpp index ad1fe8ca..bc700e5e 100644 --- a/lib/appbase/singletons/Fonts.hpp +++ b/src/singletons/Fonts.hpp @@ -12,7 +12,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class Settings; class Paths; @@ -90,4 +90,4 @@ private: Fonts *getFonts(); -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/util/Clamp.hpp b/src/util/Clamp.hpp similarity index 80% rename from lib/appbase/util/Clamp.hpp rename to src/util/Clamp.hpp index 0bb8febd..33030f70 100644 --- a/lib/appbase/util/Clamp.hpp +++ b/src/util/Clamp.hpp @@ -1,6 +1,6 @@ #pragma once -namespace AB_NAMESPACE { +namespace chatterino { // http://en.cppreference.com/w/cpp/algorithm/clamp @@ -10,4 +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 AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/util/CombinePath.hpp b/src/util/CombinePath.hpp similarity index 100% rename from lib/appbase/util/CombinePath.hpp rename to src/util/CombinePath.hpp diff --git a/lib/appbase/util/DistanceBetweenPoints.hpp b/src/util/DistanceBetweenPoints.hpp similarity index 100% rename from lib/appbase/util/DistanceBetweenPoints.hpp rename to src/util/DistanceBetweenPoints.hpp diff --git a/lib/appbase/util/FunctionEventFilter.cpp b/src/util/FunctionEventFilter.cpp similarity index 86% rename from lib/appbase/util/FunctionEventFilter.cpp rename to src/util/FunctionEventFilter.cpp index 9b0ab94f..5071e6e9 100644 --- a/lib/appbase/util/FunctionEventFilter.cpp +++ b/src/util/FunctionEventFilter.cpp @@ -1,6 +1,6 @@ #include "FunctionEventFilter.hpp" -namespace AB_NAMESPACE { +namespace chatterino { FunctionEventFilter::FunctionEventFilter( QObject *parent, std::function function) @@ -14,4 +14,4 @@ bool FunctionEventFilter::eventFilter(QObject *watched, QEvent *event) return this->function_(watched, event); } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/util/FunctionEventFilter.hpp b/src/util/FunctionEventFilter.hpp similarity index 88% rename from lib/appbase/util/FunctionEventFilter.hpp rename to src/util/FunctionEventFilter.hpp index 99cb7d9c..bde2b51f 100644 --- a/lib/appbase/util/FunctionEventFilter.hpp +++ b/src/util/FunctionEventFilter.hpp @@ -4,7 +4,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class FunctionEventFilter : public QObject { @@ -21,4 +21,4 @@ private: std::function function_; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/util/FuzzyConvert.cpp b/src/util/FuzzyConvert.cpp similarity index 100% rename from lib/appbase/util/FuzzyConvert.cpp rename to src/util/FuzzyConvert.cpp diff --git a/lib/appbase/util/FuzzyConvert.hpp b/src/util/FuzzyConvert.hpp similarity index 100% rename from lib/appbase/util/FuzzyConvert.hpp rename to src/util/FuzzyConvert.hpp diff --git a/lib/appbase/util/Helpers.cpp b/src/util/Helpers.cpp similarity index 93% rename from lib/appbase/util/Helpers.cpp rename to src/util/Helpers.cpp index 8658b2ce..c537f797 100644 --- a/lib/appbase/util/Helpers.cpp +++ b/src/util/Helpers.cpp @@ -2,7 +2,7 @@ #include -namespace AB_NAMESPACE { +namespace chatterino { QString generateUuid() { @@ -35,4 +35,4 @@ QString shortenString(const QString &str, unsigned maxWidth) return shortened; } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/util/Helpers.hpp b/src/util/Helpers.hpp similarity index 92% rename from lib/appbase/util/Helpers.hpp rename to src/util/Helpers.hpp index bc2e714e..cb37a182 100644 --- a/lib/appbase/util/Helpers.hpp +++ b/src/util/Helpers.hpp @@ -3,7 +3,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { template auto fS(Args &&... args) @@ -20,7 +20,7 @@ QString formatRichNamedLink(const QString &url, const QString &name, QString shortenString(const QString &str, unsigned maxWidth = 50); -} // namespace AB_NAMESPACE +} // namespace chatterino namespace fmt { diff --git a/lib/appbase/util/LayoutHelper.hpp b/src/util/LayoutHelper.hpp similarity index 100% rename from lib/appbase/util/LayoutHelper.hpp rename to src/util/LayoutHelper.hpp diff --git a/lib/appbase/util/PostToThread.hpp b/src/util/PostToThread.hpp similarity index 95% rename from lib/appbase/util/PostToThread.hpp rename to src/util/PostToThread.hpp index 5ea30c1a..ab0fbe1c 100644 --- a/lib/appbase/util/PostToThread.hpp +++ b/src/util/PostToThread.hpp @@ -10,7 +10,7 @@ #define async_exec(a) \ QThreadPool::globalInstance()->start(new LambdaRunnable(a)); -namespace AB_NAMESPACE { +namespace chatterino { class LambdaRunnable : public QRunnable { @@ -56,4 +56,4 @@ static void postToThread(F &&fun, QObject *obj = qApp) QCoreApplication::postEvent(obj, new Event(std::forward(fun))); } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/util/RapidJsonSerializeQString.hpp b/src/util/RapidJsonSerializeQString.hpp similarity index 100% rename from lib/appbase/util/RapidJsonSerializeQString.hpp rename to src/util/RapidJsonSerializeQString.hpp diff --git a/lib/appbase/util/Shortcut.hpp b/src/util/Shortcut.hpp similarity index 91% rename from lib/appbase/util/Shortcut.hpp rename to src/util/Shortcut.hpp index faddab9b..1b20d1c1 100644 --- a/lib/appbase/util/Shortcut.hpp +++ b/src/util/Shortcut.hpp @@ -3,7 +3,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { template inline void createShortcut(WidgetType *w, const char *key, Func func) @@ -21,4 +21,4 @@ inline void createWindowShortcut(WidgetType *w, const char *key, Func func) QObject::connect(s, &QShortcut::activated, w, func); } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/util/WindowsHelper.cpp b/src/util/WindowsHelper.cpp similarity index 97% rename from lib/appbase/util/WindowsHelper.cpp rename to src/util/WindowsHelper.cpp index b2649b85..d2b9a4ef 100644 --- a/lib/appbase/util/WindowsHelper.cpp +++ b/src/util/WindowsHelper.cpp @@ -4,7 +4,7 @@ #ifdef USEWINSDK -namespace AB_NAMESPACE { +namespace chatterino { typedef enum MONITOR_DPI_TYPE { MDT_EFFECTIVE_DPI = 0, @@ -81,6 +81,6 @@ void setRegisteredForStartup(bool isRegistered) } } -} // namespace AB_NAMESPACE +} // namespace chatterino #endif diff --git a/lib/appbase/util/WindowsHelper.hpp b/src/util/WindowsHelper.hpp similarity index 82% rename from lib/appbase/util/WindowsHelper.hpp rename to src/util/WindowsHelper.hpp index e32f4b26..b40a8270 100644 --- a/lib/appbase/util/WindowsHelper.hpp +++ b/src/util/WindowsHelper.hpp @@ -5,7 +5,7 @@ # include # include -namespace AB_NAMESPACE { +namespace chatterino { boost::optional getWindowDpi(HWND hwnd); void flushClipboard(); @@ -13,6 +13,6 @@ void flushClipboard(); bool isRegisteredForStartup(); void setRegisteredForStartup(bool isRegistered); -} // namespace AB_NAMESPACE +} // namespace chatterino #endif diff --git a/lib/appbase/widgets/BaseWidget.cpp b/src/widgets/BaseWidget.cpp similarity index 98% rename from lib/appbase/widgets/BaseWidget.cpp rename to src/widgets/BaseWidget.cpp index 0a80d91e..c4fb5304 100644 --- a/lib/appbase/widgets/BaseWidget.cpp +++ b/src/widgets/BaseWidget.cpp @@ -11,7 +11,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { BaseWidget::BaseWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) @@ -161,4 +161,4 @@ void BaseWidget::themeChangedEvent() // Do any color scheme updates here } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/BaseWidget.hpp b/src/widgets/BaseWidget.hpp similarity index 96% rename from lib/appbase/widgets/BaseWidget.hpp rename to src/widgets/BaseWidget.hpp index 6b390857..15f3884c 100644 --- a/lib/appbase/widgets/BaseWidget.hpp +++ b/src/widgets/BaseWidget.hpp @@ -5,7 +5,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class Theme; class BaseWindow; @@ -56,4 +56,4 @@ private: friend class BaseWindow; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp similarity index 99% rename from lib/appbase/widgets/BaseWindow.cpp rename to src/widgets/BaseWindow.cpp index 2e879393..8374d71a 100644 --- a/lib/appbase/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -42,7 +42,7 @@ #include "widgets/helper/TitlebarButton.hpp" -namespace AB_NAMESPACE { +namespace chatterino { BaseWindow::BaseWindow(FlagsEnum _flags, QWidget *parent) : BaseWidget(parent, @@ -997,4 +997,4 @@ bool BaseWindow::handleNCHITTEST(MSG *msg, long *result) #endif } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/BaseWindow.hpp b/src/widgets/BaseWindow.hpp similarity index 98% rename from lib/appbase/widgets/BaseWindow.hpp rename to src/widgets/BaseWindow.hpp index 683bd870..fdae5fe9 100644 --- a/lib/appbase/widgets/BaseWindow.hpp +++ b/src/widgets/BaseWindow.hpp @@ -10,7 +10,7 @@ class QHBoxLayout; struct tagMSG; typedef struct tagMSG MSG; -namespace AB_NAMESPACE { +namespace chatterino { class Button; class EffectLabel; @@ -135,4 +135,4 @@ private: friend class BaseWidget; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/Label.cpp b/src/widgets/Label.cpp similarity index 98% rename from lib/appbase/widgets/Label.cpp rename to src/widgets/Label.cpp index 084307ed..330ab852 100644 --- a/lib/appbase/widgets/Label.cpp +++ b/src/widgets/Label.cpp @@ -2,7 +2,7 @@ #include -namespace AB_NAMESPACE { +namespace chatterino { Label::Label(QString text, FontStyle style) : Label(nullptr, text, style) @@ -137,4 +137,4 @@ int Label::getOffset() return this->hasOffset_ ? int(8 * this->scale()) : 0; } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/Label.hpp b/src/widgets/Label.hpp similarity index 95% rename from lib/appbase/widgets/Label.hpp rename to src/widgets/Label.hpp index 655971a6..0cf397a7 100644 --- a/lib/appbase/widgets/Label.hpp +++ b/src/widgets/Label.hpp @@ -5,7 +5,7 @@ #include -namespace AB_NAMESPACE { +namespace chatterino { class Label : public BaseWidget { @@ -47,4 +47,4 @@ private: pajlada::Signals::SignalHolder connections_; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/TooltipWidget.cpp b/src/widgets/TooltipWidget.cpp similarity index 98% rename from lib/appbase/widgets/TooltipWidget.cpp rename to src/widgets/TooltipWidget.cpp index b3cad0d1..e859de12 100644 --- a/lib/appbase/widgets/TooltipWidget.cpp +++ b/src/widgets/TooltipWidget.cpp @@ -12,7 +12,7 @@ # include #endif -namespace AB_NAMESPACE { +namespace chatterino { TooltipWidget *TooltipWidget::getInstance() { @@ -119,4 +119,4 @@ void TooltipWidget::leaveEvent(QEvent *) // clear parents event } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/TooltipWidget.hpp b/src/widgets/TooltipWidget.hpp similarity index 94% rename from lib/appbase/widgets/TooltipWidget.hpp rename to src/widgets/TooltipWidget.hpp index a9963ad3..3a9ea8bc 100644 --- a/lib/appbase/widgets/TooltipWidget.hpp +++ b/src/widgets/TooltipWidget.hpp @@ -6,7 +6,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class TooltipWidget : public BaseWindow { @@ -42,4 +42,4 @@ private: pajlada::Signals::Connection fontChangedConnection_; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/Button.cpp b/src/widgets/helper/Button.cpp similarity index 99% rename from lib/appbase/widgets/helper/Button.cpp rename to src/widgets/helper/Button.cpp index 822afa58..fe00b951 100644 --- a/lib/appbase/widgets/helper/Button.cpp +++ b/src/widgets/helper/Button.cpp @@ -8,7 +8,7 @@ #include "BaseTheme.hpp" #include "util/FunctionEventFilter.hpp" -namespace AB_NAMESPACE { +namespace chatterino { Button::Button(BaseWidget *parent) : BaseWidget(parent) @@ -340,4 +340,4 @@ void Button::showMenu() this->menuVisible_ = true; } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/Button.hpp b/src/widgets/helper/Button.hpp similarity index 97% rename from lib/appbase/widgets/helper/Button.hpp rename to src/widgets/helper/Button.hpp index 06ab218a..7a3f64cb 100644 --- a/lib/appbase/widgets/helper/Button.hpp +++ b/src/widgets/helper/Button.hpp @@ -11,7 +11,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class Button : public BaseWidget { @@ -88,4 +88,4 @@ private: std::unique_ptr menu_{}; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/EffectLabel.cpp b/src/widgets/helper/EffectLabel.cpp similarity index 94% rename from lib/appbase/widgets/helper/EffectLabel.cpp rename to src/widgets/helper/EffectLabel.cpp index 50cbad17..1f2960d7 100644 --- a/lib/appbase/widgets/helper/EffectLabel.cpp +++ b/src/widgets/helper/EffectLabel.cpp @@ -3,7 +3,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { EffectLabel::EffectLabel(BaseWidget *parent, int spacing) : Button(parent) @@ -40,4 +40,4 @@ Label &EffectLabel2::getLabel() return this->label_; } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/EffectLabel.hpp b/src/widgets/helper/EffectLabel.hpp similarity index 92% rename from lib/appbase/widgets/helper/EffectLabel.hpp rename to src/widgets/helper/EffectLabel.hpp index 7e526d55..ea13671a 100644 --- a/lib/appbase/widgets/helper/EffectLabel.hpp +++ b/src/widgets/helper/EffectLabel.hpp @@ -10,7 +10,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class EffectLabel : public Button { @@ -38,4 +38,4 @@ private: Label label_; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/SignalLabel.cpp b/src/widgets/helper/SignalLabel.cpp similarity index 92% rename from lib/appbase/widgets/helper/SignalLabel.cpp rename to src/widgets/helper/SignalLabel.cpp index 68d38b8a..46fd0d80 100644 --- a/lib/appbase/widgets/helper/SignalLabel.cpp +++ b/src/widgets/helper/SignalLabel.cpp @@ -1,6 +1,6 @@ #include "widgets/helper/SignalLabel.hpp" -namespace AB_NAMESPACE { +namespace chatterino { SignalLabel::SignalLabel(QWidget *parent, Qt::WindowFlags f) : QLabel(parent, f) @@ -38,4 +38,4 @@ void SignalLabel::mouseMoveEvent(QMouseEvent *event) event->ignore(); } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/SignalLabel.hpp b/src/widgets/helper/SignalLabel.hpp similarity index 92% rename from lib/appbase/widgets/helper/SignalLabel.hpp rename to src/widgets/helper/SignalLabel.hpp index 2da48d56..38284026 100644 --- a/lib/appbase/widgets/helper/SignalLabel.hpp +++ b/src/widgets/helper/SignalLabel.hpp @@ -5,7 +5,7 @@ #include #include -namespace AB_NAMESPACE { +namespace chatterino { class SignalLabel : public QLabel { @@ -29,4 +29,4 @@ protected: void mouseMoveEvent(QMouseEvent *event) override; }; -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/TitlebarButton.cpp b/src/widgets/helper/TitlebarButton.cpp similarity index 98% rename from lib/appbase/widgets/helper/TitlebarButton.cpp rename to src/widgets/helper/TitlebarButton.cpp index 9534149a..1ab2e0e2 100644 --- a/lib/appbase/widgets/helper/TitlebarButton.cpp +++ b/src/widgets/helper/TitlebarButton.cpp @@ -2,7 +2,7 @@ #include "BaseTheme.hpp" -namespace AB_NAMESPACE { +namespace chatterino { TitleBarButton::TitleBarButton() : Button(nullptr) @@ -131,4 +131,4 @@ void TitleBarButton::paintEvent(QPaintEvent *event) // this->fancyPaint(painter); } -} // namespace AB_NAMESPACE +} // namespace chatterino diff --git a/lib/appbase/widgets/helper/TitlebarButton.hpp b/src/widgets/helper/TitlebarButton.hpp similarity index 89% rename from lib/appbase/widgets/helper/TitlebarButton.hpp rename to src/widgets/helper/TitlebarButton.hpp index 8bc68a36..85e43500 100644 --- a/lib/appbase/widgets/helper/TitlebarButton.hpp +++ b/src/widgets/helper/TitlebarButton.hpp @@ -2,7 +2,7 @@ #include "widgets/helper/Button.hpp" -namespace AB_NAMESPACE { +namespace chatterino { enum class TitleBarButtonStyle { None = 0, @@ -29,4 +29,4 @@ private: TitleBarButtonStyle style_; }; -} // namespace AB_NAMESPACE +} // namespace chatterino