diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 22 |
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); } |