summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webenginewidgets')
-rw-r--r--examples/webenginewidgets/browser/Info_mac.plist6
-rw-r--r--examples/webenginewidgets/browser/autosaver.cpp18
-rw-r--r--examples/webenginewidgets/browser/autosaver.h18
-rw-r--r--examples/webenginewidgets/browser/bookmarks.cpp18
-rw-r--r--examples/webenginewidgets/browser/bookmarks.h18
-rw-r--r--examples/webenginewidgets/browser/browser.pro16
-rw-r--r--examples/webenginewidgets/browser/browserapplication.cpp31
-rw-r--r--examples/webenginewidgets/browser/browserapplication.h18
-rw-r--r--examples/webenginewidgets/browser/browsermainwindow.cpp24
-rw-r--r--examples/webenginewidgets/browser/browsermainwindow.h18
-rw-r--r--examples/webenginewidgets/browser/chasewidget.cpp18
-rw-r--r--examples/webenginewidgets/browser/chasewidget.h18
-rw-r--r--examples/webenginewidgets/browser/cookiejar.cpp18
-rw-r--r--examples/webenginewidgets/browser/cookiejar.h18
-rw-r--r--examples/webenginewidgets/browser/data/browser.svg2
-rw-r--r--examples/webenginewidgets/browser/doc/src/browser.qdoc12
-rw-r--r--examples/webenginewidgets/browser/downloaditem.ui10
-rw-r--r--examples/webenginewidgets/browser/downloadmanager.cpp320
-rw-r--r--examples/webenginewidgets/browser/downloadmanager.h61
-rw-r--r--examples/webenginewidgets/browser/edittableview.cpp18
-rw-r--r--examples/webenginewidgets/browser/edittableview.h18
-rw-r--r--examples/webenginewidgets/browser/edittreeview.cpp18
-rw-r--r--examples/webenginewidgets/browser/edittreeview.h18
-rw-r--r--examples/webenginewidgets/browser/featurepermissionbar.cpp42
-rw-r--r--examples/webenginewidgets/browser/featurepermissionbar.h19
-rw-r--r--examples/webenginewidgets/browser/history.cpp18
-rw-r--r--examples/webenginewidgets/browser/history.h18
-rw-r--r--examples/webenginewidgets/browser/main.cpp18
-rw-r--r--examples/webenginewidgets/browser/modelmenu.cpp18
-rw-r--r--examples/webenginewidgets/browser/modelmenu.h18
-rw-r--r--examples/webenginewidgets/browser/networkaccessmanager.cpp18
-rw-r--r--examples/webenginewidgets/browser/networkaccessmanager.h18
-rw-r--r--examples/webenginewidgets/browser/searchlineedit.cpp18
-rw-r--r--examples/webenginewidgets/browser/searchlineedit.h18
-rw-r--r--examples/webenginewidgets/browser/settings.cpp102
-rw-r--r--examples/webenginewidgets/browser/settings.h18
-rw-r--r--examples/webenginewidgets/browser/settings.ui480
-rw-r--r--examples/webenginewidgets/browser/squeezelabel.cpp18
-rw-r--r--examples/webenginewidgets/browser/squeezelabel.h18
-rw-r--r--examples/webenginewidgets/browser/tabwidget.cpp31
-rw-r--r--examples/webenginewidgets/browser/tabwidget.h24
-rw-r--r--examples/webenginewidgets/browser/toolbarsearch.cpp18
-rw-r--r--examples/webenginewidgets/browser/toolbarsearch.h18
-rw-r--r--examples/webenginewidgets/browser/urllineedit.cpp18
-rw-r--r--examples/webenginewidgets/browser/urllineedit.h18
-rw-r--r--examples/webenginewidgets/browser/webview.cpp62
-rw-r--r--examples/webenginewidgets/browser/webview.h23
-rw-r--r--examples/webenginewidgets/browser/xbel.cpp18
-rw-r--r--examples/webenginewidgets/browser/xbel.h18
-rw-r--r--examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc12
-rw-r--r--examples/webenginewidgets/fancybrowser/fancybrowser.pro2
-rw-r--r--examples/webenginewidgets/fancybrowser/main.cpp8
-rw-r--r--examples/webenginewidgets/fancybrowser/mainwindow.cpp8
-rw-r--r--examples/webenginewidgets/fancybrowser/mainwindow.h8
54 files changed, 834 insertions, 1045 deletions
diff --git a/examples/webenginewidgets/browser/Info_mac.plist b/examples/webenginewidgets/browser/Info_mac.plist
index 87435b2b6..ccd4b3f28 100644
--- a/examples/webenginewidgets/browser/Info_mac.plist
+++ b/examples/webenginewidgets/browser/Info_mac.plist
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
+<plist version="1.0">
<dict>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
<key>CFBundleIconFile</key>
<string>@ICON@</string>
<key>CFBundlePackageType</key>
@@ -38,6 +40,6 @@
</dict>
</array>
<key>NOTE</key>
- <string>DemoBrowser by Digia Plc and/or its subsidiary(-ies)</string>
+ <string>DemoBrowser by The Qt Company Ltd.</string>
</dict>
</plist>
diff --git a/examples/webenginewidgets/browser/autosaver.cpp b/examples/webenginewidgets/browser/autosaver.cpp
index a6efa4ca1..dc72090dd 100644
--- a/examples/webenginewidgets/browser/autosaver.cpp
+++ b/examples/webenginewidgets/browser/autosaver.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/autosaver.h b/examples/webenginewidgets/browser/autosaver.h
index cf499b066..b0c73846f 100644
--- a/examples/webenginewidgets/browser/autosaver.h
+++ b/examples/webenginewidgets/browser/autosaver.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/bookmarks.cpp b/examples/webenginewidgets/browser/bookmarks.cpp
index 616065816..15078caa3 100644
--- a/examples/webenginewidgets/browser/bookmarks.cpp
+++ b/examples/webenginewidgets/browser/bookmarks.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/bookmarks.h b/examples/webenginewidgets/browser/bookmarks.h
index be29666df..244f003c6 100644
--- a/examples/webenginewidgets/browser/bookmarks.h
+++ b/examples/webenginewidgets/browser/bookmarks.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/browser.pro b/examples/webenginewidgets/browser/browser.pro
index c9bf1a9e0..f54186856 100644
--- a/examples/webenginewidgets/browser/browser.pro
+++ b/examples/webenginewidgets/browser/browser.pro
@@ -2,8 +2,6 @@ TEMPLATE = app
TARGET = browser
QT += webenginewidgets network widgets printsupport
-macx: CONFIG -= app_bundle
-
qtHaveModule(uitools):!embedded: QT += uitools
else: DEFINES += QT_NO_UITOOLS
@@ -82,20 +80,6 @@ mac {
ICON = browser.icns
QMAKE_INFO_PLIST = Info_mac.plist
TARGET = Browser
-
- # No 64-bit Flash on Mac, so build the browser 32-bit
- contains(QT_CONFIG, x86) {
- CONFIG -= x86_64
- CONFIG += x86
- }
- contains(QT_CONFIG, ppc) {
- CONFIG -= ppc64
- CONFIG += ppc
- }
-}
-
-wince*: {
- DEPLOYMENT_PLUGIN += qjpeg qgif
}
EXAMPLE_FILES = Info_mac.plist browser.icns browser.ico browser.rc
diff --git a/examples/webenginewidgets/browser/browserapplication.cpp b/examples/webenginewidgets/browser/browserapplication.cpp
index 44713901d..ac3925d51 100644
--- a/examples/webenginewidgets/browser/browserapplication.cpp
+++ b/examples/webenginewidgets/browser/browserapplication.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -66,6 +66,7 @@
#include <QtNetwork/QNetworkProxy>
#include <QtNetwork/QSslSocket>
+#include <QWebEngineProfile>
#include <QWebEngineSettings>
#include <QtCore/QDebug>
@@ -179,7 +180,7 @@ void BrowserApplication::quitBrowser()
clean();
int tabCount = 0;
for (int i = 0; i < m_mainWindows.count(); ++i) {
- tabCount =+ m_mainWindows.at(i)->tabWidget()->count();
+ tabCount += m_mainWindows.at(i)->tabWidget()->count();
}
if (tabCount > 1) {
@@ -230,6 +231,8 @@ void BrowserApplication::loadSettings()
settings.beginGroup(QLatin1String("websettings"));
QWebEngineSettings *defaultSettings = QWebEngineSettings::globalSettings();
+ QWebEngineProfile *defaultProfile = QWebEngineProfile::defaultProfile();
+
QString standardFontFamily = defaultSettings->fontFamily(QWebEngineSettings::StandardFont);
int standardFontSize = defaultSettings->fontSize(QWebEngineSettings::DefaultFontSize);
QFont standardFont = QFont(standardFontFamily, standardFontSize);
@@ -255,6 +258,14 @@ void BrowserApplication::loadSettings()
QUrl url = settings.value(QLatin1String("userStyleSheet")).toUrl();
defaultSettings->setUserStyleSheetUrl(url);
#endif
+ defaultProfile->setHttpUserAgent(settings.value(QLatin1String("httpUserAgent")).toString());
+ settings.endGroup();
+ settings.beginGroup(QLatin1String("cookies"));
+
+ QWebEngineProfile::PersistentCookiesPolicy persistentCookiesPolicy = QWebEngineProfile::PersistentCookiesPolicy(settings.value(QLatin1String("persistentCookiesPolicy")).toInt());
+ defaultProfile->setPersistentCookiesPolicy(persistentCookiesPolicy);
+ QString pdataPath = settings.value(QLatin1String("persistentDataPath")).toString();
+ defaultProfile->setPersistentStoragePath(pdataPath);
settings.endGroup();
}
diff --git a/examples/webenginewidgets/browser/browserapplication.h b/examples/webenginewidgets/browser/browserapplication.h
index acb03ded5..97df0e431 100644
--- a/examples/webenginewidgets/browser/browserapplication.h
+++ b/examples/webenginewidgets/browser/browserapplication.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/browsermainwindow.cpp b/examples/webenginewidgets/browser/browsermainwindow.cpp
index cce603cff..b50343942 100644
--- a/examples/webenginewidgets/browser/browsermainwindow.cpp
+++ b/examples/webenginewidgets/browser/browsermainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -284,7 +284,7 @@ void BrowserMainWindow::setupMenu()
fileMenu->addSeparator();
fileMenu->addAction(m_tabWidget->closeTabAction());
fileMenu->addSeparator();
-#if defined(QWEBENGINEPAGE_SETNETWORKACCESSMANAGER)
+#if defined(QWEBENGINE_SAVE_AS_FILE)
fileMenu->addAction(tr("&Save As..."), this,
SLOT(slotFileSaveAs()), QKeySequence(QKeySequence::Save));
fileMenu->addSeparator();
@@ -603,7 +603,7 @@ void BrowserMainWindow::slotSelectLineEdit()
void BrowserMainWindow::slotFileSaveAs()
{
- BrowserApplication::downloadManager()->download(currentTab()->url(), true);
+ // not implemented yet.
}
void BrowserMainWindow::slotPreferences()
@@ -940,10 +940,8 @@ void BrowserMainWindow::slotAboutToShowWindowMenu()
m_windowMenu->addAction(m_tabWidget->nextTabAction());
m_windowMenu->addAction(m_tabWidget->previousTabAction());
m_windowMenu->addSeparator();
-#if defined(QWEBENGINEPAGE_SETNETWORKACCESSMANAGER)
m_windowMenu->addAction(tr("Downloads"), this, SLOT(slotDownloadManager()), QKeySequence(tr("Alt+Ctrl+L", "Download Manager")));
m_windowMenu->addSeparator();
-#endif
QList<BrowserMainWindow*> windows = BrowserApplication::instance()->mainWindows();
for (int i = 0; i < windows.count(); ++i) {
diff --git a/examples/webenginewidgets/browser/browsermainwindow.h b/examples/webenginewidgets/browser/browsermainwindow.h
index da767e35e..99a5e55b0 100644
--- a/examples/webenginewidgets/browser/browsermainwindow.h
+++ b/examples/webenginewidgets/browser/browsermainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/chasewidget.cpp b/examples/webenginewidgets/browser/chasewidget.cpp
index c34dde739..fb0e9ce76 100644
--- a/examples/webenginewidgets/browser/chasewidget.cpp
+++ b/examples/webenginewidgets/browser/chasewidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/chasewidget.h b/examples/webenginewidgets/browser/chasewidget.h
index 2c57d08ac..a90389034 100644
--- a/examples/webenginewidgets/browser/chasewidget.h
+++ b/examples/webenginewidgets/browser/chasewidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/cookiejar.cpp b/examples/webenginewidgets/browser/cookiejar.cpp
index 0b94d9903..d9a7465ca 100644
--- a/examples/webenginewidgets/browser/cookiejar.cpp
+++ b/examples/webenginewidgets/browser/cookiejar.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/cookiejar.h b/examples/webenginewidgets/browser/cookiejar.h
index 1cc7800e1..374156e89 100644
--- a/examples/webenginewidgets/browser/cookiejar.h
+++ b/examples/webenginewidgets/browser/cookiejar.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/data/browser.svg b/examples/webenginewidgets/browser/data/browser.svg
index 8795187b1..2127a0a6e 100644
--- a/examples/webenginewidgets/browser/data/browser.svg
+++ b/examples/webenginewidgets/browser/data/browser.svg
@@ -276,7 +276,7 @@
</dc:creator>
<dc:rights>
<cc:Agent>
- <dc:title>Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).</dc:title>
+ <dc:title>Copyright (C) 2015 The Qt Company Ltd.</dc:title>
</cc:Agent>
</dc:rights>
</cc:Work>
diff --git a/examples/webenginewidgets/browser/doc/src/browser.qdoc b/examples/webenginewidgets/browser/doc/src/browser.qdoc
index f4a51518b..99581d8a9 100644
--- a/examples/webenginewidgets/browser/doc/src/browser.qdoc
+++ b/examples/webenginewidgets/browser/doc/src/browser.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/examples/webenginewidgets/browser/downloaditem.ui b/examples/webenginewidgets/browser/downloaditem.ui
index 4a0a0fd9a..b7f7deb72 100644
--- a/examples/webenginewidgets/browser/downloaditem.ui
+++ b/examples/webenginewidgets/browser/downloaditem.ui
@@ -82,16 +82,6 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="tryAgainButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>Try Again</string>
- </property>
- </widget>
- </item>
- <item>
<widget class="QPushButton" name="stopButton" >
<property name="text" >
<string>Stop</string>
diff --git a/examples/webenginewidgets/browser/downloadmanager.cpp b/examples/webenginewidgets/browser/downloadmanager.cpp
index 1ed27e642..9609589d7 100644
--- a/examples/webenginewidgets/browser/downloadmanager.cpp
+++ b/examples/webenginewidgets/browser/downloadmanager.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -58,48 +58,43 @@
#include <QtCore/QDebug>
#include <QWebEngineSettings>
+#include <QWebEngineDownloadItem>
/*!
- DownloadItem is a widget that is displayed in the download manager list.
- It moves the data from the QNetworkReply into the QFile as well
+ DownloadWidget is a widget that is displayed in the download manager list.
+ It moves the data from the QWebEngineDownloadItem into the QFile as well
as update the information/progressbar and report errors.
*/
-DownloadItem::DownloadItem(QNetworkReply *reply, bool requestFileName, QWidget *parent)
+
+DownloadWidget::DownloadWidget(QWebEngineDownloadItem *download, QWidget *parent)
: QWidget(parent)
- , m_reply(reply)
- , m_requestFileName(requestFileName)
, m_bytesReceived(0)
+ , m_download(download)
{
setupUi(this);
QPalette p = downloadInfoLabel->palette();
p.setColor(QPalette::Text, Qt::darkGray);
downloadInfoLabel->setPalette(p);
progressBar->setMaximum(0);
- tryAgainButton->hide();
connect(stopButton, SIGNAL(clicked()), this, SLOT(stop()));
connect(openButton, SIGNAL(clicked()), this, SLOT(open()));
- connect(tryAgainButton, SIGNAL(clicked()), this, SLOT(tryAgain()));
+
+ if (download) {
+ m_file.setFile(download->path());
+ m_url = download->url();
+ }
init();
}
-void DownloadItem::init()
+void DownloadWidget::init()
{
- if (!m_reply)
- return;
-
- // attach to the m_reply
- m_url = m_reply->url();
- m_reply->setParent(this);
- connect(m_reply, SIGNAL(readyRead()), this, SLOT(downloadReadyRead()));
- connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
- this, SLOT(error(QNetworkReply::NetworkError)));
- connect(m_reply, SIGNAL(downloadProgress(qint64,qint64)),
- this, SLOT(downloadProgress(qint64,qint64)));
- connect(m_reply, SIGNAL(metaDataChanged()),
- this, SLOT(metaDataChanged()));
- connect(m_reply, SIGNAL(finished()),
- this, SLOT(finished()));
+ if (m_download) {
+ connect(m_download.data(), SIGNAL(downloadProgress(qint64,qint64)),
+ this, SLOT(downloadProgress(qint64,qint64)));
+ connect(m_download.data(), SIGNAL(finished()),
+ this, SLOT(finished()));
+ }
// reset info
downloadInfoLabel->clear();
@@ -108,139 +103,58 @@ void DownloadItem::init()
// start timer for the download estimation
m_downloadTime.start();
-
- if (m_reply->error() != QNetworkReply::NoError) {
- error(m_reply->error());
- finished();
- }
}
-void DownloadItem::getFileName()
+bool DownloadWidget::getFileName(bool promptForFileName)
{
QSettings settings;
settings.beginGroup(QLatin1String("downloadmanager"));
QString defaultLocation = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
+ if (m_file.absoluteDir().exists())
+ defaultLocation = m_file.absolutePath();
QString downloadDirectory = settings.value(QLatin1String("downloadDirectory"), defaultLocation).toString();
if (!downloadDirectory.isEmpty())
downloadDirectory += QLatin1Char('/');
- QString defaultFileName = saveFileName(downloadDirectory);
+ QString defaultFileName = QFileInfo(downloadDirectory, m_file.fileName()).absoluteFilePath();
QString fileName = defaultFileName;
- if (m_requestFileName) {
+ if (promptForFileName) {
fileName = QFileDialog::getSaveFileName(this, tr("Save File"), defaultFileName);
if (fileName.isEmpty()) {
- m_reply->close();
+ if (m_download)
+ m_download->cancel();
fileNameLabel->setText(tr("Download canceled: %1").arg(QFileInfo(defaultFileName).fileName()));
- return;
+ return false;
}
}
- m_output.setFileName(fileName);
- fileNameLabel->setText(QFileInfo(m_output.fileName()).fileName());
- if (m_requestFileName)
- downloadReadyRead();
-}
+ m_file.setFile(fileName);
-QString DownloadItem::saveFileName(const QString &directory) const
-{
- // Move this function into QNetworkReply to also get file name sent from the server
- QString path = m_url.path();
- QFileInfo info(path);
- QString baseName = info.completeBaseName();
- QString endName = info.suffix();
-
- if (baseName.isEmpty()) {
- baseName = QLatin1String("unnamed_download");
- qDebug() << "DownloadManager:: downloading unknown file:" << m_url;
- }
- QString name = directory + baseName + QLatin1Char('.') + endName;
- if (QFile::exists(name)) {
- // already exists, don't overwrite
- int i = 1;
- do {
- name = directory + baseName + QLatin1Char('-') + QString::number(i++) + QLatin1Char('.') + endName;
- } while (QFile::exists(name));
- }
- return name;
-}
+ if (m_download && m_download->state() == QWebEngineDownloadItem::DownloadRequested)
+ m_download->setPath(m_file.absoluteFilePath());
+ fileNameLabel->setText(m_file.fileName());
+ return true;
+}
-void DownloadItem::stop()
+void DownloadWidget::stop()
{
setUpdatesEnabled(false);
stopButton->setEnabled(false);
stopButton->hide();
- tryAgainButton->setEnabled(true);
- tryAgainButton->show();
setUpdatesEnabled(true);
- m_reply->abort();
-}
-
-void DownloadItem::open()
-{
- QFileInfo info(m_output);
- QUrl url = QUrl::fromLocalFile(info.absolutePath());
- QDesktopServices::openUrl(url);
-}
+ if (m_download)
+ m_download->cancel();
-void DownloadItem::tryAgain()
-{
- if (!tryAgainButton->isEnabled())
- return;
-
- tryAgainButton->setEnabled(false);
- tryAgainButton->setVisible(false);
- stopButton->setEnabled(true);
- stopButton->setVisible(true);
- progressBar->setVisible(true);
-
- QNetworkReply *r = BrowserApplication::networkAccessManager()->get(QNetworkRequest(m_url));
- if (m_reply)
- m_reply->deleteLater();
- if (m_output.exists())
- m_output.remove();
- m_reply = r;
- init();
emit statusChanged();
}
-void DownloadItem::downloadReadyRead()
-{
- if (m_requestFileName && m_output.fileName().isEmpty())
- return;
- if (!m_output.isOpen()) {
- // in case someone else has already put a file there
- if (!m_requestFileName)
- getFileName();
- if (!m_output.open(QIODevice::WriteOnly)) {
- downloadInfoLabel->setText(tr("Error opening save file: %1")
- .arg(m_output.errorString()));
- stopButton->click();
- emit statusChanged();
- return;
- }
- emit statusChanged();
- }
- if (-1 == m_output.write(m_reply->readAll())) {
- downloadInfoLabel->setText(tr("Error saving: %1")
- .arg(m_output.errorString()));
- stopButton->click();
- }
-}
-
-void DownloadItem::error(QNetworkReply::NetworkError)
-{
- qDebug() << "DownloadItem::error" << m_reply->errorString() << m_url;
- downloadInfoLabel->setText(tr("Network Error: %1").arg(m_reply->errorString()));
- tryAgainButton->setEnabled(true);
- tryAgainButton->setVisible(true);
-}
-
-void DownloadItem::metaDataChanged()
+void DownloadWidget::open()
{
- qDebug() << "DownloadItem::metaDataChanged: not handled.";
+ QUrl url = QUrl::fromLocalFile(m_file.absolutePath());
+ QDesktopServices::openUrl(url);
}
-void DownloadItem::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
+void DownloadWidget::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
{
m_bytesReceived = bytesReceived;
if (bytesTotal == -1) {
@@ -253,13 +167,9 @@ void DownloadItem::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
updateInfoLabel();
}
-void DownloadItem::updateInfoLabel()
+void DownloadWidget::updateInfoLabel()
{
- if (m_reply->error() == QNetworkReply::NoError)
- return;
-
qint64 bytesTotal = progressBar->maximum();
- bool running = !downloadedSuccessfully();
// update info label
double speed = m_bytesReceived * 1000.0 / m_downloadTime.elapsed();
@@ -276,7 +186,7 @@ void DownloadItem::updateInfoLabel()
timeRemaining = 1;
QString info;
- if (running) {
+ if (!downloadedSuccessfully()) {
QString remaining;
if (bytesTotal != 0)
remaining = tr("- %4 %5 remaining")
@@ -288,17 +198,17 @@ void DownloadItem::updateInfoLabel()
.arg(dataString((int)speed))
.arg(remaining);
} else {
- if (m_bytesReceived == bytesTotal)
- info = dataString(m_output.size());
- else
+ if (m_bytesReceived != bytesTotal) {
info = tr("%1 of %2 - Stopped")
.arg(dataString(m_bytesReceived))
.arg(dataString(bytesTotal));
+ } else
+ info = dataString(m_bytesReceived);
}
downloadInfoLabel->setText(info);
}
-QString DownloadItem::dataString(int size) const
+QString DownloadWidget::dataString(int size) const
{
QString unit;
if (size < 1024) {
@@ -313,28 +223,58 @@ QString DownloadItem::dataString(int size) const
return QString(QLatin1String("%1 %2")).arg(size).arg(unit);
}
-bool DownloadItem::downloading() const
+bool DownloadWidget::downloading() const
{
return (progressBar->isVisible());
}
-bool DownloadItem::downloadedSuccessfully() const
-{
- return (stopButton->isHidden() && tryAgainButton->isHidden());
-}
+bool DownloadWidget::downloadedSuccessfully() const
+{
+ bool completed = m_download
+ && m_download->isFinished()
+ && m_download->state() == QWebEngineDownloadItem::DownloadCompleted;
+ return completed || !stopButton->isVisible();
+}
+
+void DownloadWidget::finished()
+{
+ if (m_download) {
+ QWebEngineDownloadItem::DownloadState state = m_download->state();
+ QString message;
+ bool interrupted = false;
+
+ switch (state) {
+ case QWebEngineDownloadItem::DownloadRequested: // Fall-through.
+ case QWebEngineDownloadItem::DownloadInProgress:
+ Q_UNREACHABLE();
+ break;
+ case QWebEngineDownloadItem::DownloadCompleted:
+ break;
+ case QWebEngineDownloadItem::DownloadCancelled:
+ message = QStringLiteral("Download cancelled");
+ interrupted = true;
+ break;
+ case QWebEngineDownloadItem::DownloadInterrupted:
+ message = QStringLiteral("Download interrupted");
+ interrupted = true;
+ break;
+ }
+
+ if (interrupted) {
+ downloadInfoLabel->setText(message);
+ return;
+ }
+ }
-void DownloadItem::finished()
-{
progressBar->hide();
stopButton->setEnabled(false);
stopButton->hide();
- m_output.close();
updateInfoLabel();
emit statusChanged();
}
/*!
- DownloadManager is a Dialog that contains a list of DownloadItems
+ DownloadManager is a Dialog that contains a list of DownloadWidgets
It is a basic download manager. It only downloads the file, doesn't do BitTorrent,
extract zipped files or anything fancy.
@@ -342,7 +282,6 @@ void DownloadItem::finished()
DownloadManager::DownloadManager(QWidget *parent)
: QDialog(parent)
, m_autoSaver(new AutoSaver(this))
- , m_manager(BrowserApplication::networkAccessManager())
, m_iconProvider(0)
, m_removePolicy(Never)
{
@@ -376,67 +315,51 @@ int DownloadManager::activeDownloads() const
return count;
}
-void DownloadManager::download(const QNetworkRequest &request, bool requestFileName)
+void DownloadManager::download(QWebEngineDownloadItem *download)
{
- if (request.url().isEmpty())
- return;
- handleUnsupportedContent(m_manager->get(request), requestFileName);
-}
-
-void DownloadManager::handleUnsupportedContent(QNetworkReply *reply, bool requestFileName)
-{
- if (!reply || reply->url().isEmpty())
- return;
- QVariant header = reply->header(QNetworkRequest::ContentLengthHeader);
- bool ok;
- int size = header.toInt(&ok);
- if (ok && size == 0)
- return;
-
- qDebug() << "DownloadManager::handleUnsupportedContent" << reply->url() << "requestFileName" << requestFileName;
- DownloadItem *item = new DownloadItem(reply, requestFileName, this);
- addItem(item);
+ DownloadWidget *widget = new DownloadWidget(download, this);
+ addItem(widget);
}
-void DownloadManager::addItem(DownloadItem *item)
+void DownloadManager::addItem(DownloadWidget *widget)
{
- connect(item, SIGNAL(statusChanged()), this, SLOT(updateRow()));
+ connect(widget, SIGNAL(statusChanged()), this, SLOT(updateRow()));
int row = m_downloads.count();
m_model->beginInsertRows(QModelIndex(), row, row);
- m_downloads.append(item);
+ m_downloads.append(widget);
m_model->endInsertRows();
updateItemCount();
if (row == 0)
show();
- downloadsView->setIndexWidget(m_model->index(row, 0), item);
+ downloadsView->setIndexWidget(m_model->index(row, 0), widget);
QIcon icon = style()->standardIcon(QStyle::SP_FileIcon);
- item->fileIcon->setPixmap(icon.pixmap(48, 48));
- downloadsView->setRowHeight(row, item->sizeHint().height());
+ widget->fileIcon->setPixmap(icon.pixmap(48, 48));
+ downloadsView->setRowHeight(row, widget->sizeHint().height());
}
void DownloadManager::updateRow()
{
- DownloadItem *item = qobject_cast<DownloadItem*>(sender());
- int row = m_downloads.indexOf(item);
+ DownloadWidget *widget = qobject_cast<DownloadWidget*>(sender());
+ int row = m_downloads.indexOf(widget);
if (-1 == row)
return;
if (!m_iconProvider)
m_iconProvider = new QFileIconProvider();
- QIcon icon = m_iconProvider->icon(item->m_output.fileName());
+ QIcon icon = m_iconProvider->icon(widget->m_file);
if (icon.isNull())
icon = style()->standardIcon(QStyle::SP_FileIcon);
- item->fileIcon->setPixmap(icon.pixmap(48, 48));
- downloadsView->setRowHeight(row, item->minimumSizeHint().height());
+ widget->fileIcon->setPixmap(icon.pixmap(48, 48));
+ downloadsView->setRowHeight(row, widget->minimumSizeHint().height());
bool remove = false;
#if defined(QTWEBENGINE_PRIVATEBROWSING)
QWebEngineSettings *globalSettings = QWebEngineSettings::globalSettings();
- if (!item->downloading()
+ if (!widget->downloading()
&& globalSettings->testAttribute(QWebEngineSettings::PrivateBrowsingEnabled))
remove = true;
#endif
- if (item->downloadedSuccessfully()
+ if (widget->downloadedSuccessfully()
&& removePolicy() == DownloadManager::SuccessFullDownload) {
remove = true;
}
@@ -472,7 +395,7 @@ void DownloadManager::save() const
for (int i = 0; i < m_downloads.count(); ++i) {
QString key = QString(QLatin1String("download_%1_")).arg(i);
settings.setValue(key + QLatin1String("url"), m_downloads[i]->m_url);
- settings.setValue(key + QLatin1String("location"), QFileInfo(m_downloads[i]->m_output).filePath());
+ settings.setValue(key + QLatin1String("location"), m_downloads[i]->m_file.filePath());
settings.setValue(key + QLatin1String("done"), m_downloads[i]->downloadedSuccessfully());
}
int i = m_downloads.count();
@@ -504,17 +427,15 @@ void DownloadManager::load()
QUrl url = settings.value(key + QLatin1String("url")).toUrl();
QString fileName = settings.value(key + QLatin1String("location")).toString();
bool done = settings.value(key + QLatin1String("done"), true).toBool();
- if (!url.isEmpty() && !fileName.isEmpty()) {
- DownloadItem *item = new DownloadItem(0, this);
- item->m_output.setFileName(fileName);
- item->fileNameLabel->setText(QFileInfo(item->m_output.fileName()).fileName());
- item->m_url = url;
- item->stopButton->setVisible(false);
- item->stopButton->setEnabled(false);
- item->tryAgainButton->setVisible(!done);
- item->tryAgainButton->setEnabled(!done);
- item->progressBar->setVisible(!done);
- addItem(item);
+ if (done && !url.isEmpty() && !fileName.isEmpty()) {
+ DownloadWidget *widget = new DownloadWidget(0, this);
+ widget->m_file.setFile(fileName);
+ widget->fileNameLabel->setText(widget->m_file.fileName());
+ widget->m_url = url;
+ widget->stopButton->setVisible(false);
+ widget->stopButton->setEnabled(false);
+ widget->progressBar->hide();
+ addItem(widget);
}
key = QString(QLatin1String("download_%1_")).arg(++i);
}
@@ -568,8 +489,7 @@ bool DownloadModel::removeRows(int row, int count, const QModelIndex &parent)
int lastRow = row + count - 1;
for (int i = lastRow; i >= row; --i) {
- if (m_downloadManager->m_downloads.at(i)->downloadedSuccessfully()
- || m_downloadManager->m_downloads.at(i)->tryAgainButton->isEnabled()) {
+ if (m_downloadManager->m_downloads.at(i)->downloadedSuccessfully()) {
beginRemoveRows(parent, i, i);
m_downloadManager->m_downloads.takeAt(i)->deleteLater();
endRemoveRows();
diff --git a/examples/webenginewidgets/browser/downloadmanager.h b/examples/webenginewidgets/browser/downloadmanager.h
index 072e99efd..877682d77 100644
--- a/examples/webenginewidgets/browser/downloadmanager.h
+++ b/examples/webenginewidgets/browser/downloadmanager.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -45,12 +45,14 @@
#include "ui_downloads.h"
#include "ui_downloaditem.h"
-#include <QtNetwork/QNetworkReply>
-
-#include <QtCore/QFile>
+#include <QtCore/QFileInfo>
#include <QtCore/QTime>
+#include <QtCore/QUrl>
+
+#include <QWebEngineDownloadItem>
-class DownloadItem : public QWidget, public Ui_DownloadItem
+class DownloadManager;
+class DownloadWidget : public QWidget, public Ui_DownloadItem
{
Q_OBJECT
@@ -58,37 +60,32 @@ signals:
void statusChanged();
public:
- DownloadItem(QNetworkReply *reply = 0, bool requestFileName = false, QWidget *parent = 0);
+ DownloadWidget(QWebEngineDownloadItem *download, QWidget *parent = 0);
bool downloading() const;
bool downloadedSuccessfully() const;
- QUrl m_url;
-
- QFile m_output;
- QNetworkReply *m_reply;
+ void init();
+ bool getFileName(bool promptForFileName = false);
private slots:
void stop();
- void tryAgain();
void open();
- void downloadReadyRead();
- void error(QNetworkReply::NetworkError code);
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
- void metaDataChanged();
void finished();
private:
- void getFileName();
- void init();
+ friend class DownloadManager;
void updateInfoLabel();
QString dataString(int size) const;
- QString saveFileName(const QString &directory) const;
-
- bool m_requestFileName;
+ QUrl m_url;
+ QFileInfo m_file;
qint64 m_bytesReceived;
QTime m_downloadTime;
+ bool m_stopped;
+
+ QScopedPointer<QWebEngineDownloadItem> m_download;
};
class AutoSaver;
@@ -118,10 +115,7 @@ public:
void setRemovePolicy(RemovePolicy policy);
public slots:
- void download(const QNetworkRequest &request, bool requestFileName = false);
- inline void download(const QUrl &url, bool requestFileName = false)
- { download(QNetworkRequest(url), requestFileName); }
- void handleUnsupportedContent(QNetworkReply *reply, bool requestFileName = false);
+ void download(QWebEngineDownloadItem *download);
void cleanup();
private slots:
@@ -129,15 +123,14 @@ private slots:
void updateRow();
private:
- void addItem(DownloadItem *item);
+ void addItem(DownloadWidget *item);
void updateItemCount();
void load();
AutoSaver *m_autoSaver;
DownloadModel *m_model;
- QNetworkAccessManager *m_manager;
QFileIconProvider *m_iconProvider;
- QList<DownloadItem*> m_downloads;
+ QList<DownloadWidget*> m_downloads;
RemovePolicy m_removePolicy;
friend class DownloadModel;
};
diff --git a/examples/webenginewidgets/browser/edittableview.cpp b/examples/webenginewidgets/browser/edittableview.cpp
index 71d9b5706..866ee6f1f 100644
--- a/examples/webenginewidgets/browser/edittableview.cpp
+++ b/examples/webenginewidgets/browser/edittableview.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/edittableview.h b/examples/webenginewidgets/browser/edittableview.h
index 1c865ad42..315427eac 100644
--- a/examples/webenginewidgets/browser/edittableview.h
+++ b/examples/webenginewidgets/browser/edittableview.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/edittreeview.cpp b/examples/webenginewidgets/browser/edittreeview.cpp
index 5b8007856..d515ea058 100644
--- a/examples/webenginewidgets/browser/edittreeview.cpp
+++ b/examples/webenginewidgets/browser/edittreeview.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/edittreeview.h b/examples/webenginewidgets/browser/edittreeview.h
index 4159812a6..1cf87d54f 100644
--- a/examples/webenginewidgets/browser/edittreeview.h
+++ b/examples/webenginewidgets/browser/edittreeview.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/featurepermissionbar.cpp b/examples/webenginewidgets/browser/featurepermissionbar.cpp
index 98f19ad1f..b7275dfc2 100644
--- a/examples/webenginewidgets/browser/featurepermissionbar.cpp
+++ b/examples/webenginewidgets/browser/featurepermissionbar.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -53,15 +53,17 @@ static QString textForPermissionType(QWebEnginePage::Feature type)
{
switch (type) {
case QWebEnginePage::Notifications:
- return QObject::tr("desktop notifications");
+ return QObject::tr("use desktop notifications");
case QWebEnginePage::Geolocation:
- return QObject::tr("your position");
+ return QObject::tr("use your position");
case QWebEnginePage::MediaAudioCapture:
- return QObject::tr("your microphone");
+ return QObject::tr("use your microphone");
case QWebEnginePage::MediaVideoCapture:
- return QObject::tr("your camera");
+ return QObject::tr("use your camera");
case QWebEnginePage::MediaAudioVideoCapture:
- return QObject::tr("your camera and microphone");
+ return QObject::tr("use your camera and microphone");
+ case QWebEnginePage::MouseLock:
+ return QObject::tr("lock your mouse");
default:
Q_UNREACHABLE();
}
@@ -80,12 +82,13 @@ FeaturePermissionBar::FeaturePermissionBar(QWidget *view)
l->addStretch();
QPushButton *allowButton = new QPushButton(tr("Allow"), this);
QPushButton *denyButton = new QPushButton(tr("Deny"), this);
+ QPushButton *discardButton = new QPushButton(QIcon(QStringLiteral(":closetab.png")), QString(), this);
connect(allowButton, &QPushButton::clicked, this, &FeaturePermissionBar::permissionGranted);
connect(denyButton, &QPushButton::clicked, this, &FeaturePermissionBar::permissionDenied);
- QPushButton *discardButton = new QPushButton(QIcon(QStringLiteral(":closetab.png")), QString(), this);
- connect(discardButton, &QPushButton::clicked, this, &QObject::deleteLater);
+ connect(discardButton, &QPushButton::clicked, this, &FeaturePermissionBar::permissionUnknown);
connect(allowButton, &QPushButton::clicked, this, &QObject::deleteLater);
connect(denyButton, &QPushButton::clicked, this, &QObject::deleteLater);
+ connect(discardButton, &QPushButton::clicked, this, &QObject::deleteLater);
l->addWidget(denyButton);
l->addWidget(allowButton);
l->addWidget(discardButton);
@@ -96,7 +99,7 @@ void FeaturePermissionBar::requestPermission(const QUrl &securityOrigin, QWebEng
{
m_securityOrigin = securityOrigin;
m_feature = feature;
- m_messageLabel->setText(tr("%1 wants to use %2.").arg(securityOrigin.host()).arg(textForPermissionType(feature)));
+ m_messageLabel->setText(tr("%1 wants to %2.").arg(securityOrigin.host()).arg(textForPermissionType(feature)));
show();
// Ease in
QPropertyAnimation *animation = new QPropertyAnimation(this);
@@ -118,3 +121,8 @@ void FeaturePermissionBar::permissionGranted()
{
emit featurePermissionProvided(m_securityOrigin, m_feature, QWebEnginePage::PermissionGrantedByUser);
}
+
+void FeaturePermissionBar::permissionUnknown()
+{
+ emit featurePermissionProvided(m_securityOrigin, m_feature, QWebEnginePage::PermissionUnknown);
+}
diff --git a/examples/webenginewidgets/browser/featurepermissionbar.h b/examples/webenginewidgets/browser/featurepermissionbar.h
index 92ca04773..1bfe1b483 100644
--- a/examples/webenginewidgets/browser/featurepermissionbar.h
+++ b/examples/webenginewidgets/browser/featurepermissionbar.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtWebEngine module of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -63,6 +63,7 @@ signals:
private slots:
void permissionDenied();
void permissionGranted();
+ void permissionUnknown();
private:
QWebEnginePage::Feature m_feature;
diff --git a/examples/webenginewidgets/browser/history.cpp b/examples/webenginewidgets/browser/history.cpp
index 53afce398..ffae0f55e 100644
--- a/examples/webenginewidgets/browser/history.cpp
+++ b/examples/webenginewidgets/browser/history.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/history.h b/examples/webenginewidgets/browser/history.h
index fecc168da..5a747c942 100644
--- a/examples/webenginewidgets/browser/history.h
+++ b/examples/webenginewidgets/browser/history.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/main.cpp b/examples/webenginewidgets/browser/main.cpp
index 0f8d238d3..86859f741 100644
--- a/examples/webenginewidgets/browser/main.cpp
+++ b/examples/webenginewidgets/browser/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/modelmenu.cpp b/examples/webenginewidgets/browser/modelmenu.cpp
index 56453b080..ec0eaffab 100644
--- a/examples/webenginewidgets/browser/modelmenu.cpp
+++ b/examples/webenginewidgets/browser/modelmenu.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/modelmenu.h b/examples/webenginewidgets/browser/modelmenu.h
index 4045a7758..c0a7d56b8 100644
--- a/examples/webenginewidgets/browser/modelmenu.h
+++ b/examples/webenginewidgets/browser/modelmenu.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/networkaccessmanager.cpp b/examples/webenginewidgets/browser/networkaccessmanager.cpp
index a7127ade6..d2b4f827f 100644
--- a/examples/webenginewidgets/browser/networkaccessmanager.cpp
+++ b/examples/webenginewidgets/browser/networkaccessmanager.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/networkaccessmanager.h b/examples/webenginewidgets/browser/networkaccessmanager.h
index 54c24f86e..f3ee2d338 100644
--- a/examples/webenginewidgets/browser/networkaccessmanager.h
+++ b/examples/webenginewidgets/browser/networkaccessmanager.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/searchlineedit.cpp b/examples/webenginewidgets/browser/searchlineedit.cpp
index 0d387da4b..5152ac1c0 100644
--- a/examples/webenginewidgets/browser/searchlineedit.cpp
+++ b/examples/webenginewidgets/browser/searchlineedit.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/searchlineedit.h b/examples/webenginewidgets/browser/searchlineedit.h
index e01fcbff2..b8b8337fd 100644
--- a/examples/webenginewidgets/browser/searchlineedit.h
+++ b/examples/webenginewidgets/browser/searchlineedit.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/settings.cpp b/examples/webenginewidgets/browser/settings.cpp
index 835e7a9b5..6169f72a3 100644
--- a/examples/webenginewidgets/browser/settings.cpp
+++ b/examples/webenginewidgets/browser/settings.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -58,9 +58,7 @@ SettingsDialog::SettingsDialog(QWidget *parent)
: QDialog(parent)
{
setupUi(this);
- connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
- connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
@@ -89,6 +87,10 @@ void SettingsDialog::loadDefaults()
#endif
enableScrollAnimator->setChecked(defaultSettings->testAttribute(QWebEngineSettings::ScrollAnimatorEnabled));
+
+ persistentDataPath->setText(QWebEngineProfile::defaultProfile()->persistentStoragePath());
+ sessionCookiesCombo->setCurrentIndex(QWebEngineProfile::defaultProfile()->persistentCookiesPolicy());
+ httpUserAgent->setText(QWebEngineProfile::defaultProfile()->httpUserAgent());
}
void SettingsDialog::loadFromSettings()
@@ -137,47 +139,19 @@ void SettingsDialog::loadFromSettings()
enablePlugins->setChecked(settings.value(QLatin1String("enablePlugins"), enablePlugins->isChecked()).toBool());
userStyleSheet->setText(settings.value(QLatin1String("userStyleSheet")).toUrl().toString());
enableScrollAnimator->setChecked(settings.value(QLatin1String("enableScrollAnimator"), enableScrollAnimator->isChecked()).toBool());
+ httpUserAgent->setText(settings.value(QLatin1String("httpUserAgent"), httpUserAgent->text()).toString());
settings.endGroup();
-#if defined(QWEBENGINEPAGE_SETNETWORKACCESSMANAGER)
// Privacy
settings.beginGroup(QLatin1String("cookies"));
- QByteArray value = settings.value(QLatin1String("acceptCookies"), QLatin1String("AcceptOnlyFromSitesNavigatedTo")).toByteArray();
- QMetaEnum acceptPolicyEnum = CookieJar::staticMetaObject.enumerator(CookieJar::staticMetaObject.indexOfEnumerator("AcceptPolicy"));
- CookieJar::AcceptPolicy acceptCookies = acceptPolicyEnum.keyToValue(value) == -1 ?
- CookieJar::AcceptOnlyFromSitesNavigatedTo :
- static_cast<CookieJar::AcceptPolicy>(acceptPolicyEnum.keyToValue(value));
- switch (acceptCookies) {
- case CookieJar::AcceptAlways:
- acceptCombo->setCurrentIndex(0);
- break;
- case CookieJar::AcceptNever:
- acceptCombo->setCurrentIndex(1);
- break;
- case CookieJar::AcceptOnlyFromSitesNavigatedTo:
- acceptCombo->setCurrentIndex(2);
- break;
- }
+ int persistentCookiesPolicy = settings.value(QLatin1String("persistentCookiesPolicy"), sessionCookiesCombo->currentIndex()).toInt();
+ sessionCookiesCombo->setCurrentIndex(persistentCookiesPolicy);
+
+ QString pdataPath = settings.value(QLatin1String("persistentDataPath"), persistentDataPath->text()).toString();
+ persistentDataPath->setText(pdataPath);
- value = settings.value(QLatin1String("keepCookiesUntil"), QLatin1String("Expire")).toByteArray();
- QMetaEnum keepPolicyEnum = CookieJar::staticMetaObject.enumerator(CookieJar::staticMetaObject.indexOfEnumerator("KeepPolicy"));
- CookieJar::KeepPolicy keepCookies = keepPolicyEnum.keyToValue(value) == -1 ?
- CookieJar::KeepUntilExpire :
- static_cast<CookieJar::KeepPolicy>(keepPolicyEnum.keyToValue(value));
- switch (keepCookies) {
- case CookieJar::KeepUntilExpire:
- keepUntilCombo->setCurrentIndex(0);
- break;
- case CookieJar::KeepUntilExit:
- keepUntilCombo->setCurrentIndex(1);
- break;
- case CookieJar::KeepUntilTimeLimit:
- keepUntilCombo->setCurrentIndex(2);
- break;
- }
settings.endGroup();
-#endif
// Proxy
settings.beginGroup(QLatin1String("proxy"));
@@ -227,47 +201,19 @@ void SettingsDialog::saveToSettings()
settings.setValue(QLatin1String("userStyleSheet"), QUrl::fromLocalFile(userStyleSheetString));
else
settings.setValue(QLatin1String("userStyleSheet"), QUrl(userStyleSheetString));
+ settings.setValue(QLatin1String("httpUserAgent"), httpUserAgent->text());
settings.endGroup();
-#if defined(QWEBENGINEPAGE_SETNETWORKACCESSMANAGER)
//Privacy
settings.beginGroup(QLatin1String("cookies"));
- CookieJar::KeepPolicy keepCookies;
- switch (acceptCombo->currentIndex()) {
- default:
- case 0:
- keepCookies = CookieJar::KeepUntilExpire;
- break;
- case 1:
- keepCookies = CookieJar::KeepUntilExit;
- break;
- case 2:
- keepCookies = CookieJar::KeepUntilTimeLimit;
- break;
- }
- QMetaEnum acceptPolicyEnum = CookieJar::staticMetaObject.enumerator(CookieJar::staticMetaObject.indexOfEnumerator("AcceptPolicy"));
- settings.setValue(QLatin1String("acceptCookies"), QLatin1String(acceptPolicyEnum.valueToKey(keepCookies)));
-
- CookieJar::KeepPolicy keepPolicy;
- switch (keepUntilCombo->currentIndex()) {
- default:
- case 0:
- keepPolicy = CookieJar::KeepUntilExpire;
- break;
- case 1:
- keepPolicy = CookieJar::KeepUntilExit;
- break;
- case 2:
- keepPolicy = CookieJar::KeepUntilTimeLimit;
- break;
- }
+ int persistentCookiesPolicy = sessionCookiesCombo->currentIndex();
+ settings.setValue(QLatin1String("persistentCookiesPolicy"), persistentCookiesPolicy);
- QMetaEnum keepPolicyEnum = CookieJar::staticMetaObject.enumerator(CookieJar::staticMetaObject.indexOfEnumerator("KeepPolicy"));
- settings.setValue(QLatin1String("keepCookiesUntil"), QLatin1String(keepPolicyEnum.valueToKey(keepPolicy)));
+ QString pdataPath = persistentDataPath->text();
+ settings.setValue(QLatin1String("persistentDataPath"), pdataPath);
settings.endGroup();
-#endif
// proxy
settings.beginGroup(QLatin1String("proxy"));
diff --git a/examples/webenginewidgets/browser/settings.h b/examples/webenginewidgets/browser/settings.h
index 0858e0023..6def66928 100644
--- a/examples/webenginewidgets/browser/settings.h
+++ b/examples/webenginewidgets/browser/settings.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/settings.ui b/examples/webenginewidgets/browser/settings.ui
index 08374ca7a..7cafdae4b 100644
--- a/examples/webenginewidgets/browser/settings.ui
+++ b/examples/webenginewidgets/browser/settings.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>Settings</class>
- <widget class="QDialog" name="Settings" >
- <property name="geometry" >
+ <widget class="QDialog" name="Settings">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,64 +10,56 @@
<height>322</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Settings</string>
</property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="2" column="0" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="2" column="0">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="standardButtons" >
+ <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QTabWidget" name="tabWidget" >
- <property name="currentIndex" >
- <number>0</number>
+ <item row="1" column="0">
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>4</number>
</property>
- <widget class="QWidget" name="tab" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>627</width>
- <height>243</height>
- </rect>
- </property>
- <attribute name="title" >
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
<string>General</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_4" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
<string>Home:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2" >
- <widget class="QLineEdit" name="homeLineEdit" />
+ <item row="0" column="1" colspan="2">
+ <widget class="QLineEdit" name="homeLineEdit"/>
</item>
- <item row="1" column="1" >
- <widget class="QPushButton" name="setHomeToCurrentPageButton" >
- <property name="text" >
+ <item row="1" column="1">
+ <widget class="QPushButton" name="setHomeToCurrentPageButton">
+ <property name="text">
<string>Set to current page</string>
</property>
</widget>
</item>
- <item row="1" column="2" >
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <item row="1" column="2">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>280</width>
<height>18</height>
@@ -74,103 +67,103 @@
</property>
</spacer>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
<string>Remove history items:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="2" column="1" colspan="2" >
- <widget class="QComboBox" name="expireHistory" >
+ <item row="2" column="1" colspan="2">
+ <widget class="QComboBox" name="expireHistory">
<item>
- <property name="text" >
+ <property name="text">
<string>After one day</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>After one week</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>After two weeks</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>After one month</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>After one year</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Manually</string>
</property>
</item>
</widget>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="label_7" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
<string>Save downloads to:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="3" column="1" colspan="2" >
- <widget class="QLineEdit" name="downloadsLocation" />
+ <item row="3" column="1" colspan="2">
+ <widget class="QLineEdit" name="downloadsLocation"/>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="label_8" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
<string>Open links from applications:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="4" column="1" colspan="2" >
- <widget class="QComboBox" name="openLinksIn" >
+ <item row="4" column="1" colspan="2">
+ <widget class="QComboBox" name="openLinksIn">
<item>
- <property name="text" >
+ <property name="text">
<string>In a tab in the current window</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>In a new window</string>
</property>
</item>
</widget>
</item>
<item row="5" column="1" colspan="2">
- <widget class="QCheckBox" name="enableScrollAnimator" >
- <property name="text" >
- <string>Enable Scroll Animator</string>
+ <widget class="QCheckBox" name="enableScrollAnimator">
+ <property name="text">
+ <string>Enable Scroll Animator</string>
</property>
- <property name="checked" >
- <bool>true</bool>
+ <property name="checked">
+ <bool>true</bool>
</property>
</widget>
</item>
- <item row="6" column="1" colspan="2" >
+ <item row="6" column="1" colspan="2">
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>391</width>
<height>262</height>
@@ -180,91 +173,83 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_3" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>627</width>
- <height>243</height>
- </rect>
- </property>
- <attribute name="title" >
+ <widget class="QWidget" name="tab_3">
+ <attribute name="title">
<string>Appearance</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_3" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
<string>Standard font:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLabel" name="standardLabel" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <item row="0" column="1">
+ <widget class="QLabel" name="standardLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="frameShape" >
+ <property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
- <property name="text" >
+ <property name="text">
<string>Times 16</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="0" column="2" >
- <widget class="QPushButton" name="standardFontButton" >
- <property name="text" >
+ <item row="0" column="2">
+ <widget class="QPushButton" name="standardFontButton">
+ <property name="text">
<string>Select...</string>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_6" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
<string>Fixed-width font:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLabel" name="fixedLabel" >
- <property name="frameShape" >
+ <item row="1" column="1">
+ <widget class="QLabel" name="fixedLabel">
+ <property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
- <property name="text" >
+ <property name="text">
<string>Courier 13</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="1" column="2" >
- <widget class="QPushButton" name="fixedFontButton" >
- <property name="text" >
+ <item row="1" column="2">
+ <widget class="QPushButton" name="fixedFontButton">
+ <property name="text">
<string>Select...</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <spacer name="verticalSpacer" >
- <property name="orientation" >
+ <item row="2" column="1">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>93</height>
@@ -274,41 +259,33 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_2" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>627</width>
- <height>243</height>
- </rect>
- </property>
- <attribute name="title" >
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
<string>Privacy</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
<string>Web Content</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QCheckBox" name="enablePlugins" >
- <property name="text" >
+ <widget class="QCheckBox" name="enablePlugins">
+ <property name="text">
<string>Enable Plugins</string>
</property>
- <property name="checked" >
+ <property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="enableJavascript" >
- <property name="text" >
+ <widget class="QCheckBox" name="enableJavascript">
+ <property name="text">
<string>Enable Javascript</string>
</property>
- <property name="checked" >
+ <property name="checked">
<bool>true</bool>
</property>
</widget>
@@ -317,186 +294,151 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="cookiesGroupBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="cookiesGroupBox">
+ <property name="title">
<string>Cookies</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Accept Cookies:</string>
+ <layout class="QGridLayout">
+ <property name="leftMargin">
+ <number>9</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Persistent Cookie Policy</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QComboBox" name="acceptCombo" >
+ <item row="0" column="1">
+ <widget class="QComboBox" name="sessionCookiesCombo">
<item>
- <property name="text" >
- <string>Always</string>
+ <property name="text">
+ <string>Treat all cookies as session cookies</string>
</property>
</item>
<item>
- <property name="text" >
- <string>Never</string>
+ <property name="text">
+ <string>Allow persistent cookies</string>
</property>
</item>
<item>
- <property name="text" >
- <string>Only from sites you navigate to</string>
+ <property name="text">
+ <string>Treat all cookies as persistent cookies</string>
</property>
</item>
</widget>
</item>
- <item row="0" column="2" >
- <widget class="QPushButton" name="exceptionsButton" >
- <property name="text" >
- <string>Exceptions...</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Keep until:</string>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Persistent Data Path:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QComboBox" name="keepUntilCombo" >
- <item>
- <property name="text" >
- <string>They expire</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>I exit the application</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>At most 90 days</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="1" column="2" >
- <widget class="QPushButton" name="cookiesButton" >
- <property name="text" >
- <string>Cookies...</string>
- </property>
- </widget>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="persistentDataPath"/>
</item>
</layout>
</widget>
</item>
<item>
- <spacer>
- <property name="orientation" >
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
- <width>371</width>
- <height>177</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_4" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>627</width>
- <height>243</height>
- </rect>
- </property>
- <attribute name="title" >
+ <widget class="QWidget" name="tab_4">
+ <attribute name="title">
<string>Proxy</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QGroupBox" name="proxySupport" >
- <property name="title" >
+ <widget class="QGroupBox" name="proxySupport">
+ <property name="title">
<string>Enable proxy</string>
</property>
- <property name="checkable" >
+ <property name="checkable">
<bool>true</bool>
</property>
- <layout class="QGridLayout" name="gridLayout_6" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label_9" >
- <property name="text" >
+ <layout class="QGridLayout" name="gridLayout_6">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="text">
<string>Type:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2" >
- <widget class="QComboBox" name="proxyType" >
+ <item row="0" column="1" colspan="2">
+ <widget class="QComboBox" name="proxyType">
<item>
- <property name="text" >
+ <property name="text">
<string>Socks5</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Http</string>
</property>
</item>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_10" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="text">
<string>Host:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1" colspan="2" >
- <widget class="QLineEdit" name="proxyHostName" />
+ <item row="1" column="1" colspan="2">
+ <widget class="QLineEdit" name="proxyHostName"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_11" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
<string>Port:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QSpinBox" name="proxyPort" >
- <property name="maximum" >
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="proxyPort">
+ <property name="maximum">
<number>10000</number>
</property>
- <property name="value" >
+ <property name="value">
<number>1080</number>
</property>
</widget>
</item>
- <item row="2" column="2" >
- <spacer name="horizontalSpacer_2" >
- <property name="orientation" >
+ <item row="2" column="2">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>293</width>
<height>20</height>
@@ -504,42 +446,42 @@
</property>
</spacer>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="label_12" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
<string>User Name:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="3" column="1" colspan="2" >
- <widget class="QLineEdit" name="proxyUserName" />
+ <item row="3" column="1" colspan="2">
+ <widget class="QLineEdit" name="proxyUserName"/>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="label_13" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_13">
+ <property name="text">
<string>Password:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="4" column="1" colspan="2" >
- <widget class="QLineEdit" name="proxyPassword" >
- <property name="echoMode" >
+ <item row="4" column="1" colspan="2">
+ <widget class="QLineEdit" name="proxyPassword">
+ <property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
- <item row="5" column="0" >
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
+ <item row="5" column="0">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
@@ -552,27 +494,27 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_5" >
- <attribute name="title" >
+ <widget class="QWidget" name="tab_5">
+ <attribute name="title">
<string>Advanced</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_2" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label_14" >
- <property name="text" >
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="text">
<string>Style Sheet:</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="userStyleSheet" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="userStyleSheet"/>
</item>
- <item row="1" column="1" >
- <spacer name="verticalSpacer_3" >
- <property name="orientation" >
+ <item row="2" column="1">
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>176</height>
@@ -580,6 +522,16 @@
</property>
</spacer>
</item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="httpUserAgent"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>HTTP User-Agent:</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>
@@ -594,11 +546,11 @@
<receiver>Settings</receiver>
<slot>accept()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
@@ -610,11 +562,11 @@
<receiver>Settings</receiver>
<slot>reject()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
diff --git a/examples/webenginewidgets/browser/squeezelabel.cpp b/examples/webenginewidgets/browser/squeezelabel.cpp
index c40fe97da..78198c3f0 100644
--- a/examples/webenginewidgets/browser/squeezelabel.cpp
+++ b/examples/webenginewidgets/browser/squeezelabel.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/squeezelabel.h b/examples/webenginewidgets/browser/squeezelabel.h
index 6df84179a..628b7350a 100644
--- a/examples/webenginewidgets/browser/squeezelabel.h
+++ b/examples/webenginewidgets/browser/squeezelabel.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/tabwidget.cpp b/examples/webenginewidgets/browser/tabwidget.cpp
index 74fb05b46..06ff59ac3 100644
--- a/examples/webenginewidgets/browser/tabwidget.cpp
+++ b/examples/webenginewidgets/browser/tabwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -43,12 +43,15 @@
#include "browserapplication.h"
#include "browsermainwindow.h"
+#include "downloadmanager.h"
#include "history.h"
#include "urllineedit.h"
#include "webview.h"
#include <QtCore/QMimeData>
#include <QtGui/QClipboard>
+#include <QtWebEngineWidgets/QWebEngineDownloadItem>
+#include <QtWebEngineWidgets/QWebEngineProfile>
#include <QtWidgets/QCompleter>
#include <QtWidgets/QListView>
#include <QtWidgets/QMenu>
@@ -314,6 +317,8 @@ void TabWidget::currentChanged(int index)
this, SIGNAL(linkHovered(const QString&)));
disconnect(oldWebView, SIGNAL(loadProgress(int)),
this, SIGNAL(loadProgress(int)));
+ disconnect(oldWebView->page()->profile(), SIGNAL(downloadRequested(QWebEngineDownloadItem*)),
+ this, SLOT(downloadRequested(QWebEngineDownloadItem*)));
}
#if defined(QWEBENGINEVIEW_STATUSBARMESSAGE)
@@ -324,6 +329,8 @@ void TabWidget::currentChanged(int index)
this, SIGNAL(linkHovered(const QString&)));
connect(webView, SIGNAL(loadProgress(int)),
this, SIGNAL(loadProgress(int)));
+ connect(webView->page()->profile(), SIGNAL(downloadRequested(QWebEngineDownloadItem*)),
+ this, SLOT(downloadRequested(QWebEngineDownloadItem*)));
for (int i = 0; i < m_actions.count(); ++i) {
WebActionMapper *mapper = m_actions[i];
@@ -772,6 +779,12 @@ bool TabWidget::restoreState(const QByteArray &state)
return true;
}
+void TabWidget::downloadRequested(QWebEngineDownloadItem *download)
+{
+ BrowserApplication::downloadManager()->download(download);
+ download->accept();
+}
+
WebActionMapper::WebActionMapper(QAction *root, QWebEnginePage::WebAction webAction, QObject *parent)
: QObject(parent)
, m_currentParent(0)
diff --git a/examples/webenginewidgets/browser/tabwidget.h b/examples/webenginewidgets/browser/tabwidget.h
index 497a2c572..74e98f46c 100644
--- a/examples/webenginewidgets/browser/tabwidget.h
+++ b/examples/webenginewidgets/browser/tabwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -45,6 +45,11 @@
#include <QtWidgets/QTabBar>
#include <QtWidgets/QShortcut>
+
+QT_BEGIN_NAMESPACE
+class QWebEngineDownloadItem;
+QT_END_NAMESPACE
+
/*
Tab bar with a few more features such as a context menu and shortcuts
*/
@@ -197,6 +202,7 @@ private slots:
void currentChanged(int index);
void aboutToShowRecentTabsMenu();
void aboutToShowRecentTriggeredAction(QAction *action);
+ void downloadRequested(QWebEngineDownloadItem *download);
void webViewLoadStarted();
void webViewIconChanged();
void webViewTitleChanged(const QString &title);
diff --git a/examples/webenginewidgets/browser/toolbarsearch.cpp b/examples/webenginewidgets/browser/toolbarsearch.cpp
index eb699e60c..fa6e4f239 100644
--- a/examples/webenginewidgets/browser/toolbarsearch.cpp
+++ b/examples/webenginewidgets/browser/toolbarsearch.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/toolbarsearch.h b/examples/webenginewidgets/browser/toolbarsearch.h
index 1189785db..cbe00366c 100644
--- a/examples/webenginewidgets/browser/toolbarsearch.h
+++ b/examples/webenginewidgets/browser/toolbarsearch.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/urllineedit.cpp b/examples/webenginewidgets/browser/urllineedit.cpp
index 730d3f771..685277d9c 100644
--- a/examples/webenginewidgets/browser/urllineedit.cpp
+++ b/examples/webenginewidgets/browser/urllineedit.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/urllineedit.h b/examples/webenginewidgets/browser/urllineedit.h
index c30f40b57..775aa7d18 100644
--- a/examples/webenginewidgets/browser/urllineedit.h
+++ b/examples/webenginewidgets/browser/urllineedit.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/webview.cpp b/examples/webenginewidgets/browser/webview.cpp
index 5ea273e3a..6f503a3a2 100644
--- a/examples/webenginewidgets/browser/webview.cpp
+++ b/examples/webenginewidgets/browser/webview.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -52,6 +52,7 @@
#include <QtGui/QClipboard>
#include <QtNetwork/QAuthenticator>
+#include <QtNetwork/QNetworkReply>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMessageBox>
#include <QtGui/QMouseEvent>
@@ -97,37 +98,15 @@ BrowserMainWindow *WebPage::mainWindow()
return BrowserApplication::instance()->mainWindow();
}
-#if defined(QWEBENGINEPAGE_ACCEPTNAVIGATIONREQUEST)
-bool WebPage::acceptNavigationRequest(QWebEngineFrame *frame, const QNetworkRequest &request, NavigationType type)
+bool WebPage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame)
{
- // ctrl open in new tab
- // ctrl-shift open in new tab and select
- // ctrl-alt open in new window
- if (type == QWebEnginePage::NavigationTypeLinkClicked
- && (m_keyboardModifiers & Qt::ControlModifier
- || m_pressedButtons == Qt::MidButton)) {
- bool newWindow = (m_keyboardModifiers & Qt::AltModifier);
- WebView *webView;
- if (newWindow) {
- BrowserApplication::instance()->newMainWindow();
- BrowserMainWindow *newMainWindow = BrowserApplication::instance()->mainWindow();
- webView = newMainWindow->currentTab();
- newMainWindow->raise();
- newMainWindow->activateWindow();
- webView->setFocus();
- } else {
- bool selectNewTab = (m_keyboardModifiers & Qt::ShiftModifier);
- webView = mainWindow()->tabWidget()->newTab(selectNewTab);
- }
- webView->load(request);
- m_keyboardModifiers = Qt::NoModifier;
- m_pressedButtons = Qt::NoButton;
- return false;
+ Q_UNUSED(type);
+ if (isMainFrame) {
+ m_loadingUrl = url;
+ emit loadingUrl(m_loadingUrl);
}
- m_loadingUrl = request.url();
- emit loadingUrl(m_loadingUrl);
+ return true;
}
-#endif
bool WebPage::certificateError(const QWebEngineCertificateError &error)
{
@@ -343,10 +322,6 @@ WebView::WebView(QWidget* parent)
this, SIGNAL(urlChanged(QUrl)));
connect(page(), SIGNAL(iconUrlChanged(QUrl)),
this, SLOT(onIconUrlChanged(QUrl)));
-#if defined(QWEBENGINEPAGE_DOWNLOADREQUESTED)
- connect(page(), SIGNAL(downloadRequested(QNetworkRequest)),
- this, SLOT(downloadRequested(QNetworkRequest)));
-#endif
connect(page(), &WebPage::featurePermissionRequested, this, &WebView::onFeaturePermissionRequested);
#if defined(QWEBENGINEPAGE_UNSUPPORTEDCONTENT)
page()->setForwardUnsupportedContent(true);
@@ -494,8 +469,3 @@ void WebView::setStatusBarText(const QString &string)
{
m_statusBarText = string;
}
-
-void WebView::downloadRequested(const QNetworkRequest &request)
-{
- BrowserApplication::downloadManager()->download(request);
-}
diff --git a/examples/webenginewidgets/browser/webview.h b/examples/webenginewidgets/browser/webview.h
index 2cedeb79b..e694d50ac 100644
--- a/examples/webenginewidgets/browser/webview.h
+++ b/examples/webenginewidgets/browser/webview.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
@@ -65,9 +65,7 @@ public:
BrowserMainWindow *mainWindow();
protected:
-#if defined(QWEBENGINEPAGE_ACCEPTNAVIGATIONREQUEST)
- bool acceptNavigationRequest(QWebEngineFrame *frame, const QNetworkRequest &request, NavigationType type);
-#endif
+ bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame);
QWebEnginePage *createWindow(QWebEnginePage::WebWindowType type);
#if !defined(QT_NO_UITOOLS)
QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
@@ -118,7 +116,6 @@ private slots:
void setProgress(int progress);
void loadFinished(bool success);
void setStatusBarText(const QString &string);
- void downloadRequested(const QNetworkRequest &request);
void openLinkInNewTab();
void onFeaturePermissionRequested(const QUrl &securityOrigin, QWebEnginePage::Feature);
void onIconUrlChanged(const QUrl &url);
diff --git a/examples/webenginewidgets/browser/xbel.cpp b/examples/webenginewidgets/browser/xbel.cpp
index ae84a6a37..6b4f53d2e 100644
--- a/examples/webenginewidgets/browser/xbel.cpp
+++ b/examples/webenginewidgets/browser/xbel.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/browser/xbel.h b/examples/webenginewidgets/browser/xbel.h
index 8ee9558ef..d95549dd8 100644
--- a/examples/webenginewidgets/browser/xbel.h
+++ b/examples/webenginewidgets/browser/xbel.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -10,27 +10,27 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
+** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
diff --git a/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc b/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
index f4b5321a1..e6c6ada34 100644
--- a/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
+++ b/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/examples/webenginewidgets/fancybrowser/fancybrowser.pro b/examples/webenginewidgets/fancybrowser/fancybrowser.pro
index 5f2db6ee3..e5dcd9678 100644
--- a/examples/webenginewidgets/fancybrowser/fancybrowser.pro
+++ b/examples/webenginewidgets/fancybrowser/fancybrowser.pro
@@ -1,7 +1,5 @@
QT += webenginewidgets
-macx: CONFIG -= app_bundle
-
HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
diff --git a/examples/webenginewidgets/fancybrowser/main.cpp b/examples/webenginewidgets/fancybrowser/main.cpp
index e463151e9..a21d881f4 100644
--- a/examples/webenginewidgets/fancybrowser/main.cpp
+++ b/examples/webenginewidgets/fancybrowser/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/webenginewidgets/fancybrowser/mainwindow.cpp b/examples/webenginewidgets/fancybrowser/mainwindow.cpp
index a311c2651..3dca497a3 100644
--- a/examples/webenginewidgets/fancybrowser/mainwindow.cpp
+++ b/examples/webenginewidgets/fancybrowser/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/webenginewidgets/fancybrowser/mainwindow.h b/examples/webenginewidgets/fancybrowser/mainwindow.h
index 5f33bdf96..8e9b12538 100644
--- a/examples/webenginewidgets/fancybrowser/mainwindow.h
+++ b/examples/webenginewidgets/fancybrowser/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**