KDE/kdelibs/kio/kfile
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Fri Sep 12 15:16:53 CEST 2008
SVN commit 860266 by chehrlic:
Fix 'Save As' in native file dialog mode on windows
CCMAIL: kde-windows at kde.org
M +7 -2 kfiledialog.cpp
--- trunk/KDE/kdelibs/kio/kfile/kfiledialog.cpp #860265:860266
@@ -375,7 +375,7 @@
{
if (d->native) {
d->native->selectedUrls.clear();
- d->native->selectedUrls.append( KUrl::fromPath(name) );
+ d->native->selectedUrls.append( KUrl(name) );
return;
}
d->w->setSelection(name);
@@ -819,7 +819,8 @@
if (!d->native)
return KDialog::exec();
-// d->native->selectedUrls.clear();
+// not clear here to let KFileDialogPrivate::Native::startDir() return a usefull value
+// d->native->selectedUrls.clear();
switch (d->native->operationMode) {
case KAbstractFileWidget::Opening:
case KAbstractFileWidget::Other:
@@ -828,6 +829,7 @@
d->native->startDir(), d->native->filter, parentWidget(), windowTitle()) );
if (url.isEmpty() || !url.isValid())
return QDialog::Rejected;
+ d->native->selectedUrls.clear();
d->native->selectedUrls.append(url);
return QDialog::Accepted;
}
@@ -844,6 +846,7 @@
d->native->startDir(), parentWidget(), windowTitle()) );
if (url.isEmpty() || !url.isValid())
return QDialog::Rejected;
+ d->native->selectedUrls.clear();
d->native->selectedUrls.append(url);
return QDialog::Accepted;
}
@@ -854,6 +857,7 @@
d->native->startDir(), d->native->filter, parentWidget(), windowTitle()) );
if (url.isEmpty() || !url.isValid())
return QDialog::Rejected;
+ d->native->selectedUrls.clear();
d->native->selectedUrls.append(url);
return QDialog::Accepted;
}
@@ -862,6 +866,7 @@
d->native->startDir(), parentWidget(), windowTitle()) );
if (url.isEmpty() || !url.isValid())
return QDialog::Rejected;
+ d->native->selectedUrls.clear();
d->native->selectedUrls.append(url);
return QDialog::Accepted;
}
More information about the Kde-windows
mailing list