equal
deleted
inserted
replaced
58 void SearchInDeviceHandlerTest::testhandleDocument() |
58 void SearchInDeviceHandlerTest::testhandleDocument() |
59 { |
59 { |
60 InDeviceHandler* indevicehandler = new InDeviceHandler(); |
60 InDeviceHandler* indevicehandler = new InDeviceHandler(); |
61 indevicehandler->setCategory("file"); |
61 indevicehandler->setCategory("file"); |
62 |
62 |
63 indevicehandler->searchAsync("a"); |
63 indevicehandler->searchAsync("txt"); |
64 QTest::qWait(200); |
64 QTest::qWait(200); |
65 |
65 |
66 QSignalSpy spy(indevicehandler, |
66 QSignalSpy spy(indevicehandler, |
67 SIGNAL(handleDocument(int, QCPixDocument*))); |
67 SIGNAL(handleDocument(int, QCPixDocument*))); |
68 indevicehandler->getDocumentAsyncAtIndex(0); |
68 indevicehandler->getDocumentAsyncAtIndex(0); |
151 //QTEST_MAIN corrected since crashes if TRAP not in correct place. |
151 //QTEST_MAIN corrected since crashes if TRAP not in correct place. |
152 //Will be corrected in later (estimate 4.6.0) Qt release for Symbian. |
152 //Will be corrected in later (estimate 4.6.0) Qt release for Symbian. |
153 int main(int argc, char *argv[]) |
153 int main(int argc, char *argv[]) |
154 { |
154 { |
155 QApplication app(argc, argv); |
155 QApplication app(argc, argv); |
156 int error; |
156 int error = 0; |
157 TRAPD(err, |
157 TRAPD(err, |
158 QTEST_DISABLE_KEYPAD_NAVIGATION |
158 QTEST_DISABLE_KEYPAD_NAVIGATION |
159 SearchInDeviceHandlerTest tc; |
159 SearchInDeviceHandlerTest tc; |
160 error = QTest::qExec(&tc, argc, argv);); |
160 error = QTest::qExec(&tc, argc, argv);); |
|
161 Q_UNUSED(err); |
161 return error; |
162 return error; |
162 } |
163 } |
163 #else //Q_OS_SYMBIAN |
164 #else //Q_OS_SYMBIAN |
164 QTEST_MAIN(SearchInDeviceHandlerTest) |
165 QTEST_MAIN(SearchInDeviceHandlerTest) |
165 #endif //Q_OS_SYMBIAN |
166 #endif //Q_OS_SYMBIAN |