mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
Remove unused reader parameter in TabWidget::openUrl.
This commit is contained in:
parent
3e46893e2d
commit
ee2a55bcbf
@ -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)
|
||||
|
@ -21,7 +21,7 @@ WebView* TabWidget::createNewTab(bool setCurrent)
|
||||
return webView;
|
||||
}
|
||||
|
||||
void TabWidget::openUrl(std::shared_ptr<kiwix::Reader> reader, const QUrl& url, bool newTab)
|
||||
void TabWidget::openUrl(const QUrl& url, bool newTab)
|
||||
{
|
||||
WebView* webView = nullptr;
|
||||
if (newTab || !currentWidget()) {
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include <QTableWidget>
|
||||
#include <memory>
|
||||
#include <kiwix/reader.h>
|
||||
#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<kiwix::Reader> 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);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user