Commit 73303a25 authored by Sven Brauch's avatar Sven Brauch

Revert "fix file open dialog default directory for kwrite as well"

This reverts commit 86b83aa2.
This reverts commit 3b684d26.

The issue has been fixed in frameworksintegration, what we did
before is actually correct. To cite documentation of
QFileDialog::getOpenFileName:

"The file dialog's working directory will be set to dir. If dir includes
a file name, the file will be selected."

CCMAIL:kare.sars@iki.fi
parent 86b83aa2
......@@ -235,7 +235,7 @@ void KateViewManager::slotDocumentOpen()
QString fileList;
const QList<QUrl> urls = QFileDialog::getOpenFileUrls(m_mainWindow, i18n("Open File"), cv->document()->url().adjusted(QUrl::StripTrailingSlash | QUrl::RemoveFilename));
const QList<QUrl> urls = QFileDialog::getOpenFileUrls(m_mainWindow, i18n("Open File"), cv->document()->url());
Q_FOREACH(const QUrl & url, urls) {
qint64 size = QFile(url.toLocalFile()).size();
......
......@@ -247,8 +247,7 @@ void KWrite::slotNew()
void KWrite::slotOpen()
{
auto parent = m_view->document()->url().adjusted(QUrl::StripTrailingSlash | QUrl::RemoveFilename);
const QList<QUrl> urls = QFileDialog::getOpenFileUrls(this, i18n("Open File"), parent);
const QList<QUrl> urls = QFileDialog::getOpenFileUrls(this, i18n("Open File"), m_view->document()->url());
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