From 7322556ec759d25ead3d0ba26ebd44a82a574872 Mon Sep 17 00:00:00 2001 From: mread Date: Fri, 5 Nov 2010 08:10:14 +0000 Subject: Generating QFileOpenEvent messages when S60 UI receives OpenFileL S60 applications can receive OpenFileL requests from other apps in the OpenFileL method of their main document class. This S60 main document class is internal to QtGui, so the request is turned into a QFileOpenEvent for the application to pick up if it want to implenment this service. If an application wants to receive the QFileOpenEvent before UI construction, it should do something like: app->sendPostedEvents(app, QEvent::FileOpen); Task-number: QTBUG-15015 Reviewed-by: Shane Kearns --- src/gui/s60framework/qs60maindocument.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/s60framework/qs60maindocument.cpp b/src/gui/s60framework/qs60maindocument.cpp index eafbcb0..7114735 100644 --- a/src/gui/s60framework/qs60maindocument.cpp +++ b/src/gui/s60framework/qs60maindocument.cpp @@ -127,8 +127,10 @@ void QS60MainDocument::OpenFileL(CFileStore *&aFileStore, RFile &aFile) { QCoreApplication* app = QCoreApplication::instance(); QFileOpenEvent* event = new QFileOpenEvent(aFile); - app->postEvent(app, event); - aFileStore = 0; + TFileName name; + aFile.FullName(name); + QString qname((QChar*)name.Ptr(), name.Length()); + QFileOpenEvent* event = new QFileOpenEvent(qname); } QT_END_NAMESPACE -- cgit v0.12