diff options
| author | Kai Uwe Broulik <[email protected]> | 2022-10-02 13:09:21 +0200 |
|---|---|---|
| committer | Kai Uwe Broulik <[email protected]> | 2022-10-06 12:21:15 +0000 |
| commit | 380543334c7a518717564e94bc806cae6ee7bf4a (patch) | |
| tree | 65689190a1efa276f520cb4f0234a4826053b452 /src/dolphintabwidget.cpp | |
| parent | 8402b989957a5b9e44274b17b1cba289fc3544f0 (diff) | |
DolphinTabBar: Open folder in new tab when dropped onto tab bar
Diffstat (limited to 'src/dolphintabwidget.cpp')
| -rw-r--r-- | src/dolphintabwidget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 7eae6f297..6caaf174f 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -393,6 +393,17 @@ void DolphinTabWidget::tabDropEvent(int index, QDropEvent* event) if (index >= 0) { DolphinView* view = tabPageAt(index)->activeViewContainer()->view(); view->dropUrls(view->url(), event, view); + } else { + const auto urls = event->mimeData()->urls(); + + for (const QUrl &url : urls) { + auto *job = KIO::statDetails(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo); + connect(job, &KJob::result, this, [this, job]() { + if (!job->error() && job->statResult().isDir()) { + openNewTab(job->url(), QUrl(), NewTabPosition::AtEnd); + } + }); + } } } |
