homescreenapp/stateplugins/hsmenuworkerstateplugin/tsrc/t_hsmenuworkerstateplugin/src/t_hsaddappstocollectionstate.cpp
changeset 97 66b5fe3c07fd
parent 90 3ac3aaebaee5
child 98 e6f74eb7f69f
equal deleted inserted replaced
95:32e56106abf2 97:66b5fe3c07fd
    24 #include "t_hsmenuworkerstateplugin.h"
    24 #include "t_hsmenuworkerstateplugin.h"
    25 #include "hsaddappstocollectionstate.h"
    25 #include "hsaddappstocollectionstate.h"
    26 #include "hsmenuworkerstate.h"
    26 #include "hsmenuworkerstate.h"
    27 #include "hsaddtohomescreenstate.h"
    27 #include "hsaddtohomescreenstate.h"
    28 #include "hsappschecklist.h"
    28 #include "hsappschecklist.h"
    29 
       
    30 #include "hscollectionnamedialog.h"
    29 #include "hscollectionnamedialog.h"
    31 #include "hsapp_defs.h"
    30 #include "hsapp_defs.h"
    32 
    31 
    33 
    32 // ---------------------------------------------------------------------------
    34 // ---------------------------------------------------------------------------
    33 //
    35 // ---------------------------------------------------------------------------
    34 // ---------------------------------------------------------------------------
    36 //
    35 //
    37 void MenuStatesTest::AddAppsToCollectionState_construction()
    36 void MenuStatesTest::AddAppsToCollectionState_construction()
    38 {
    37 {
    39 #ifdef Q_OS_SYMBIAN
    38 #ifdef Q_OS_SYMBIAN
    54     __UHEAP_MARKEND;
    53     __UHEAP_MARKEND;
    55 #endif//UT_MEMORY_CHECK
    54 #endif//UT_MEMORY_CHECK
    56 #endif//Q_OS_SYMBIAN
    55 #endif//Q_OS_SYMBIAN
    57 }
    56 }
    58 
    57 
    59 // ---------------------------------------------------------------------------
    58 
       
    59 // ---------------------------------------------------------------------------
       
    60 //
    60 // ---------------------------------------------------------------------------
    61 // ---------------------------------------------------------------------------
    61 //
    62 //
    62 void MenuStatesTest::AddAppsToCollectionState_save()
    63 void MenuStatesTest::AddAppsToCollectionState_save()
    63 {
    64 {
    64 #ifdef Q_OS_SYMBIAN
    65 #ifdef Q_OS_SYMBIAN
    81     __UHEAP_MARKEND;
    82     __UHEAP_MARKEND;
    82 #endif//UT_MEMORY_CHECK
    83 #endif//UT_MEMORY_CHECK
    83 #endif//Q_OS_SYMBIAN
    84 #endif//Q_OS_SYMBIAN
    84 }
    85 }
    85 
    86 
    86 // ---------------------------------------------------------------------------
    87 
       
    88 // ---------------------------------------------------------------------------
       
    89 //
    87 // ---------------------------------------------------------------------------
    90 // ---------------------------------------------------------------------------
    88 //
    91 //
    89 void MenuStatesTest::AddAppsToCollectionState_cleanData()
    92 void MenuStatesTest::AddAppsToCollectionState_cleanData()
    90 {
    93 {
    91 #ifdef Q_OS_SYMBIAN
    94 #ifdef Q_OS_SYMBIAN
   109 #endif//UT_MEMORY_CHECK
   112 #endif//UT_MEMORY_CHECK
   110 #endif//Q_OS_SYMBIAN
   113 #endif//Q_OS_SYMBIAN
   111 }
   114 }
   112 
   115 
   113 // ---------------------------------------------------------------------------
   116 // ---------------------------------------------------------------------------
       
   117 //
   114 // ---------------------------------------------------------------------------
   118 // ---------------------------------------------------------------------------
   115 //
   119 //
   116 void MenuStatesTest::AddAppsToCollectionState_setCollectionName()
   120 void MenuStatesTest::AddAppsToCollectionState_setCollectionName()
   117 {
   121 {
   118 #ifdef Q_OS_SYMBIAN
   122 #ifdef Q_OS_SYMBIAN
   135 #endif//UT_MEMORY_CHECK
   139 #endif//UT_MEMORY_CHECK
   136 #endif//Q_OS_SYMBIAN
   140 #endif//Q_OS_SYMBIAN
   137 }
   141 }
   138 
   142 
   139 // ---------------------------------------------------------------------------
   143 // ---------------------------------------------------------------------------
       
   144 //
   140 // ---------------------------------------------------------------------------
   145 // ---------------------------------------------------------------------------
   141 //
   146 //
   142 void MenuStatesTest::AddAppsToCollectionState_setCollectionId()
   147 void MenuStatesTest::AddAppsToCollectionState_setCollectionId()
   143 {
   148 {
   144 #ifdef Q_OS_SYMBIAN
   149 #ifdef Q_OS_SYMBIAN
   161 #endif//UT_MEMORY_CHECK
   166 #endif//UT_MEMORY_CHECK
   162 #endif//Q_OS_SYMBIAN
   167 #endif//Q_OS_SYMBIAN
   163 }
   168 }
   164 
   169 
   165 // ---------------------------------------------------------------------------
   170 // ---------------------------------------------------------------------------
       
   171 //
   166 // ---------------------------------------------------------------------------
   172 // ---------------------------------------------------------------------------
   167 //
   173 //
   168 void MenuStatesTest::AddAppsToCollectionState_setAppList()
   174 void MenuStatesTest::AddAppsToCollectionState_setAppList()
   169 {
   175 {
   170 #ifdef Q_OS_SYMBIAN
   176 #ifdef Q_OS_SYMBIAN
   189 #endif//UT_MEMORY_CHECK
   195 #endif//UT_MEMORY_CHECK
   190 #endif//Q_OS_SYMBIAN
   196 #endif//Q_OS_SYMBIAN
   191 }
   197 }
   192 
   198 
   193 // ---------------------------------------------------------------------------
   199 // ---------------------------------------------------------------------------
       
   200 //
   194 // ---------------------------------------------------------------------------
   201 // ---------------------------------------------------------------------------
   195 //
   202 //
   196 void MenuStatesTest::AddAppsToCollectionState_showMessageAppsAdded()
   203 void MenuStatesTest::AddAppsToCollectionState_showMessageAppsAdded()
   197 {
   204 {
   198 #ifdef Q_OS_SYMBIAN
   205 #ifdef Q_OS_SYMBIAN
   216 #endif//UT_MEMORY_CHECK
   223 #endif//UT_MEMORY_CHECK
   217 #endif//Q_OS_SYMBIAN
   224 #endif//Q_OS_SYMBIAN
   218 }
   225 }
   219 
   226 
   220 // ---------------------------------------------------------------------------
   227 // ---------------------------------------------------------------------------
       
   228 //
   221 // ---------------------------------------------------------------------------
   229 // ---------------------------------------------------------------------------
   222 //
   230 //
   223 void MenuStatesTest::AddAppsToCollectionState_selectCollection()
   231 void MenuStatesTest::AddAppsToCollectionState_selectCollection()
   224 {
   232 {
   225 #ifdef Q_OS_SYMBIAN
   233 #ifdef Q_OS_SYMBIAN
   250     __UHEAP_MARKEND;
   258     __UHEAP_MARKEND;
   251 #endif//UT_MEMORY_CHECK
   259 #endif//UT_MEMORY_CHECK
   252 #endif//Q_OS_SYMBIAN
   260 #endif//Q_OS_SYMBIAN
   253 }
   261 }
   254 
   262 
   255 
   263 // ---------------------------------------------------------------------------
   256 // ---------------------------------------------------------------------------
   264 //
   257 // ---------------------------------------------------------------------------
   265 // ---------------------------------------------------------------------------
   258 //
   266 //
   259 void MenuStatesTest::AddAppsToCollectionState_listDialogFinished()
   267 void MenuStatesTest::AddAppsToCollectionState_listDialogFinished()
   260 {
   268 {
   261 #ifdef Q_OS_SYMBIAN
   269 #ifdef Q_OS_SYMBIAN
   283 #endif//UT_MEMORY_CHECK
   291 #endif//UT_MEMORY_CHECK
   284 #endif//Q_OS_SYMBIAN
   292 #endif//Q_OS_SYMBIAN
   285 }
   293 }
   286 
   294 
   287 // ---------------------------------------------------------------------------
   295 // ---------------------------------------------------------------------------
       
   296 //
   288 // ---------------------------------------------------------------------------
   297 // ---------------------------------------------------------------------------
   289 //
   298 //
   290 void MenuStatesTest::AddAppsToCollectionState_newCollection()
   299 void MenuStatesTest::AddAppsToCollectionState_newCollection()
   291 {
   300 {
   292 #ifdef Q_OS_SYMBIAN
   301 #ifdef Q_OS_SYMBIAN
   319 #endif//UT_MEMORY_CHECK
   328 #endif//UT_MEMORY_CHECK
   320 #endif//Q_OS_SYMBIAN
   329 #endif//Q_OS_SYMBIAN
   321 }
   330 }
   322 
   331 
   323 // ---------------------------------------------------------------------------
   332 // ---------------------------------------------------------------------------
       
   333 //
   324 // ---------------------------------------------------------------------------
   334 // ---------------------------------------------------------------------------
   325 //
   335 //
   326 void MenuStatesTest::AddAppsToCollectionState_editorDialogFinished()
   336 void MenuStatesTest::AddAppsToCollectionState_editorDialogFinished()
   327 {
   337 {
   328 #ifdef Q_OS_SYMBIAN
   338 #ifdef Q_OS_SYMBIAN
   346 #endif//UT_MEMORY_CHECK
   356 #endif//UT_MEMORY_CHECK
   347 #endif//Q_OS_SYMBIAN
   357 #endif//Q_OS_SYMBIAN
   348 }
   358 }
   349 
   359 
   350 // ---------------------------------------------------------------------------
   360 // ---------------------------------------------------------------------------
       
   361 //
   351 // ---------------------------------------------------------------------------
   362 // ---------------------------------------------------------------------------
   352 //
   363 //
   353 void MenuStatesTest::AddAppsToCollectionState_collectionSelected()
   364 void MenuStatesTest::AddAppsToCollectionState_collectionSelected()
   354 {
   365 {
   355 #ifdef Q_OS_SYMBIAN
   366 #ifdef Q_OS_SYMBIAN
   380 #endif//UT_MEMORY_CHECK
   391 #endif//UT_MEMORY_CHECK
   381 #endif//Q_OS_SYMBIAN
   392 #endif//Q_OS_SYMBIAN
   382 }
   393 }
   383 
   394 
   384 // ---------------------------------------------------------------------------
   395 // ---------------------------------------------------------------------------
       
   396 //
   385 // ---------------------------------------------------------------------------
   397 // ---------------------------------------------------------------------------
   386 //
   398 //
   387 void MenuStatesTest::AddAppsToCollectionState_appsCheckListState()
   399 void MenuStatesTest::AddAppsToCollectionState_appsCheckListState()
   388 {
   400 {
   389 #ifdef Q_OS_SYMBIAN
   401 #ifdef Q_OS_SYMBIAN
   411 #endif//UT_MEMORY_CHECK
   423 #endif//UT_MEMORY_CHECK
   412 #endif//Q_OS_SYMBIAN
   424 #endif//Q_OS_SYMBIAN
   413 }
   425 }
   414 
   426 
   415 // ---------------------------------------------------------------------------
   427 // ---------------------------------------------------------------------------
       
   428 //
   416 // ---------------------------------------------------------------------------
   429 // ---------------------------------------------------------------------------
   417 //
   430 //
   418 void MenuStatesTest::AddAppsToCollectionState_selectApplicationsDone()
   431 void MenuStatesTest::AddAppsToCollectionState_selectApplicationsDone()
   419 {
   432 {
   420 #ifdef Q_OS_SYMBIAN
   433 #ifdef Q_OS_SYMBIAN
   452 #endif//UT_MEMORY_CHECK
   465 #endif//UT_MEMORY_CHECK
   453 #endif//Q_OS_SYMBIAN
   466 #endif//Q_OS_SYMBIAN
   454 }
   467 }
   455 
   468 
   456 // ---------------------------------------------------------------------------
   469 // ---------------------------------------------------------------------------
       
   470 //
   457 // ---------------------------------------------------------------------------
   471 // ---------------------------------------------------------------------------
   458 //
   472 //
   459 void MenuStatesTest::AppsCheckList_showAppsCheckboxList()
   473 void MenuStatesTest::AppsCheckList_showAppsCheckboxList()
   460 {
   474 {
   461 #ifdef Q_OS_SYMBIAN
   475 #ifdef Q_OS_SYMBIAN
   484 #ifdef UT_MEMORY_CHECK
   498 #ifdef UT_MEMORY_CHECK
   485     __UHEAP_MARKEND;
   499     __UHEAP_MARKEND;
   486 #endif//UT_MEMORY_CHECK
   500 #endif//UT_MEMORY_CHECK
   487 #endif//Q_OS_SYMBIAN
   501 #endif//Q_OS_SYMBIAN
   488 }
   502 }
   489 // ---------------------------------------------------------------------------
   503 
       
   504 // ---------------------------------------------------------------------------
       
   505 //
   490 // ---------------------------------------------------------------------------
   506 // ---------------------------------------------------------------------------
   491 //
   507 //
   492 void MenuStatesTest::testCommitSlot(const QList<int> &appList)
   508 void MenuStatesTest::testCommitSlot(const QList<int> &appList)
   493 {
   509 {
   494     if(appList.isEmpty()){
   510     if(appList.isEmpty()){
   497         mCommitEmited = false;
   513         mCommitEmited = false;
   498     }
   514     }
   499 }
   515 }
   500 
   516 
   501 // ---------------------------------------------------------------------------
   517 // ---------------------------------------------------------------------------
       
   518 //
   502 // ---------------------------------------------------------------------------
   519 // ---------------------------------------------------------------------------
   503 //
   520 //
   504 void MenuStatesTest::AppsCheckList_getItemsList()
   521 void MenuStatesTest::AppsCheckList_getItemsList()
   505 {
   522 {
   506 #ifdef Q_OS_SYMBIAN
   523 #ifdef Q_OS_SYMBIAN
   546 #ifdef UT_MEMORY_CHECK
   563 #ifdef UT_MEMORY_CHECK
   547     __UHEAP_MARKEND;
   564     __UHEAP_MARKEND;
   548 #endif//UT_MEMORY_CHECK
   565 #endif//UT_MEMORY_CHECK
   549 #endif//Q_OS_SYMBIAN
   566 #endif//Q_OS_SYMBIAN
   550 }
   567 }
   551 // ---------------------------------------------------------------------------
   568 
       
   569 // ---------------------------------------------------------------------------
       
   570 //
   552 // ---------------------------------------------------------------------------
   571 // ---------------------------------------------------------------------------
   553 //
   572 //
   554 void MenuStatesTest::AppsCheckList_setSortOrder()
   573 void MenuStatesTest::AppsCheckList_setSortOrder()
   555 {
   574 {
   556 #ifdef Q_OS_SYMBIAN
   575 #ifdef Q_OS_SYMBIAN
   568 #ifdef UT_MEMORY_CHECK
   587 #ifdef UT_MEMORY_CHECK
   569     __UHEAP_MARKEND;
   588     __UHEAP_MARKEND;
   570 #endif//UT_MEMORY_CHECK
   589 #endif//UT_MEMORY_CHECK
   571 #endif//Q_OS_SYMBIAN
   590 #endif//Q_OS_SYMBIAN
   572 }
   591 }
   573 // ---------------------------------------------------------------------------
   592 
       
   593 // ---------------------------------------------------------------------------
       
   594 //
   574 // ---------------------------------------------------------------------------
   595 // ---------------------------------------------------------------------------
   575 //
   596 //
   576 void MenuStatesTest::AppsCheckList_selectedItemsChanged()
   597 void MenuStatesTest::AppsCheckList_selectedItemsChanged()
   577 {
   598 {
   578 #ifdef Q_OS_SYMBIAN
   599 #ifdef Q_OS_SYMBIAN
   602 #endif//UT_MEMORY_CHECK
   623 #endif//UT_MEMORY_CHECK
   603 #endif//Q_OS_SYMBIAN
   624 #endif//Q_OS_SYMBIAN
   604 }
   625 }
   605 
   626 
   606 // ---------------------------------------------------------------------------
   627 // ---------------------------------------------------------------------------
       
   628 //
   607 // ---------------------------------------------------------------------------
   629 // ---------------------------------------------------------------------------
   608 //
   630 //
   609 void MenuStatesTest::testTransitToStateSlot()
   631 void MenuStatesTest::testTransitToStateSlot()
   610 {
   632 {
   611     mTransitToStateEmited = true;
   633     mTransitToStateEmited = true;