From 9b90ab99141fba6730098178a456a48a6f2f68b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Dapena=20Paz?= Date: Tue, 8 Jan 2013 20:17:05 +0100 Subject: Add QWindowSystemInterface::handleFileOpen(const QUrl&) In some cases, the call to handleFileOpen may receive a non local URL. With previous API, there was no way to pass it to other layers. With this change, any platform plugin creating this event can directly pass a URL. Change-Id: Ibd7299ad6c09527e1db979840bd67726882efb9b Reviewed-by: Jose Dapena Paz Reviewed-by: Thiago Macieira Reviewed-by: Paul Olav Tvete --- src/gui/kernel/qwindowsysteminterface_p.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/kernel/qwindowsysteminterface_p.h') diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 6c12877035..d0b728ec4d 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -285,9 +285,12 @@ public: class FileOpenEvent : public WindowSystemEvent { public: FileOpenEvent(const QString& fileName) - : WindowSystemEvent(FileOpen), fileName(fileName) + : WindowSystemEvent(FileOpen), url(QUrl::fromLocalFile(fileName)) { } - QString fileName; + FileOpenEvent(const QUrl &url) + : WindowSystemEvent(FileOpen), url(url) + { } + QUrl url; }; class TabletEvent : public InputEvent { -- cgit v1.2.3