Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/kurlnavigator.cpp
Show First 20 Lines • Show All 999 Lines • ▼ Show 20 Line(s) | 999 | { | |||
---|---|---|---|---|---|
1000 | return d->m_showPlacesSelector; | 1000 | return d->m_showPlacesSelector; | ||
1001 | } | 1001 | } | ||
1002 | 1002 | | |||
1003 | QUrl KUrlNavigator::uncommittedUrl() const | 1003 | QUrl KUrlNavigator::uncommittedUrl() const | ||
1004 | { | 1004 | { | ||
1005 | KUriFilterData filteredData(d->m_pathBox->currentText().trimmed()); | 1005 | KUriFilterData filteredData(d->m_pathBox->currentText().trimmed()); | ||
1006 | filteredData.setCheckForExecutables(false); | 1006 | filteredData.setCheckForExecutables(false); | ||
1007 | if (KUriFilter::self()->filterUri(filteredData, QStringList() << QStringLiteral("kshorturifilter") << QStringLiteral("kurisearchfilter"))) { | 1007 | if (KUriFilter::self()->filterUri(filteredData, QStringList() << QStringLiteral("kshorturifilter") << QStringLiteral("kurisearchfilter"))) { | ||
1008 | return filteredData.uri(); | 1008 | return filteredData.uri(); | ||
dfaure: This is written like kshorturifilter is buggy...
I looked into it to see if there was a good… | |||||
1009 | } else { | | |||
1010 | return QUrl::fromUserInput(filteredData.typedString()); | | |||
1011 | } | 1009 | } | ||
1010 | | ||||
1011 | return QUrl::fromUserInput(filteredData.typedString(), QLatin1String(""), QUrl::AssumeLocalFile); | ||||
1012 | } | 1012 | } | ||
1013 | 1013 | | |||
1014 | void KUrlNavigator::setLocationUrl(const QUrl &newUrl) | 1014 | void KUrlNavigator::setLocationUrl(const QUrl &newUrl) | ||
1015 | { | 1015 | { | ||
1016 | if (newUrl == locationUrl()) { | 1016 | if (newUrl == locationUrl()) { | ||
1017 | return; | 1017 | return; | ||
1018 | } | 1018 | } | ||
1019 | 1019 | | |||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |
This is written like kshorturifilter is buggy...
I looked into it to see if there was a good reason why kshorturifilter returns Error in case of a non-existing local path, but in fact.... it doesn't really have to.
If the user types a non-existing path in a URL bar then opening that path will error anyway, there's no need to catch that at the kurifilter level.
I'm working on a fix for kshorturifilter.