summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 944d6ea1..295d2708 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -20,10 +20,6 @@
#include <QStandardPaths>
#include <spdlog/spdlog.h>
-#ifdef QT_DEBUG
-#include "test/rview_fake.h"
-#endif
-
// ---------------------------------------------------------------------------------------------------------------
// Ctor and Dtor
@@ -388,20 +384,19 @@ RekonqWindow *Application::newWindow()
RekonqView *Application::newView(const QUrl &url, RekonqWindow *window)
{
RekonqView *view = nullptr;
+ const auto _url = url.isEmpty() ? m_settings->value("homepage").toUrl() : url;
-#ifdef QT_DEBUG
- if (url.isEmpty()) view = new RekonqView_fake(window);
-#endif
-
- if (view == nullptr)
- for (const auto &plugin : m_plugins) {
- if (plugin->hasScheme(url.scheme())) {
- view = plugin->interface()->view(url.isEmpty() ? m_settings->value("homepage").toUrl() : url);
- break;
- }
+ for (const auto &plugin : m_plugins) {
+ if (plugin->hasScheme(_url.scheme())) {
+ view = plugin->interface()->view(_url);
+ break;
}
+ }
- if (view == nullptr) return view;
+ if (view == nullptr) {
+ spdlog::error("Cannot find plugin for url={}", qUtf8Printable(_url.toString()));
+ return view;
+ }
Q_CHECK_PTR(view);
// tab->installEventFilter(this);