summaryrefslogtreecommitdiff
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
parentfix set home to current page button (diff)
downloadrekonq-face04758de427df55b58ce47d0a39628b6b96fa.tar.xz
Show actual page source
BUG:235338
-rw-r--r--src/mainwindow.cpp22
-rw-r--r--src/urlbar/urlresolver.cpp1
2 files changed, 2 insertions, 21 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);
}
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index c2f1d0ee..07b40bac 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -271,4 +271,3 @@ UrlSearchItem UrlResolver::privilegedItem(UrlSearchList* list)
}
return UrlSearchItem();
}
-