From c27c4258eae10cc2ee8f6c513b70a512a7c65449 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 20 Jun 2016 10:17:31 +0200 Subject: [PATCH] Qt version now really needed as 5.7, working on internal web viewer. --- rssguard.pro | 2 +- src/gui/dialogs/formmain.ui | 3 --- src/gui/feedmessageviewer.cpp | 4 +++- src/gui/tabbar.cpp | 7 ++----- src/gui/tabwidget.cpp | 1 + src/gui/webbrowser.cpp | 3 +-- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/rssguard.pro b/rssguard.pro index 8bad137fc..bdffc17de 100755 --- a/rssguard.pro +++ b/rssguard.pro @@ -60,7 +60,7 @@ DEFINES *= QT_USE_QSTRINGBUILDER message(rssguard: Welcome RSS Guard qmake script.) -lessThan(QT_MAJOR_VERSION, 5)|lessThan(QT_MINOR_VERSION, 5) { +lessThan(QT_MAJOR_VERSION, 5)|lessThan(QT_MINOR_VERSION, 7) { error(rssguard: At least Qt 5.7.0 is required.) } diff --git a/src/gui/dialogs/formmain.ui b/src/gui/dialogs/formmain.ui index 664f9f89e..f3b00c133 100755 --- a/src/gui/dialogs/formmain.ui +++ b/src/gui/dialogs/formmain.ui @@ -32,9 +32,6 @@ -1 - - false - true diff --git a/src/gui/feedmessageviewer.cpp b/src/gui/feedmessageviewer.cpp index 93866c51d..7a1fb15c0 100755 --- a/src/gui/feedmessageviewer.cpp +++ b/src/gui/feedmessageviewer.cpp @@ -258,7 +258,7 @@ void FeedMessageViewer::createConnections() { // Message openers. connect(m_messagesView, SIGNAL(openMessagesInNewspaperView(RootItem*,QList)), - qApp->mainForm()->tabWidget(), SLOT(addNewspaperView(RootItem*,QList)); + qApp->mainForm()->tabWidget(), SLOT(addNewspaperView(RootItem*,QList))); connect(m_feedsView, SIGNAL(openMessagesInNewspaperView(RootItem*,QList)), qApp->mainForm()->tabWidget(), SLOT(addNewspaperView(RootItem*,QList))); @@ -347,6 +347,8 @@ void FeedMessageViewer::initialize() { m_toolBarMessages->setAllowedAreas(Qt::TopToolBarArea); m_toolBarMessages->loadChangeableActions(); + m_messagesBrowser->clear(); + // Now refresh visual setup. refreshVisualProperties(); } diff --git a/src/gui/tabbar.cpp b/src/gui/tabbar.cpp index c55be72b5..136ab80c9 100755 --- a/src/gui/tabbar.cpp +++ b/src/gui/tabbar.cpp @@ -131,16 +131,13 @@ void TabBar::mouseDoubleClickEvent(QMouseEvent *event) { // NOTE: This needs to be done here because // destination does not know the original event. if (event->button() & Qt::LeftButton && qApp->settings()->value(GROUP(GUI), SETTING(GUI::TabCloseDoubleClick)).toBool()) { - if (tabType(tab_index) == TabBar::Closable) { + if ((tabType(tab_index) & (TabBar::Closable | TabBar::DownloadManager)) > 0) { // This tab is closable, so we can close it. emit tabCloseRequested(tab_index); } } } - // Check if new tab should be opened with initial web browser. - // NOTE: This check could be unnecesary here and should be done in - // destination object but we keep it here for consistency. - else if (qApp->settings()->value(GROUP(GUI), SETTING(GUI::TabNewDoubleClick)).toBool()) { + else { emit emptySpaceDoubleClicked(); } } diff --git a/src/gui/tabwidget.cpp b/src/gui/tabwidget.cpp index 1101d06b0..b7362ef4e 100755 --- a/src/gui/tabwidget.cpp +++ b/src/gui/tabwidget.cpp @@ -129,6 +129,7 @@ void TabWidget::tabRemoved(int index) { void TabWidget::createConnections() { connect(tabBar(), SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int))); + connect(tabBar(), SIGNAL(emptySpaceDoubleClicked()), this, SLOT(addEmptyBrowser())); connect(tabBar(), SIGNAL(tabMoved(int,int)), this, SLOT(fixContentsAfterMove(int,int))); } diff --git a/src/gui/webbrowser.cpp b/src/gui/webbrowser.cpp index 2a4ace892..3d9a322e8 100755 --- a/src/gui/webbrowser.cpp +++ b/src/gui/webbrowser.cpp @@ -88,7 +88,6 @@ WebBrowser::WebBrowser(QWidget *parent) : TabContent(parent), createConnections(); reloadFontSettings(); - clear(); } WebBrowser::~WebBrowser() { @@ -175,7 +174,7 @@ void WebBrowser::onTitleChanged(const QString &new_title) { } void WebBrowser::onIconChanged(const QIcon &icon) { - emit iconChanged(m_index, m_webView->icon()); + emit iconChanged(m_index, icon); } void WebBrowser::initializeLayout() {