[apps] Put the method preference in container instead of in every app

Change-Id: Ib390952a6559aa847c99e3ca74c4f6995a07e909
This commit is contained in:
Émilie Feral
2017-01-31 16:15:04 +01:00
parent ab65e832ea
commit 47cec5e72b
10 changed files with 27 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
#include "history_controller.h"
#include "app.h"
#include "../apps_container.h"
#include <assert.h>
namespace Calculation {
@@ -70,7 +71,8 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
}
m_selectableTableView.deselectTable();
App * calculationApp = (App *)app();
m_calculationStore->push(text, calculationApp->localContext(), calculationApp->preferences());
AppsContainer * appsContainer = (AppsContainer *)calculationApp->container();
m_calculationStore->push(text, calculationApp->localContext(), appsContainer->preferences());
reload();
m_selectableTableView.scrollToCell(0, numberOfRows()-1);
app()->setFirstResponder(editController);