diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-08-23 10:28:54 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-09-05 23:07:42 +0300 |
commit | fcd11edde50d65f272cfc1ebf211697d778af77e (patch) | |
tree | 225b1aeb2245dbdb1da018a6bf01c06c7e2d3869 /src/application.cpp | |
parent | Add UrlBar and TabBar (diff) | |
download | rekonq-fcd11edde50d65f272cfc1ebf211697d778af77e.tar.xz |
Add RekonqView_fake class
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp index aba1fc69..88466d73 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -20,6 +20,10 @@ #include <QStandardPaths> #include <spdlog/spdlog.h> +#ifdef QT_DEBUG +#include "test/rview_fake.h" +#endif + // --------------------------------------------------------------------------------------------------------------- // Ctor and Dtor @@ -383,6 +387,19 @@ RekonqWindow *Application::newWindow() RekonqView *Application::newView(const QUrl &url, RekonqWindow *window) { +#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; + } +#endif + RekonqPluginInterface *interface = nullptr; for (const auto &plugin : m_plugins) if (plugin->hasScheme(url.scheme())) { |