calendarui/tsrc/unittest_calenviewerservice/src/main.cpp
changeset 45 b6db4fd4947b
child 81 ce92091cbd61
equal deleted inserted replaced
23:fd30d51f876b 45:b6db4fd4947b
       
     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 // System includes
       
    19 #include <QTest>
       
    20 #include <hbapplication.h>
       
    21 
       
    22 // User includes
       
    23 #include "test_calenviewerservice.h"
       
    24 
       
    25 int main(int argc, char *argv[])
       
    26 {
       
    27 	HbApplication app(argc, argv);
       
    28 	
       
    29 	TestCalenViewerService tc;
       
    30 	
       
    31 	 char *args[3];	
       
    32 	 args[0] = argv[0];
       
    33 	 args[1] = "-o";	
       
    34 	 args[2] = "c:\\data\\TestCalenViewerService.txt";
       
    35  
       
    36 	int ret = QTest::qExec(&tc, 3, args);
       
    37 	// Core dump if HbIconLoader instance is not destroyed before the
       
    38 	// application instance. HbIconLoader uses QCoreApplication::aboutToQuit()
       
    39 	// signal to destroy itself. app.exec() where the signal is normally emitted
       
    40 	// is not called here. So, invoking the signal explicitly.
       
    41 	QMetaObject::invokeMethod(&app, "aboutToQuit", Qt::DirectConnection);
       
    42 	return ret;
       
    43 }
       
    44 
       
    45 // End of file	--Don't remove this.