From ee2a55bcbf9cdda7422d06a0a3f78ee87294b238 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 19 Jul 2018 11:03:11 +0200 Subject: [PATCH] Remove unused reader parameter in TabWidget::openUrl. --- src/kiwixapp.cpp | 4 +--- src/tabwidget.cpp | 2 +- src/tabwidget.h | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index 42b4a83..3f5d33a 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -72,9 +72,7 @@ void KiwixApp::openZimFile(const QString &zimfile) } void KiwixApp::openUrl(const QUrl &url, bool newTab) { - auto reader = library.getReader(url.host()); - Q_ASSERT(reader); - tabWidget->openUrl(reader, url, newTab); + tabWidget->openUrl(url, newTab); } void KiwixApp::showMessage(const QString &message) diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index 9c6719f..1b314ad 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -21,7 +21,7 @@ WebView* TabWidget::createNewTab(bool setCurrent) return webView; } -void TabWidget::openUrl(std::shared_ptr reader, const QUrl& url, bool newTab) +void TabWidget::openUrl(const QUrl& url, bool newTab) { WebView* webView = nullptr; if (newTab || !currentWidget()) { diff --git a/src/tabwidget.h b/src/tabwidget.h index 856a934..08f48ef 100644 --- a/src/tabwidget.h +++ b/src/tabwidget.h @@ -3,7 +3,6 @@ #include #include -#include #include "webview.h" class TabWidget : public QTabWidget @@ -12,7 +11,7 @@ public: TabWidget(QWidget* parent=nullptr); WebView* createNewTab(bool setCurrent); - void openUrl(std::shared_ptr reader, const QUrl &url, bool newTab); + void openUrl(const QUrl &url, bool newTab); void setTitleOf(WebView* webView, const QString& title); void setIconOf(WebView* webView, const QIcon& icon); };