diff --git a/src/lib/data/html/tabcrash.html b/src/lib/data/html/tabcrash.html
index 408c593f9..7e3328406 100644
--- a/src/lib/data/html/tabcrash.html
+++ b/src/lib/data/html/tabcrash.html
@@ -15,7 +15,7 @@ li {padding: 5px;}
-

+
%HEADING%
- %LI-1%
diff --git a/src/lib/webengine/webpage.cpp b/src/lib/webengine/webpage.cpp
index 0ecaa69af..188d21361 100644
--- a/src/lib/webengine/webpage.cpp
+++ b/src/lib/webengine/webpage.cpp
@@ -1,6 +1,6 @@
/* ============================================================
-* QupZilla - WebKit based browser
-* Copyright (C) 2010-2016 David Rosca
+* QupZilla - Qt web browser
+* Copyright (C) 2010-2017 David Rosca
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -376,21 +376,16 @@ void WebPage::renderProcessTerminated(QWebEnginePage::RenderProcessTerminationSt
if (terminationStatus == NormalTerminationStatus)
return;
- if (qstrcmp(qVersion(), "5.7.0") == 0) {
- // Crashes with QtWebEngine 5.7.0
- return;
- }
-
QTimer::singleShot(0, this, [this]() {
QString page = QzTools::readAllFileContents(":html/tabcrash.html");
page.replace(QL1S("%IMAGE%"), QzTools::pixmapToDataUrl(IconProvider::standardIcon(QStyle::SP_MessageBoxWarning).pixmap(45)).toString());
- page.replace(QL1S("%FAVICON%"), QzTools::pixmapToDataUrl(IconProvider::standardIcon(QStyle::SP_MessageBoxWarning).pixmap(16)).toString());
page.replace(QL1S("%TITLE%"), tr("Failed loading page"));
page.replace(QL1S("%HEADING%"), tr("Failed loading page"));
page.replace(QL1S("%LI-1%"), tr("Something went wrong while loading this page."));
page.replace(QL1S("%LI-2%"), tr("Try reloading the page or closing some tabs to make more memory available."));
page.replace(QL1S("%RELOAD-PAGE%"), tr("Reload page"));
page = QzTools::applyDirectionToPage(page);
+ load(url()); // Workaround for QtWebEngine crash
setHtml(page.toUtf8(), url());
});
}