From 0cf3235924e7ea95c5804c807a9ef0e91678c49d Mon Sep 17 00:00:00 2001 From: Andras Becsi Date: Mon, 2 Feb 2015 17:11:51 +0100 Subject: 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 --- examples/webenginewidgets/browser/browsermainwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'examples/webenginewidgets/browser/browsermainwindow.cpp') 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 windows = BrowserApplication::instance()->mainWindows(); for (int i = 0; i < windows.count(); ++i) { -- cgit v1.2.1