phonesettings/cpphonesettingsplugins/telephonyplugin/tsrc/ut_cptelephonyplugin/qtestmains60ui.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     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 #define QTEST_MAIN_S60UI(TestObject) \
       
    26 int main(int argc, char *argv[]) \
       
    27 { \
       
    28 HbApplication app(argc, argv); \
       
    29 QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
       
    30 QByteArray   bytes  = str.toAscii(); \
       
    31 \
       
    32 char arg1[] = "-o"; \
       
    33 \
       
    34 new_argv[0] = argv[0]; \
       
    35 new_argv[1] = arg1; \
       
    36 new_argv[2] = bytes.data(); \
       
    37 \
       
    38 TestObject tc; \
       
    39 QResource::registerResource("../hbcore.rcc"); \
       
    40 HbMainWindow mainWindow; \
       
    41 mainWindow.show(); \
       
    42 return  QTest::qExec(&tc, 3, new_argv); \
       
    43 }
       
    44 
       
    45 #endif