[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kio] src/core: A URL without a scheme is invalid, we can't create a slave for it.
From: David Faure <faure () kde ! org>
Date: 2014-10-31 22:34:53
Message-ID: E1XkKmT-0008Ah-A3 () scm ! kde ! org
[Download RAW message or body]
Git commit 539780dfa52d224b4506091f7606ddae4891fce2 by David Faure.
Committed on 31/10/2014 at 21:13.
Pushed by dfaure into branch 'master'.
A URL without a scheme is invalid, we can't create a slave for it.
simpleJobInit: Invalid URL: QUrl( "/tmp/qttestT10338.tmp" )
is easier to debug than
couldn't create slave: "Unknown protocol ''."
Change-Id: Iba2e2053fc747190a9a324a996d2e61a3adceb83
M +3 -2 src/core/simplejob.cpp
http://commits.kde.org/kio/539780dfa52d224b4506091f7606ddae4891fce2
diff --git a/src/core/simplejob.cpp b/src/core/simplejob.cpp
index abb4c02..3380cbe 100644
--- a/src/core/simplejob.cpp
+++ b/src/core/simplejob.cpp
@@ -37,7 +37,8 @@ SimpleJob::SimpleJob(SimpleJobPrivate &dd)
void SimpleJobPrivate::simpleJobInit()
{
Q_Q(SimpleJob);
- if (!m_url.isValid()) {
+ if (!m_url.isValid() || m_url.scheme().isEmpty()) {
+ qWarning() << "Invalid URL:" << m_url;
q->setError(ERR_MALFORMED_URL);
q->setErrorText(m_url.toString());
QTimer::singleShot(0, q, SLOT(slotFinished()));
@@ -412,4 +413,4 @@ SimpleJob *KIO::http_update_cache(const QUrl &url, bool=
no_cache, const QDateTim
return job;
}
=
-#include "moc_simplejob.cpp"
\ No newline at end of file
+#include "moc_simplejob.cpp"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic