[apps] Substitute "app()->container()" by "AppsContainer::sharedAppsContainer()"

This commit is contained in:
Ruben Dashyan
2019-05-14 15:06:23 +02:00
committed by EmilieNumworks
parent 268ad3f3ba
commit eb3da7f395
18 changed files with 25 additions and 30 deletions

View File

@@ -90,7 +90,7 @@ void ConsoleController::terminateInputLoop() {
}
const char * ConsoleController::inputText(const char * prompt) {
AppsContainer * a = (AppsContainer *)(app()->container());
AppsContainer * appsContainer = AppsContainer::sharedAppsContainer();
m_inputRunLoopActive = true;
const char * promptText = prompt;
@@ -119,10 +119,10 @@ const char * ConsoleController::inputText(const char * prompt) {
// Reload the history
m_selectableTableView.reloadData();
m_selectableTableView.selectCellAtLocation(0, m_consoleStore.numberOfLines());
a->redrawWindow();
appsContainer->redrawWindow();
// Launch a new input loop
a->runWhile([](void * a){
appsContainer->runWhile([](void * a){
ConsoleController * c = static_cast<ConsoleController *>(a);
return c->inputRunLoopActive();
}, this);