summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-09-23 14:09:57 (GMT)
committeraxis <qt-info@nokia.com>2009-09-23 14:09:57 (GMT)
commita90629bf80c1635226b42c299238878c8e6847ec (patch)
tree9d52ec46822fb9ba3eb76d7c8960b81777824f52 /src/gui/kernel/qapplication_s60.cpp
parent17c13775085cfa2ce3c5352cff51c02daaa6662b (diff)
parent4184d85022e2fb3d90dfa4cb211ea5e8e968dec7 (diff)
downloadQt-a90629bf80c1635226b42c299238878c8e6847ec.zip
Qt-a90629bf80c1635226b42c299238878c8e6847ec.tar.gz
Qt-a90629bf80c1635226b42c299238878c8e6847ec.tar.bz2
Merge branch 's60MainHelperClasses' into 4.6
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 58aca83..1c198f9 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -886,11 +886,50 @@ TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id)
return CCoeControl::MopSupplyObject(id);
}
+/*!
+ \typedef QApplication::QS60MainApplicationFactory
+
+ This is a typedef for a pointer to a function with the following
+ signature:
+
+ \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 47
+
+ \sa QApplication::QApplication(QApplication::QS60MainApplicationFactory, int &, char **)
+*/
+
+/*!
+ \since 4.6
+
+ Creates an application using the application factory given in
+ \a factory, and using \a argc command line arguments in \a argv.
+ \a factory can be leaving, but the error will be converted to a
+ standard exception.
+
+ This function is only available on S60.
+*/
+QApplication::QApplication(QApplication::QS60MainApplicationFactory factory, int &argc, char **argv)
+ : QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient))
+{
+ Q_D(QApplication);
+ S60->s60ApplicationFactory = factory;
+ d->construct();
+}
+
+QApplication::QApplication(QApplication::QS60MainApplicationFactory factory, int &argc, char **argv, int _internal)
+ : QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient))
+{
+ Q_D(QApplication);
+ S60->s60ApplicationFactory = factory;
+ d->construct();
+ QApplicationPrivate::app_compile_version = _internal;
+}
+
void qt_init(QApplicationPrivate * /* priv */, int)
{
if (!CCoeEnv::Static()) {
// The S60 framework has not been initalized. We need to do it.
- TApaApplicationFactory factory(NewApplication);
+ 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().