Commit 86b83aa2 authored by Sven Brauch's avatar Sven Brauch

fix file open dialog default directory for kwrite as well

parent 3b684d26
......@@ -247,7 +247,8 @@ void KWrite::slotNew()
void KWrite::slotOpen()
{
const QList<QUrl> urls = QFileDialog::getOpenFileUrls(this, i18n("Open File"), m_view->document()->url());
auto parent = m_view->document()->url().adjusted(QUrl::StripTrailingSlash | QUrl::RemoveFilename);
const QList<QUrl> urls = QFileDialog::getOpenFileUrls(this, i18n("Open File"), parent);
Q_FOREACH(QUrl url, urls) {
slotOpen(url);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment