-
-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove Singleton & replace getIApp with getApp (#5514)
- Loading branch information
Showing
145 changed files
with
805 additions
and
859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
#include "mocks/DisabledStreamerMode.hpp" | ||
#include "mocks/EmptyApplication.hpp" | ||
#include "singletons/Settings.hpp" | ||
|
||
#include <QString> | ||
|
||
namespace chatterino::mock { | ||
|
||
/** | ||
* BaseApplication intends to be a mock application with a few more sane defaults, but with less configurability | ||
*/ | ||
class BaseApplication : public EmptyApplication | ||
{ | ||
public: | ||
BaseApplication() | ||
: settings(this->settingsDir.filePath("settings.json")) | ||
{ | ||
} | ||
|
||
explicit BaseApplication(const QString &settingsData) | ||
: EmptyApplication(settingsData) | ||
, settings(this->settingsDir.filePath("settings.json")) | ||
{ | ||
} | ||
|
||
IStreamerMode *getStreamerMode() override | ||
{ | ||
return &this->streamerMode; | ||
} | ||
|
||
Settings settings; | ||
DisabledStreamerMode streamerMode; | ||
}; | ||
|
||
} // namespace chatterino::mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.