homescreenapp/stateplugins/hsapplibrarystateplugin/tsrc/t_installedappsstate/src/t_installedappsstate.cpp
changeset 97 66b5fe3c07fd
parent 90 3ac3aaebaee5
child 98 e6f74eb7f69f
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/tsrc/t_installedappsstate/src/t_installedappsstate.cpp	Mon Sep 27 11:52:00 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/tsrc/t_installedappsstate/src/t_installedappsstate.cpp	Wed Oct 06 16:06:24 2010 +0300
@@ -36,32 +36,44 @@
 #include "hsinstalledappsstate.h"
 #include "hsmainwindow.h"
 #include "hsmenuitemmodel.h"
+#include "hsscene.h"
 
 #include "hsmenueventtransition.h"
-
 #include "t_installedappsstate.h"
-
 #include "t_hsaddtohomescreenmockstate.h"
 
 
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
 class HsMainWindowMock : public HsMainWindow
 {
     virtual void setCurrentView(HbView *view);
 
 };
 
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
 void HsMainWindowMock::setCurrentView(HbView *view)
 {
     Q_UNUSED(view);
     // do nothing    
 }
 
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
 void MenuStatesTest::cleanup()
 {
     qApp->processEvents();
 }
 
 // ---------------------------------------------------------------------------
+//
 // ---------------------------------------------------------------------------
 //
 void MenuStatesTest::construction()
@@ -92,6 +104,7 @@
 }
 
 // ---------------------------------------------------------------------------
+//
 // ---------------------------------------------------------------------------
 //
 #ifdef Q_OS_SYMBIAN
@@ -122,8 +135,8 @@
 }
 #endif//Q_OS_SYMBIAN
 
-
 // ---------------------------------------------------------------------------
+//
 // ---------------------------------------------------------------------------
 //
 #ifdef Q_OS_SYMBIAN
@@ -175,8 +188,8 @@
 }
 #endif//Q_OS_SYMBIAN
 
-
 // ---------------------------------------------------------------------------
+//
 // ---------------------------------------------------------------------------
 //
 void MenuStatesTest::stateEnteredExited()
@@ -229,7 +242,9 @@
 #endif//UT_MEMORY_CHECK
 #endif//Q_OS_SYMBIAN
 }
+
 // ---------------------------------------------------------------------------
+//
 // ---------------------------------------------------------------------------
 //
 void MenuStatesTest::emptyLabelVisibility()
@@ -274,6 +289,7 @@
 }
 
 // ---------------------------------------------------------------------------
+//
 // ---------------------------------------------------------------------------
 //
 void MenuStatesTest::listItemLongPressed()
@@ -285,9 +301,11 @@
 #endif//UT_MEMORY_CHECK
 #endif//Q_OS_SYMBIAN
     {
-        QScopedPointer<HbMainWindow> window(new HbMainWindow);
+        //QScopedPointer<HbMainWindow> window(new HbMainWindow);
+        //HsScene::setInstance( new HsScene(window.data()) );
+
         HsMenuViewBuilder builder;
-        HsMainWindow mainWindow;
+        HsMainWindowMock mainWindow;
 
         QScopedPointer<QState> parent(new QState);
 
@@ -337,7 +355,6 @@
 
         installedAppsState->stateExited();
 
-        window->removeView(builder.currentView());
         qApp->processEvents();
     
     }
@@ -349,6 +366,7 @@
 }
 
 // ---------------------------------------------------------------------------
+//
 // ---------------------------------------------------------------------------
 //
 void MenuStatesTest::latestOldestOnTopMenuAction()