[*container] Remove static Container::sharedContainer

This commit is contained in:
Ruben Dashyan
2019-07-17 15:36:43 +02:00
committed by EmilieNumworks
parent 80981ce865
commit a0e6151b26
3 changed files with 1 additions and 11 deletions

View File

@@ -247,7 +247,6 @@ bool AppsContainer::switchTo(App::Snapshot * snapshot) {
}
void AppsContainer::run() {
setSharedContainer(this);
window()->setFrame(KDRect(0, 0, Ion::Display::Width, Ion::Display::Height));
refreshPreferences();

View File

@@ -18,10 +18,6 @@
class Container : public RunLoop {
public:
static App * activeApp() { return s_activeApp; }
static Container * sharedContainer() {
assert(s_sharedContainer);
return s_sharedContainer;
}
Container();
virtual ~Container();
Container(const Container& other) = delete;
@@ -34,9 +30,6 @@ public:
virtual bool switchTo(App::Snapshot * snapshot);
protected:
virtual Window * window() = 0;
void setSharedContainer(Container * container) {
s_sharedContainer = container;
}
private:
void step();
int numberOfTimers() override;
@@ -44,11 +37,10 @@ private:
virtual int numberOfContainerTimers();
virtual Timer * containerTimerAtIndex(int i);
static App * s_activeApp;
static Container * s_sharedContainer;
};
inline App * app() {
return Container::sharedContainer()->activeApp();
return Container::activeApp();
}
#endif

View File

@@ -8,7 +8,6 @@ Container::Container() :
// Initialize private static member
App * Container::s_activeApp = nullptr;
Container * Container::s_sharedContainer = nullptr;
Container::~Container() {
if (s_activeApp) {