phoneuis/bubblemanager2/tsrc/unit/shared/bubbletest.h
changeset 21 92ab7f8d0eab
child 30 ebdbd102c78a
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
       
     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 BUBBLETEST_H
       
    19 #define BUBBLETEST_H
       
    20 
       
    21 #include <QtCore>
       
    22 
       
    23 #define BUBBLE_TEST_MAIN(TestObject) \
       
    24 int main(int argc, char *argv[]) \
       
    25 { \
       
    26     HbApplication app(argc, argv); \
       
    27     TestObject tc; \
       
    28     QResource::registerResource("../hbcore.rcc"); \
       
    29     int ret = QTest::qExec(&tc, argc, argv); \
       
    30     /* Core dump if HbIconLoader instance is not destroyed before the application instance. */ \
       
    31     /* HbIconLoader uses QCoreApplication::aboutToQuit() signal to destroy itself. */ \
       
    32     /* app.exec() where the signal is normally emitted is not called here. */ \
       
    33     /* So, invoking the signal explicitly. */ \
       
    34     QMetaObject::invokeMethod(&app, "aboutToQuit", Qt::DirectConnection); \
       
    35     return ret; \
       
    36 }
       
    37 
       
    38 // style plugin name
       
    39 #if defined(Q_OS_SYMBIAN)
       
    40     const char* BUBBLE_STYLE_PLUGIN = \
       
    41         "z:/resource/qt/plugins/phone/bubblestyleplugin.dll";
       
    42 #elif defined(Q_OS_WIN)
       
    43     const char* BUBBLE_STYLE_PLUGIN = \
       
    44         "c:/hb/bin/bubblestyleplugin.dll";
       
    45 #else // Q_OS_UNIX
       
    46     const char* BUBBLE_STYLE_PLUGIN = \
       
    47         "/home/lib/libbubblestyleplugin.so";
       
    48 #endif
       
    49 
       
    50 #endif // BUBBLETEST_H