aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2016-09-08 16:33:34 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2016-09-08 16:33:34 (GMT)
commitfa5e37af33f44f6e721880042a48e162973c4840 (patch)
tree99e0260eb413b6d71ab0c3df2d6d85bda109bacb
parent50c656517729bd6e2cbc21d20c7b640df6948eef (diff)
Bug 366568 - when dragging & dropping folders, contained files are opened as blank / new.
CHANGELOG: Fix drag & drop of folder into Kate window BUG: 366568
-rw-r--r--kate/katemainwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kate/katemainwindow.cpp b/kate/katemainwindow.cpp
index 0e110a6..862e449 100644
--- a/kate/katemainwindow.cpp
+++ b/kate/katemainwindow.cpp
@@ -731,10 +731,11 @@ void KateMainWindow::slotListRecursiveEntries(KIO::Job *job, const KIO::UDSEntry
{
const QUrl dir = static_cast<KIO::SimpleJob *>(job)->url();
foreach(const KIO::UDSEntry & entry, list) {
- QUrl currentUrl = dir.resolved(QUrl(entry.stringValue(KIO::UDSEntry::UDS_NAME)));
-
if (!entry.isDir()) {
- m_viewManager->openUrl(currentUrl);
+ QUrl url(dir);
+ url = url.adjusted(QUrl::StripTrailingSlash);
+ url.setPath(url.path() + QLatin1Char('/') + entry.stringValue(KIO::UDSEntry::UDS_NAME));
+ m_viewManager->openUrl(url);
}
}
}