Strange KFileDialog ctor

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu Sep 18 17:50:24 BST 2008


Hi,

the KFileDialog currently wants a QString as filter. This leads to 
constructs like this:

     QString filter = mimeTypes.join (" ");
     KFileDialog fd (startURL, filter, this);

inside the ctor setFilter() is used which then has to determine that 
it's a joined-mimetype string and has to split it up.

Therefore I suggest a new ctor:

     KFileDialog( const KUrl& startDir, const QStringList& mimefilter,
                  QWidget *parent, QWidget* widget = 0 );

to avoid the useless join/split


Comments?
Christian




More information about the kde-core-devel mailing list