[rkward] rkward/windows: Experimental workaround for 405386 .
Thomas Friedrichsmeier
null at kde.org
Thu Mar 28 08:47:04 GMT 2019
Git commit a0d72bb050c5e3280e0df8712d0b73ddf1a4e121 by Thomas Friedrichsmeier.
Committed on 28/03/2019 at 08:46.
Pushed by tfry into branch 'master'.
Experimental workaround for 405386 .
CCBUG: 405386
M +9 -1 rkward/windows/rkhtmlwindow.cpp
https://commits.kde.org/rkward/a0d72bb050c5e3280e0df8712d0b73ddf1a4e121
diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index 2772cf05..d1b15541 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -383,7 +383,15 @@ bool RKHTMLWindow::openURL (const QUrl &url) {
QFileInfo out_file (url.toLocalFile ());
bool ok = out_file.exists();
if (ok) {
- page->load (url);
+ if (!mtype.inherits ("text/html")) {
+ RK_DEBUG (APP, DL_WARNING, "Applying workaround for https://bugs.kde.org/show_bug.cgi?id=405386");
+ QFile f (url.toLocalFile ());
+ f.open (QIODevice::ReadOnly);
+ page->mainFrame ()->setHtml (f.readAll());
+ f.close ();
+ } else {
+ page->load (url);
+ }
} else {
fileDoesNotExistMessage ();
}
More information about the rkward-tracker
mailing list