equal
deleted
inserted
replaced
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 * Version : %version: 10 % |
16 * Version : %version: 11 % |
17 */ |
17 */ |
18 #include <QtTest/QtTest> |
18 #include <QtTest/QtTest> |
19 #include <hgwidgets/hgcacheproxymodel.h> |
19 #include <hgwidgets/hgcacheproxymodel.h> |
20 #include "test_hgcacheproxydatamodel.h" |
20 #include "test_hgcacheproxydatamodel.h" |
21 |
21 |
1423 int c = 5; |
1423 int c = 5; |
1424 char* v[] = {argv[0], "-o", "c:/test.txt", "-maxwarnings", "0"}; |
1424 char* v[] = {argv[0], "-o", "c:/test.txt", "-maxwarnings", "0"}; |
1425 return QTest::qExec(&tc, c, v); |
1425 return QTest::qExec(&tc, c, v); |
1426 } |
1426 } |
1427 #else |
1427 #else |
1428 QTEST_MAIN(TestCacheProxy) |
1428 int main (int argc, char* argv[]) |
|
1429 { |
|
1430 for ( int i=0;i<argc; i++){ |
|
1431 if (strcmp(argv[i], "-o")==0 && i+1 <argc ){ |
|
1432 //let's make sure that folder specified after -o exists |
|
1433 QDir file( QString::fromLatin1( argv[i+1] )); |
|
1434 QString s = file.absolutePath (); |
|
1435 s = s.left( s.lastIndexOf(file.dirName()) ); |
|
1436 if ( !file.exists(s) ){ |
|
1437 file.mkpath(s); |
|
1438 } |
|
1439 } |
|
1440 } |
|
1441 |
|
1442 QApplication app(argc, argv); |
|
1443 QTEST_DISABLE_KEYPAD_NAVIGATION |
|
1444 TestCacheProxy tc; |
|
1445 return QTest::qExec(&tc, argc, argv); |
|
1446 } |
1429 #endif |
1447 #endif |