~ken-vandine/indicator-transfer/ual_api_change

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: CI Train Bot
  • Author(s): Renato Araujo Oliveira Filho
  • Date: 2015-08-19 19:17:06 UTC
  • mfrom: (29.6.11 add-plugins-fix-model-clear)
  • Revision ID: ci-train-bot@canonical.com-20150819191706-k1jnor3lh4n26zax
Added 'clear' function into the Source interface.
Call 'Source.clear' in the 'Controller.clear_all' function.
Does not keep a separated copy of source model inside of the Controller class.
Changed the return of 'Source.get_model()' to const.
Update unit tests.
Approved by: Charles Kerr, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
    // run until we lose the busname
47
47
    auto source = std::make_shared<PluginSource>(PLUGINDIR);
48
 
    auto model = source->get_model();
49
 
    auto controller = std::make_shared<Controller>(model, source);
50
 
    GMenuView menu_view (model, controller);
 
48
    auto controller = std::make_shared<Controller>(source);
 
49
    GMenuView menu_view (controller);
51
50
    // FIXME: listen for busname-lost
52
51
    g_main_loop_run(loop);
53
52