summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/simplebrowser/browserwindow.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-29 15:08:36 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-09-29 15:08:36 +0000
commita6ca622baf9e4f6afee783fd87a6d3f245efd278 (patch)
treea04c866cdeef6a7fa48583d5f4bcf664e5088382 /examples/webenginewidgets/simplebrowser/browserwindow.cpp
parent24b5f01726351c6e6e925bfaf4c7575f469ad0d0 (diff)
parentfa12e9c1c3634696cf3e0754ab9c374456945efc (diff)
Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10
Diffstat (limited to 'examples/webenginewidgets/simplebrowser/browserwindow.cpp')
-rw-r--r--examples/webenginewidgets/simplebrowser/browserwindow.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
index 43c25e633..e114ae0f3 100644
--- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp
+++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -406,11 +416,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()