summaryrefslogtreecommitdiffstats
path: root/src/gui/s60framework/qs60mainappui.cpp
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2010-11-05 08:10:14 +0000
committerJoão Abecasis <joao.abecasis@nokia.com>2011-02-10 13:26:24 +0100
commit01f5c74b8ecddfc192895ccb85c1627467bb6ff5 (patch)
tree387b0690fd6c5ec32d3c6732329ed91a66bffcd0 /src/gui/s60framework/qs60mainappui.cpp
parentabb425e3db6c20c5271788cb1ec4e1fe37b9ea5b (diff)
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/s60framework/qs60mainappui.cpp')
-rw-r--r--src/gui/s60framework/qs60mainappui.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp
index b5b8b81b80..454f90dc8c 100644
--- a/src/gui/s60framework/qs60mainappui.cpp
+++ b/src/gui/s60framework/qs60mainappui.cpp
@@ -49,6 +49,7 @@
#include <avkon.rsg>
#endif
#include <barsread.h>
+#include <coeutils.h>
#include <qconfig.h>
#include "qs60mainappui.h"
@@ -401,6 +402,15 @@ void QS60MainAppUi::HandleForegroundEventL(TBool aForeground)
QS60MainAppUiBase::HandleForegroundEventL(aForeground);
}
+/*!
+ \internal
+*/
+TBool QS60MainAppUi::ProcessCommandParametersL(TApaCommand /*aCommand*/, TFileName &aDocumentName, const TDesC8 &/*aTail*/)
+{
+ // bypass CEikAppUi::ProcessCommandParametersL(..) which modifies aDocumentName, preventing apparc document opening from working.
+ return ConeUtils::FileExists(aDocumentName);
+}
+
#ifndef Q_WS_S60
void QS60StubAknAppUi::HandleViewDeactivation(const TVwsViewId &, const TVwsViewId &) {}