logsui/logsapp/src/logsviewmanager.cpp
changeset 2 7119b73b84d6
parent 0 4a5361db8937
child 4 e52d42f9500c
equal deleted inserted replaced
0:4a5361db8937 2:7119b73b84d6
   126 // LogsViewManager::changeMatchesView
   126 // LogsViewManager::changeMatchesView
   127 // -----------------------------------------------------------------------------
   127 // -----------------------------------------------------------------------------
   128 //
   128 //
   129 void LogsViewManager::changeMatchesView(QString dialpadText)
   129 void LogsViewManager::changeMatchesView(QString dialpadText)
   130 {
   130 {
       
   131     LOGS_QDEBUG( "logs [UI] -> LogsViewManager::changeMatchesView()" );
   131     Dialpad* dialpad = mComponentsRepository->dialpad();
   132     Dialpad* dialpad = mComponentsRepository->dialpad();
   132     dialpad->editor().setText(dialpadText);
   133     dialpad->editor().setText(dialpadText);
   133     doActivateView(LogsMatchesViewId, true, QVariant());
   134     LogsModel* model = mComponentsRepository->model();
       
   135     if ( model && model->predictiveSearchStatus() == logsContactSearchEnabled ){
       
   136         LOGS_QDEBUG( "logs [UI]     contact search enabled, go to macthes view" );
       
   137         doActivateView(LogsMatchesViewId, true, QVariant());
       
   138     } else {
       
   139         LOGS_QDEBUG( "logs [UI]     contact search disabled, go to recent view" );
       
   140         doActivateView(LogsRecentViewId, true, QVariant());
       
   141     }
       
   142     LOGS_QDEBUG( "logs [UI] <- LogsViewManager::changeMatchesView()" );
   134 }
   143 }
   135 
   144 
   136 // -----------------------------------------------------------------------------
   145 // -----------------------------------------------------------------------------
   137 // LogsViewManager::appFocusGained
   146 // LogsViewManager::appFocusGained
   138 // Activate recent view if gaining focus first time and app was not started
   147 // Activate recent view if gaining focus first time and app was not started