summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-03-26 17:32:16 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-03-26 17:32:16 +0100
commit860934af2c429c9676e8a6ad5fa595cfd405d164 (patch)
tree8b9e7948690e43bf882c8647e44324f9262da74c /src/webpage.cpp
parentFixed a regression (history NOT modified) introduced with (diff)
downloadrekonq-860934af2c429c9676e8a6ad5fa595cfd405d164.tar.xz
This commit lets rekonq embed parts instead of krunning them
DISCLAIMER: This code really A LOT of testing. Not for the code itself, but for the parts it lets rekonq use. I'm experiencing a lot of crashes with the Dragon Part, in example.
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 06e733b0..71cc8be4 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -271,9 +271,22 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
}
}
// case KParts::BrowserRun::Embed
- KUrl::List list;
- list.append(url);
- KRun::run(*offer,url,0);
+ QString html;
+ html += "<html>";
+ html += "<head>";
+ html += "<title>";
+ html += url.pathOrUrl();
+ html += "</title>";
+ html += "<style type=\"text/css\">";
+ html += "* { border: 0; padding: 0; margin: 0; }";
+ html += "</style>";
+ html += "</head>";
+ html += "<body>";
+ html += "<embed src=\"" + url.pathOrUrl() + "\" width=\"100%\" height=\"100%\" />";
+ html += "</body>";
+ html += "</html>";
+
+ mainFrame()->setHtml(html, url);
}
}