diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-30 01:26:39 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-30 01:26:39 +0200 |
commit | 97cd6ce8851e19ddce3d0bf098a8b8a00ee02992 (patch) | |
tree | 3f250058b6792ca4fc275d8d8e6a2d8e282c4f8a /src/protocolhandler.cpp | |
parent | Fixed wrong pointed out text in the Browse ListItem (diff) | |
download | rekonq-97cd6ce8851e19ddce3d0bf098a8b8a00ee02992.tar.xz |
Fix (again and again) ftp handling (and errors in general)
Disabled the "Failed to Load" string as rekonq usually does a lot more than
WebKit to "load" an url..
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r-- | src/protocolhandler.cpp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 1ee026a8..077807cb 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -205,6 +205,27 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr } +// --------------------------------------------------------------------------------------------------------------------------- + + +void ProtocolHandler::showResults(const KFileItemList &list) +{ + if(!_lister->rootItem().isNull() && _lister->rootItem().isReadable() && _lister->rootItem().isFile()) + { + emit downloadUrl( _lister->rootItem().url() ); + return; + } + + QString html = dirHandling(list); + _frame->setHtml( html, _url ); + + Application::instance()->mainWindow()->currentTab()->setFocus(); + Application::historyManager()->addHistoryEntry( _url.prettyUrl() ); + + delete _lister; +} + + QString ProtocolHandler::dirHandling(const KFileItemList &list) { if (!_lister) @@ -278,25 +299,6 @@ QString ProtocolHandler::dirHandling(const KFileItemList &list) } -void ProtocolHandler::showResults(const KFileItemList &list) -{ - if(!_lister->rootItem().isNull() && _lister->rootItem().isReadable() && _lister->rootItem().isFile()) - { - WebPage *page = qobject_cast<WebPage *>( _frame->page() ); - page->downloadUrl( _lister->rootItem().url() ); - return; - } - - QString html = dirHandling(list); - _frame->setHtml( html, _url ); - - Application::instance()->mainWindow()->currentTab()->setFocus(); - Application::historyManager()->addHistoryEntry( _url.prettyUrl() ); - - delete _lister; -} - - void ProtocolHandler::slotMostLocalUrlResult(KJob *job) { if(job->error()) @@ -315,7 +317,9 @@ void ProtocolHandler::slotMostLocalUrlResult(KJob *job) _lister->openUrl(_url); } else + { emit downloadUrl(_url); + } } } |