From a6d3799cf34569f5618e4b95f56a42f0e350e403 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 15 Sep 2017 11:43:13 +0200 Subject: Fix not working "OpenFile" in simplebrowser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3e9baf47d0491f0031a9a9864eecd12b09773eff Reviewed-by: Jüri Valdmann Reviewed-by: Kai Koehne --- examples/webenginewidgets/simplebrowser/browserwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/webenginewidgets/simplebrowser/browserwindow.cpp') diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp index 43c25e633..121588e2c 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() -- cgit v1.2.3 From a273db66e0833f145cb564abbb24dafb8ae13c67 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 14 Sep 2017 15:10:30 +0200 Subject: Fix license header for examples Task-number: QTBUG-60006 Change-Id: Ie1604aed3d5a9ba566e898eae232227ba340bfaa Reviewed-by: Allan Sandfeld Jensen --- examples/webenginewidgets/simplebrowser/browserwindow.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'examples/webenginewidgets/simplebrowser/browserwindow.cpp') diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp index 121588e2c..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 -- cgit v1.2.3