summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-25 01:38:37 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-25 01:38:37 +0200
commitface04758de427df55b58ce47d0a39628b6b96fa (patch)
treeae18c3009c96aa7d80dc94ba009d6f7e53154978 /src/mainwindow.cpp
parentfix set home to current page button (diff)
downloadrekonq-face04758de427df55b58ce47d0a39628b6b96fa.tar.xz
Show actual page source
BUG:235338
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d14f2254..1b36e6de 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -951,26 +951,8 @@ void MainWindow::viewPageSource()
if (!currentTab())
return;
- KUrl url(currentTab()->url());
- bool isTempFile = false;
- if (!url.isLocalFile())
- {
- KTemporaryFile sourceFile;
-
- /// TODO: autochoose tempfile suffix
- sourceFile.setSuffix(QString(".html"));
- sourceFile.setAutoRemove(false);
-
- if (sourceFile.open())
- {
- sourceFile.write(currentTab()->page()->mainFrame()->toHtml().toUtf8());
-
- url = KUrl();
- url.setPath(sourceFile.fileName());
- isTempFile = true;
- }
- }
- KRun::runUrl(url, QL1S("text/plain"), this, isTempFile);
+ KUrl url = currentTab()->url();
+ KRun::runUrl(url, QL1S("text/plain"), this, false);
}