messagingapp/msgsettings/msginit/tsrc/testmsginit/src/testmsginit.cpp
author hgs
Tue, 31 Aug 2010 18:53:38 +0530
changeset 56 f42d9a78f435
permissions -rw-r--r--
201033_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     1
/*
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     2
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     3
 * All rights reserved.
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     8
 *
f42d9a78f435 201033_02
hgs
parents:
diff changeset
     9
 * Initial Contributors:
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    11
 *
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    12
 * Contributors:
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    13
 *
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    14
 * Description:
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    15
 *
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    16
 */
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    17
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    18
// INCLUDES
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    19
#include "testmsginit.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    20
#include "debugtraces.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    21
#include "msgsimnumberdetector.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    22
#include "coutboxobserver.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    23
#include "startupmonitor.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    24
#include "coutboxsendoperation.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    25
#include "cmobilesignalstrengthhandler.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    26
#include "testoutboxobserver_stub.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    27
#include "testoutboxsender_stub.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    28
#include "testsimnumdetector_stub.h"
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    29
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    30
#include <csmsaccount.h>
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    31
#include <e32property.h>
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    32
#include <startupdomainpskeys.h>
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    33
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    34
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    35
void TestMsgInit::initTestCase()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    36
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    37
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    38
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    39
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    40
void TestMsgInit::init()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    41
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    42
	qDebug("TestMsgInit::init enter");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    43
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    44
	iTestMsgSimOperation = CTestMsgSimOperation::NewL();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    45
	QVERIFY2(iTestMsgSimOperation != NULL, "CTestMsgSimOperation init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    46
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    47
	qDebug("TestMsgInit::init exit");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    48
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    49
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    50
void TestMsgInit::validateMobileSignalStrength()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    51
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    52
	qDebug("TestMsgInit::validateMobileSignalStrength enter");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    53
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    54
	CTestOutboxObserver* mOutBoxObserver = CTestOutboxObserver::NewL();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    55
	QVERIFY2(mOutBoxObserver != NULL, "CTestOutboxObserver init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    56
	CleanupStack::PushL(mOutBoxObserver);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    57
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    58
	iSignalStrengthHandler = CMobileSignalStrengthHandler::NewL();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    59
	QVERIFY2(iSignalStrengthHandler != NULL, "CMobileSignalStrengthHandler init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    60
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    61
	if (iSignalStrengthHandler->ObservingSupported()) 
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    62
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    63
		iSignalStrengthHandler->SetSignalStrengthObserverL(mOutBoxObserver);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    64
		iSignalStrengthHandler->StartObservingL();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    65
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    66
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    67
	CleanupStack::PopAndDestroy(mOutBoxObserver);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    68
	//QTest::qWait(1000);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    69
	if(NULL !=iSignalStrengthHandler)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    70
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    71
		delete iSignalStrengthHandler;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    72
		iSignalStrengthHandler = NULL;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    73
		}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    74
	qDebug("TestMsgInit::validateMobileSignalStrength exit");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    75
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    76
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    77
void TestMsgInit::validateOutboxSenderOperation()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    78
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    79
	qDebug("TestMsgInit::validateOutboxSenderOperation enter");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    80
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    81
	CTestOutboxSender* mTestOutboxSender = CTestOutboxSender::NewL(*(iTestMsgSimOperation->iMsvSession));
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    82
	QVERIFY2(mTestOutboxSender != NULL, "CTestOutboxSender init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    83
	CleanupStack::PushL(mTestOutboxSender);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    84
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    85
	CMsvSingleOpWatcher* msingleOpWatcher = CMsvSingleOpWatcher::NewL(*mTestOutboxSender);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    86
	QVERIFY2(msingleOpWatcher != NULL, "CMsvSingleOpWatcher init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    87
	CleanupStack::PushL(msingleOpWatcher);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    88
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    89
	iMsvOperation = COutboxSendOperation::NewL(*(iTestMsgSimOperation->iMsvSession), msingleOpWatcher->iStatus);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    90
	QVERIFY2(iMsvOperation != NULL, "COutboxSendOperation init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    91
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    92
	//QTest::qWait(1000);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    93
	if(NULL !=iMsvOperation)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    94
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    95
		delete iMsvOperation;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    96
		iMsvOperation = NULL;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    97
		}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    98
	CleanupStack::PopAndDestroy(2); //mTestOutboxSender, msingleOpWatcher
f42d9a78f435 201033_02
hgs
parents:
diff changeset
    99
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   100
	qDebug("TestMsgInit::validateOutboxSenderOperation exit");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   101
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   102
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   103
void TestMsgInit::validateOutboxObserver()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   104
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   105
	qDebug("TestMsgInit::validateOutboxObserver enter");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   106
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   107
	// Observes the OUTBOX for any offline messages...
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   108
	iOutBoxObserver = COutboxObserver::NewL();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   109
	QVERIFY2(iOutBoxObserver != NULL, "COutboxObserver init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   110
	    
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   111
	// Start the Auto-send AO, to handle offline SMS messages
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   112
	iOutBoxObserver->HandleMsvSessionReadyL(*(iTestMsgSimOperation->iMsvSession));
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   113
	//QTest::qWait(1000);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   114
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   115
	if(NULL !=iOutBoxObserver)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   116
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   117
		delete iOutBoxObserver;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   118
		iOutBoxObserver = NULL;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   119
		}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   120
	qDebug("TestMsgInit::validateOutboxObserver exit");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   121
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   122
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   123
 void TestMsgInit::validateSimNumDetector()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   124
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   125
	qDebug("TestMsgInit::validateSimNumDetector enter");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   126
	 
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   127
	TInt startupState = 0;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   128
	TInt modifiedState = ESwStateNormalRfOn;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   129
	TInt status = 0;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   130
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   131
	//Load current settings
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   132
	CSmsSettings* smsSettings = CSmsSettings::NewLC();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   133
	CSmsAccount* smsAccount = CSmsAccount::NewLC();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   134
	smsAccount->LoadSettingsL(*smsSettings);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   135
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   136
	// Remove all old SMSC's configured
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   137
	TInt numSCAddresses = smsSettings->ServiceCenterCount();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   138
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   139
	qDebug() << "numSCAddresses:" << numSCAddresses;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   140
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   141
	for (TInt j = numSCAddresses; j > 0; j--)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   142
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   143
		smsSettings->RemoveServiceCenter(j - 1);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   144
		}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   145
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   146
	// Save settings
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   147
	TInt maxTries(5);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   148
	TBool done(EFalse);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   149
	while (maxTries && !done)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   150
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   151
		TRAPD( err, smsAccount->SaveSettingsL( *smsSettings ) );
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   152
		if (err == KErrNone)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   153
			{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   154
		qDebug("CMsgSimOperation::CreateDefaultSettingsL settings saved");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   155
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   156
			done = ETrue;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   157
			}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   158
		else if (err == KErrLocked)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   159
			{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   160
		qDebug("CMsgSimOperation::CreateDefaultSettingsL KErrLocked");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   161
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   162
			// Wait a while and retry.
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   163
			User::After(100000); // 0.1 seconds
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   164
			maxTries--;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   165
			}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   166
		else
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   167
			{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   168
			User::Leave(err);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   169
			}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   170
		}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   171
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   172
	QVERIFY2((iSimHandler = new MsgSimNumDetector()) != NULL, "Message settings engine init failed.");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   173
	status = RProperty::Get( KPSUidStartup, KPSGlobalSystemState, startupState );
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   174
	if(ESwStateNormalRfOn != startupState)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   175
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   176
		RProperty::Set( KPSUidStartup, KPSGlobalSystemState, modifiedState );
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   177
		}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   178
	qDebug() << "startupState:" << startupState;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   179
	qDebug() << "modifiedState:" << modifiedState;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   180
	RProperty::Set(KPSUidStartup, KPSGlobalSystemState, startupState);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   181
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   182
	qDebug() << "startupState:" << startupState;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   183
	qDebug() << "modifiedState:" << modifiedState;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   184
	CleanupStack::PopAndDestroy(2); // smsAccount, smsSettings
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   185
	//QTest::qWait(1000);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   186
	if(NULL !=iSimHandler)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   187
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   188
		delete iSimHandler;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   189
		iSimHandler = NULL;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   190
		}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   191
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   192
	qDebug("TestMsgInit::validateSimNumDetector Exit");
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   193
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   194
 
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   195
void TestMsgInit::cleanup()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   196
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   197
	if(NULL !=iTestMsgSimOperation)
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   198
		{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   199
		delete iTestMsgSimOperation;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   200
		iTestMsgSimOperation = NULL;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   201
		}	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   202
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   203
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   204
void TestMsgInit::cleanupTestCase()
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   205
	{
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   206
	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   207
	}
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   208
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   209
//main entry point
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   210
int main(int argc, char *argv[])
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   211
    { 
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   212
    int ret = -1;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   213
    QCoreApplication app(argc, argv);
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   214
    QObject* tc = new TestMsgInit();
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   215
    
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   216
#ifdef __WINSCW__	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   217
		char *new_argv[3]; 
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   218
		QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log";	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   219
		QByteArray bytes = str.toAscii();	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   220
		char arg1[] = "-o";	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   221
		new_argv[0] = argv[0];	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   222
		new_argv[1] = arg1;	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   223
		new_argv[2] = bytes.data();	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   224
		ret = QTest::qExec(tc, 3, new_argv);	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   225
#else	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   226
		ret = QTest::qExec(tc, argc, argv);	
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   227
#endif
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   228
	delete tc;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   229
    return ret;
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   230
    }
f42d9a78f435 201033_02
hgs
parents:
diff changeset
   231