From bdc239d1f827308c0fc1e4c202ed0e3f5c71da0b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 27 Dec 2017 17:06:33 +0100 Subject: Download manager fixes DownloadsWidget - Download widget now in landscape - Download widget no longer docks in the main window, but is a dialog DownloadItemWidget - Download item widget looks more compact - Download details are now a part of the item widgets instead - Download details: save path --- src/widgets/mainwindowmenubar.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/widgets/mainwindowmenubar.cpp') diff --git a/src/widgets/mainwindowmenubar.cpp b/src/widgets/mainwindowmenubar.cpp index b5ce229..f8e8ecd 100644 --- a/src/widgets/mainwindowmenubar.cpp +++ b/src/widgets/mainwindowmenubar.cpp @@ -15,6 +15,7 @@ #include #include "browser.h" +#include "downloads/downloadswidget.h" MainWindowMenuBar::MainWindowMenuBar(std::shared_ptr config, MainWindow *parent) : QMenuBar(parent) @@ -56,6 +57,9 @@ MainWindowMenuBar::MainWindowMenuBar(std::shared_ptr config, Main m_downloadsAction = toolsMenu->addAction(tr("Downloads")); m_downloadsAction->setParent(parent); m_downloadsAction->setShortcut(QKeySequence(config->value("downloads.shortcut").value().c_str())); + connect(m_downloadsAction, &QAction::triggered, [parent]() { + parent->m_downloadsWidget->show(); + }); m_bookmarksAction = toolsMenu->addAction(tr("Bookmarks")); m_bookmarksAction->setParent(parent); @@ -82,12 +86,6 @@ QAction *MainWindowMenuBar::bookmarksAction() return m_bookmarksAction; } -QAction *MainWindowMenuBar::downloadsAction() -{ - Q_CHECK_PTR(m_downloadsAction); - return m_downloadsAction; -} - void MainWindowMenuBar::setProfileName(const QString &name) { Q_CHECK_PTR(m_profileAction); -- cgit v1.2.1