phonesettings/cpphonesettingsplugins/divertplugin/tsrc/ut_cpdivertplugin/qtestmains60ui.h
equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef QTESTMAINS60 |
|
19 #define QTESTMAINS60 |
|
20 |
|
21 #include <hbapplication.h> |
|
22 #include <hbmainwindow.h> |
|
23 |
|
24 char *new_argv[3]; |
|
25 HbMainWindow *mainWindow; |
|
26 #define QTEST_MAIN_S60UI(TestObject) \ |
|
27 int main(int argc, char *argv[]) \ |
|
28 { \ |
|
29 HbApplication *app = new HbApplication(argc, argv); \ |
|
30 QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \ |
|
31 QByteArray bytes = str.toAscii(); \ |
|
32 \ |
|
33 char arg1[] = "-o"; \ |
|
34 \ |
|
35 new_argv[0] = argv[0]; \ |
|
36 new_argv[1] = arg1; \ |
|
37 new_argv[2] = bytes.data(); \ |
|
38 \ |
|
39 TestObject tc; \ |
|
40 QResource::registerResource("../hbcore.rcc"); \ |
|
41 mainWindow = new HbMainWindow;\ |
|
42 mainWindow->show(); \ |
|
43 int ret = QTest::qExec(&tc, 3, new_argv); \ |
|
44 delete mainWindow; \ |
|
45 delete app; \ |
|
46 return ret; \ |
|
47 } |
|
48 |
|
49 #endif |
|