equal
deleted
inserted
replaced
122 QVERIFY( mMatchesView->mModel == model2 ); |
122 QVERIFY( mMatchesView->mModel == model2 ); |
123 QVERIFY( mMatchesView->mModel->mLastCall.isEmpty() ); |
123 QVERIFY( mMatchesView->mModel->mLastCall.isEmpty() ); |
124 QVERIFY( !mMatchesView->mAddToContactsButton->isVisible() ); |
124 QVERIFY( !mMatchesView->mAddToContactsButton->isVisible() ); |
125 |
125 |
126 // After passing model as input arg, do not pass model |
126 // After passing model as input arg, do not pass model |
|
127 mMatchesView->mActivating = true; |
127 mMatchesView->activated( true,QVariant() ); |
128 mMatchesView->activated( true,QVariant() ); |
128 QVERIFY( mMatchesView->mListView ); |
129 QVERIFY( mMatchesView->mListView ); |
129 QVERIFY( mMatchesView->mModel ); |
130 QVERIFY( mMatchesView->mModel ); |
130 QVERIFY( mMatchesView->mModel->mLastCall == QLatin1String("constructor") ); |
131 QVERIFY( mMatchesView->mModel->mLastCall == QLatin1String("constructor") ); |
131 delete view; |
132 QVERIFY( !mMatchesView->mActivating ); |
|
133 delete view; |
132 } |
134 } |
133 |
135 |
134 |
136 |
135 void UT_LogsMatchesView::testDeactivated() |
137 void UT_LogsMatchesView::testDeactivated() |
136 { |
138 { |
368 mMatchesView->updateEmptyListWidgetsVisibility(); |
370 mMatchesView->updateEmptyListWidgetsVisibility(); |
369 |
371 |
370 QVERIFY( mMatchesView->mEmptyListLabel->isVisible() ); |
372 QVERIFY( mMatchesView->mEmptyListLabel->isVisible() ); |
371 QVERIFY( mMatchesView->mAddToContactsButton->isVisible() ); |
373 QVERIFY( mMatchesView->mAddToContactsButton->isVisible() ); |
372 |
374 |
373 mMatchesView->mAddToContactsButtonDisabled = true; |
375 mMatchesView->mActivating = true; |
374 mMatchesView->updateEmptyListWidgetsVisibility(); |
376 mMatchesView->updateEmptyListWidgetsVisibility(); |
375 QVERIFY( mMatchesView->mEmptyListLabel->isVisible() ); |
377 QVERIFY( mMatchesView->mEmptyListLabel->isVisible() ); |
376 QVERIFY( !mMatchesView->mAddToContactsButton->isVisible() ); |
378 QVERIFY( !mMatchesView->mAddToContactsButton->isVisible() ); |
377 |
379 |
378 delete mMatchesView->mEmptyListLabel; |
380 delete mMatchesView->mEmptyListLabel; |
438 view->toggleContactSearch(); |
440 view->toggleContactSearch(); |
439 status = view->mModel->predictiveSearchStatus(); |
441 status = view->mModel->predictiveSearchStatus(); |
440 QVERIFY( status == 2 ); |
442 QVERIFY( status == 2 ); |
441 QVERIFY( mViewManager->mViewId == LogsRecentViewId ); |
443 QVERIFY( mViewManager->mViewId == LogsRecentViewId ); |
442 QVERIFY( mMatchesView->mDialpad->editor().text() == "1234" ); |
444 QVERIFY( mMatchesView->mDialpad->editor().text() == "1234" ); |
443 delete view; |
445 delete view; |
444 |
446 } |
445 } |
447 |
446 |
448 void UT_LogsMatchesView::testLocaleChanged() |
|
449 { |
|
450 //No model |
|
451 QVERIFY( !mMatchesView->mModel ); |
|
452 mMatchesView->localeChanged(); |
|
453 QVERIFY( !LogsAbstractModel::mParamUpdated ); |
|
454 |
|
455 LogsDbConnector* dbConnector = 0; |
|
456 mMatchesView->mModel = new LogsMatchesModel(*dbConnector); |
|
457 mMatchesView->localeChanged(); |
|
458 QVERIFY( LogsAbstractModel::mParamUpdated ); |
|
459 } |
|
460 |