[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

@@ -3,10 +3,9 @@
namespace Calculation {
App::App(Container * container, Context * context, Preferences * preferences) :
App::App(Container * container, Context * context) :
TextFieldDelegateApp(container, &m_editExpressionController, "Calculs", "CALCULS", ImageStore::CalculationIcon),
m_localContext(LocalContext((GlobalContext *)context, &m_calculationStore)),
m_preferences(preferences),
m_calculationStore(CalculationStore()),
m_historyController(HistoryController(&m_editExpressionController, &m_calculationStore)),
m_editExpressionController(EditExpressionController(&m_modalViewController, &m_historyController, &m_calculationStore))
@@ -17,8 +16,4 @@ Context * App::localContext() {
return &m_localContext;
}
Preferences * App::preferences() {
return m_preferences;
}
}