summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 7f157a1..3a70dd5 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1431,21 +1431,20 @@ void qt_init(QApplicationPrivate * /* priv */, int)
// The S60 framework has not been initialized. We need to do it.
TApaApplicationFactory factory(S60->s60ApplicationFactory ?
S60->s60ApplicationFactory : newS60Application);
- CApaCommandLine* commandLine = 0;
- TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine);
- // After this construction, CEikonEnv will be available from CEikonEnv::Static().
- // (much like our qApp).
- QtEikonEnv* coe = new QtEikonEnv;
- //not using QT_TRAP_THROWING, because coe owns the cleanupstack so it can't be pushed there.
- if(err == KErrNone)
- TRAP(err, coe->ConstructAppFromCommandLineL(factory,*commandLine));
- delete commandLine;
- if(err != KErrNone) {
- qWarning() << "qt_init: Eikon application construct failed ("
- << err
- << "), maybe missing resource file on S60 3.1?";
- delete coe;
- qt_symbian_throwIfError(err);
+ CApaCommandLine* commandLine = q_check_ptr(QCoreApplicationPrivate::symbianCommandLine());
+ if (commandLine) {
+ // After this construction, CEikonEnv will be available from CEikonEnv::Static().
+ // (much like our qApp).
+ QtEikonEnv* coe = new QtEikonEnv;
+ //not using QT_TRAP_THROWING, because coe owns the cleanupstack so it can't be pushed there.
+ TRAPD(err, coe->ConstructAppFromCommandLineL(factory, *commandLine));
+ if(err != KErrNone) {
+ qWarning() << "qt_init: Eikon application construct failed ("
+ << err
+ << "), maybe missing resource file on S60 3.1?";
+ delete coe;
+ qt_symbian_throwIfError(err);
+ }
}
S60->s60InstalledTrapHandler = User::SetTrapHandler(origTrapHandler);