diff options
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 3df40d7..0d8527a 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); @@ -1619,7 +1618,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) qRegisterMetaType<WId>("WId"); } -extern void qt_cleanup_symbianFontDatabaseExtras(); // qfontdatabase_s60.cpp +extern void qt_cleanup_symbianFontDatabase(); // qfontdatabase_s60.cpp /***************************************************************************** qt_cleanup() - cleans up when the application is finished @@ -1636,7 +1635,7 @@ void qt_cleanup() QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles - qt_cleanup_symbianFontDatabaseExtras(); + qt_cleanup_symbianFontDatabase(); // S60 structure and window server session are freed in eventdispatcher destructor as they are needed there // It's important that this happens here, before the event dispatcher gets @@ -2022,6 +2021,9 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent S60->wsSession().SetPointerCursorMode(EPointerCursorNormal); } #endif +#ifdef QT_SOFTKEYS_ENABLED + QSoftKeyManager::updateSoftKeys(); +#endif break; case EEventFocusLost: if (callSymbianEventFilters(symbianEvent)) |