summaryrefslogtreecommitdiff
path: root/examples/webenginewidgets/browser/browsermainwindow.cpp
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@theqtcompany.com>2015-02-02 17:11:51 +0100
committerAndras Becsi <andras.becsi@theqtcompany.com>2015-02-05 16:13:05 +0000
commit0cf3235924e7ea95c5804c807a9ef0e91678c49d (patch)
treee43d0e34366ce6605109af7ab967e3abe6def940 /examples/webenginewidgets/browser/browsermainwindow.cpp
parent4ef5831a398280cc26cbf359dcbb9878e77ab7fb (diff)
downloadqtwebengine-0cf3235924e7ea95c5804c807a9ef0e91678c49d.tar.gz
Revive the widget Browser's DownloadManager
This reenables the widget example Browser's download code by porting it from the QNAM-based QtWebKit API to the new download API of QtWebEngine. Change-Id: I0630c76902fb30c355c774664f0a2005fe29023c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'examples/webenginewidgets/browser/browsermainwindow.cpp')
-rw-r--r--examples/webenginewidgets/browser/browsermainwindow.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/webenginewidgets/browser/browsermainwindow.cpp b/examples/webenginewidgets/browser/browsermainwindow.cpp
index cce603cff..d09411abd 100644
--- a/examples/webenginewidgets/browser/browsermainwindow.cpp
+++ b/examples/webenginewidgets/browser/browsermainwindow.cpp
@@ -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) {