Git commit 7a1146443c1ccf486ede21e51545241184579ec5 by Alex Neundorf. Committed on 31/08/2017 at 20:26. Pushed by neundorf into branch 'master'. - ask user for confirmation when dropping a directory When dropping a directory into kate, now there is a messagebox which asks the user whether he really wants to load all files contained in that directory. To me this usually happened accidentially and basically killed k= ate (because it started to load hundreds of files). Alex M +8 -3 kate/katemainwindow.cpp https://commits.kde.org/kate/7a1146443c1ccf486ede21e51545241184579ec5 diff --git a/kate/katemainwindow.cpp b/kate/katemainwindow.cpp index 862e44920..39dd96e85 100644 --- a/kate/katemainwindow.cpp +++ b/kate/katemainwindow.cpp @@ -708,9 +708,14 @@ void KateMainWindow::slotDropEvent(QDropEvent *event) KFileItem kitem(url); kitem.setDelayedMimeTypes(true); if (kitem.isDir()) { - KIO::ListJob *list_job =3D KIO::listRecursive(url, KIO::De= faultFlags, false); - connect(list_job, SIGNAL(entries(KIO::Job*,KIO::UDSEntryLi= st)), - this, SLOT(slotListRecursiveEntries(KIO::Job*,KIO:= :UDSEntryList))); + if (KMessageBox::questionYesNo(this, + i18n("You dropped the direc= tory %1 into Kate. " + "Do you want to load all fi= les contained in it ?", url.url()), + i18n("Load files recursivel= y?")) =3D=3D KMessageBox::Yes) { + KIO::ListJob *list_job =3D KIO::listRecursive(url, KIO= ::DefaultFlags, false); + connect(list_job, SIGNAL(entries(KIO::Job*,KIO::UDSEnt= ryList)), + this, SLOT(slotListRecursiveEntries(KIO::Job*,= KIO::UDSEntryList))); + } } else { m_viewManager->openUrl(url); }