summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2010-11-05 08:10:14 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2011-02-10 12:26:30 (GMT)
commit7322556ec759d25ead3d0ba26ebd44a82a574872 (patch)
treeabb98d49ee04fad671d87362ee5df6a489aa6e27 /src/gui
parent6b452ea0757414965fa00bfb7285f7d687c9c8d0 (diff)
downloadQt-7322556ec759d25ead3d0ba26ebd44a82a574872.zip
Qt-7322556ec759d25ead3d0ba26ebd44a82a574872.tar.gz
Qt-7322556ec759d25ead3d0ba26ebd44a82a574872.tar.bz2
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
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/s60framework/qs60maindocument.cpp6
1 files 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