From c7bb4ef3b9817d800809f0d3a52e96914aa2c7d8 Mon Sep 17 00:00:00 2001 From: aqua Date: Tue, 23 Aug 2022 12:53:45 +0300 Subject: Add placeholder menus to main window --- src/application.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index 88466d73..63263278 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -387,29 +387,20 @@ RekonqWindow *Application::newWindow() RekonqView *Application::newView(const QUrl &url, RekonqWindow *window) { + RekonqView *view = nullptr; + #ifdef QT_DEBUG - if (url.isEmpty()) { - auto *view = new RekonqView_fake(window); - if (window == nullptr) { - m_views.append(view); - view->show(); - } - else - window->addView(view); - return view; - } + if (url.isEmpty()) view = new RekonqView_fake(window); + else #endif - - RekonqPluginInterface *interface = nullptr; - for (const auto &plugin : m_plugins) - if (plugin->hasScheme(url.scheme())) { - interface = plugin->interface(); - break; + for (const auto &plugin : m_plugins) { + if (plugin->hasScheme(url.scheme())) { + view = plugin->interface()->view(url); + break; + } } - if (interface == nullptr) return nullptr; - - auto *view = interface->view(url); + if (view == nullptr) return view; Q_CHECK_PTR(view); // tab->installEventFilter(this); -- cgit v1.2.1