diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-02-06 21:58:33 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-02-06 21:58:33 +0200 |
commit | e3e178e07c58f78eaa7066a64d2e6dd9acd66bd3 (patch) | |
tree | d172099b638563118a2df7d313fc96db72dd4889 /src/webengine | |
parent | Fix all profiles being created off-the-record (diff) | |
download | smolbote-e3e178e07c58f78eaa7066a64d2e6dd9acd66bd3.tar.xz |
Use spdlog for logging
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/webpage.cpp | 5 | ||||
-rw-r--r-- | src/webengine/webview.cpp | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/webengine/webpage.cpp b/src/webengine/webpage.cpp index ecbb1b9..15d2322 100644 --- a/src/webengine/webpage.cpp +++ b/src/webengine/webpage.cpp @@ -12,6 +12,7 @@ #include <QTimer> #include <QWebEngineFullScreenRequest> #include <QWebEngineCertificateError> +#include <spdlog/spdlog.h> QString tr_terminationStatus(QWebEnginePage::RenderProcessTerminationStatus status) { @@ -114,9 +115,7 @@ void WebPage::featurePermissionDialog(const QUrl &securityOrigin, QWebEnginePage void WebPage::renderProcessCrashed(QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode) { if(terminationStatus != QWebEnginePage::NormalTerminationStatus) { -#ifdef QT_DEBUG - qDebug("render process terminated: [%i] %i", terminationStatus, exitCode); -#endif + spdlog::warn("render process terminated: [{}] {}", terminationStatus, exitCode); QString page = "<html><body><h1>This tab has crashed!</h1>%message%</body></html>"; page.replace(QLatin1String("%message%"), QString("<p>%1<br>Exit code is %2.</p>" diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 5e350eb..5c9ab26 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -87,10 +87,7 @@ void WebView::search(const QString &term) WebView *WebView::createWindow(QWebEnginePage::WebWindowType type) { - if(m_parentWindow == nullptr) { - qDebug("WebView::createWindow: parent window not found, returning nullptr"); - return nullptr; - } + Q_CHECK_PTR(m_parentWindow); // parent Window has been found auto index = m_parentWindow->addTab(); |