summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
}
-