diff --git a/doomsday/client/include/games.h b/doomsday/client/include/games.h index 89f5d4499a..6e1d8f543c 100644 --- a/doomsday/client/include/games.h +++ b/doomsday/client/include/games.h @@ -61,7 +61,7 @@ class Games typedef QList All; /// Notified when a new game is added. - DENG2_DEFINE_AUDIENCE(Addition, void gameAdded(Game &game)) + DENG2_DEFINE_AUDIENCE2(Addition, void gameAdded(Game &game)) public: Games(); diff --git a/doomsday/client/src/games.cpp b/doomsday/client/src/games.cpp index ed81a46125..a887779fde 100644 --- a/doomsday/client/src/games.cpp +++ b/doomsday/client/src/games.cpp @@ -67,8 +67,12 @@ DENG2_PIMPL(Games) qDeleteAll(games); games.clear(); } + + DENG2_PIMPL_AUDIENCE(Addition) }; +DENG2_AUDIENCE_METHOD(Games, Addition) + Games::Games() : d(new Instance(this)) {} @@ -172,7 +176,7 @@ void Games::add(Game &game) d->games.push_back(&game); - DENG2_FOR_AUDIENCE(Addition, i) + DENG2_FOR_AUDIENCE2(Addition, i) { i->gameAdded(game); } diff --git a/doomsday/client/src/resource/resourcesystem.cpp b/doomsday/client/src/resource/resourcesystem.cpp index aee2f54f19..1559da4568 100644 --- a/doomsday/client/src/resource/resourcesystem.cpp +++ b/doomsday/client/src/resource/resourcesystem.cpp @@ -378,7 +378,7 @@ DENG2_PIMPL(ResourceSystem) #endif #ifdef __CLIENT__ - App_Games().audienceForAddition += this; + App_Games().audienceForAddition() += this; // Determine the root directory of the saved session repository. if(int arg = App::commandLine().check("-savedir", 1)) @@ -397,7 +397,7 @@ DENG2_PIMPL(ResourceSystem) ~Instance() { #ifdef __CLIENT__ - App_Games().audienceForAddition -= this; + App_Games().audienceForAddition() -= this; #endif qDeleteAll(resClasses); diff --git a/doomsday/client/src/ui/widgets/gameselectionwidget.cpp b/doomsday/client/src/ui/widgets/gameselectionwidget.cpp index 6777a7079d..4f23a519ff 100644 --- a/doomsday/client/src/ui/widgets/gameselectionwidget.cpp +++ b/doomsday/client/src/ui/widgets/gameselectionwidget.cpp @@ -252,14 +252,14 @@ DENG_GUI_PIMPL(GameSelectionWidget) updateSubsetLayout(); - App_Games().audienceForAddition += this; + App_Games().audienceForAddition() += this; App::app().audienceForStartupComplete() += this; App::app().audienceForGameChange() += this; } ~Instance() { - App_Games().audienceForAddition -= this; + App_Games().audienceForAddition() -= this; App::app().audienceForStartupComplete() -= this; App::app().audienceForGameChange() -= this; }