summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2017-09-15 11:43:13 +0200
committerMichal Klocek <michal.klocek@qt.io>2017-09-15 16:07:36 +0000
commita6d3799cf34569f5618e4b95f56a42f0e350e403 (patch)
tree0955e07c294a8ca71f0c647317a79a1f816018b6
parent0ba8cbcb9ce3936b7906f26f1a06baea01aedae4 (diff)
Fix not working "OpenFile" in simplebrowser
Change-Id: I3e9baf47d0491f0031a9a9864eecd12b09773eff Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r--examples/webenginewidgets/simplebrowser/browserwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
index 43c25e63..121588e2 100644
--- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp
+++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
@@ -406,11 +406,11 @@ void BrowserWindow::handleNewWindowTriggered()
void BrowserWindow::handleFileOpenTriggered()
{
- QString file = QFileDialog::getOpenFileName(this, tr("Open Web Resource"), QString(),
+ QUrl url = QFileDialog::getOpenFileUrl(this, tr("Open Web Resource"), QString(),
tr("Web Resources (*.html *.htm *.svg *.png *.gif *.svgz);;All files (*.*)"));
- if (file.isEmpty())
+ if (url.isEmpty())
return;
- currentTab()->setUrl(file);
+ currentTab()->setUrl(url);
}
void BrowserWindow::handleFindActionTriggered()