homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp
changeset 46 23b5d6a29cce
parent 39 4e8ebe173323
child 51 4785f57bf3d4
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp	Mon May 03 12:24:59 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp	Fri May 14 15:43:04 2010 +0300
@@ -26,6 +26,7 @@
 #include "hsarrangestate.h"
 #include "hspreviewhswidgetstate.h"
 #include "hsviewappsettingsstate.h"
+
 /*!
  \class HsMenuWorkerState
  \ingroup group_hsworkerstateplugin
@@ -33,6 +34,12 @@
  */
 
 /*!
+ \var HsMenuWorkerState::mInitialState
+ Initial state.
+ Own.
+ */
+
+/*!
  Constructor.
  \param parent Owner.
  */
@@ -50,9 +57,9 @@
 
 }
 
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-//
+/*!
+ Constructs contained objects.
+ */
 void HsMenuWorkerState::construct()
 {
     HSMENUTEST_FUNC_ENTRY("HsMenuWorkerState::construct");
@@ -83,7 +90,7 @@
                                   mInitialState, newChildState);
     mInitialState->addTransition(createCollectionTransition);
     // set a transition to the initial state after child processing finished
-    newChildState->addTransition(mInitialState);
+    newChildState->addTransition(newChildState, SIGNAL(exit()), mInitialState);
 
     HsAddAppsToCollectionState *addAppsToCollectionState =
         new HsAddAppsToCollectionState(this);
@@ -103,9 +110,12 @@
     HSMENUTEST_FUNC_EXIT("HsMenuWorkerState::construct");
 }
 
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-//
+/*!
+ Template method for constructing child states.
+ \param operation Operation type triggering transition to the
+ newely created state.
+ \return newely created state.
+ */
 template<class T>
 T *HsMenuWorkerState::createChildState(
     HsMenuEvent::OperationType operation)
@@ -119,7 +129,7 @@
         new HsMenuEventTransition(operation, mInitialState, newChildState);
     mInitialState->addTransition(newChildStateTransition);
     // set a transition to the initial state after child processing finished
-    newChildState->addTransition(mInitialState);
+    newChildState->addTransition(newChildState, SIGNAL(exit()), mInitialState);
     HSMENUTEST_FUNC_EXIT("HsMenuWorkerState::createChildState");
 
     return newChildState;