From kde-bugs-dist Mon Oct 27 23:41:50 2008 From: Jean-Baptiste Mardelle Date: Mon, 27 Oct 2008 23:41:50 +0000 To: kde-bugs-dist Subject: [Bug 173723] New: KFileDialog does not auto add extension when Message-Id: X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=122515095931411 http://bugs.kde.org/show_bug.cgi?id=173723 Summary: KFileDialog does not auto add extension when requested Product: kfile Version: unspecified Platform: Compiled Sources OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general AssignedTo: kdelibs-bugs@kde.org ReportedBy: jb@kdenlive.org Version: (using Devel) OS: Linux Installed from: Compiled sources Using KFileDialog::getSaveFileName(), there is a checkbox allowing to auto add extension to your filename when saving. But KFileDialog does not add the extension even when the checkbox is clicked. This is a regression caused by commit 861225: "Merge branch 'kfilewidget'" http://websvn.kde.org/trunk/KDE/kdelibs/kfile/kfilewidget.cpp?r1=860118&r2=861225 which removed the call to appendExtension. The patch below fixes the issue, but not sure it's the best way of doing it... regards ______________________________________________________________ Index: kfilewidget.cpp =================================================================== --- kfilewidget.cpp (revision 876754) +++ kfilewidget.cpp (working copy) @@ -866,6 +866,11 @@ bool filesInList = false; while (it != locationEditCurrentTextList.constEnd()) { KUrl url(*it); + + if (d->operationMode == Saving && !directoryMode) { + d->appendExtension(url); + } + d->url = url; KIO::StatJob *statJob = KIO::stat(url, KIO::HideProgressInfo); bool res = KIO::NetAccess::synchronousRun(statJob, 0); -- Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.