Bug 155224

Summary: Wrong behaviour of KFileDialog::getSaveFileName with double extension filenames
Product: [Frameworks and Libraries] kdelibs Reporter: Albert Astals Cid <aacid>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Albert Astals Cid 2008-01-07 15:11:20 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

The given program works for the first getSaveFileName call, it suggests pepe.bar as filename, but does not work for the second call, it suggests pepe.foo.foo.bar for as filename. dfaure agrees this is a bug

#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kfiledialog.h>
 
int main(int argc, char *argv[])
{
        KAboutData aboutData( "test", "", ki18n("test"), "0.1", ki18n(""), KAboutData::License_GPL, ki18n(""), ki18n(""));
        KCmdLineArgs::init(argc, argv, &aboutData);
        KApplication app;
        KFileDialog::getSaveFileName(KUrl("pepe.bar"), "*.bar|My fooFiles", 0, "");
        KFileDialog::getSaveFileName(KUrl("pepe.foo.bar"), "*.foo.bar|My fooBarFiles", 0, "");
}
Comment 1 Albert Astals Cid 2008-02-14 22:37:58 UTC
I fixed that myself some time ago