fix for a few kurlrequester issues....

David Faure faure at kde.org
Mon Aug 9 18:54:07 BST 2004


On Tuesday 03 August 2004 14:34, Ian Reinhart Geiser wrote:
> On Tuesday 03 August 2004 07:39 am, Waldo Bastian wrote:
> > On Tuesday 03 August 2004 07:25, Ian Reinhart Geiser wrote:
> > > 2) Fixed a bug where all of the file filter, modes, and other properties
> > > where just ignored.  This now works quite well.
> >
> > If you look at setFilter for example, it looks like:
> >
> > void KURLRequester::setFilter(const QString &filter)
> > {
> >     d->fileDialogFilter = filter;
> >     if (myFileDialog)
> >        myFileDialog->setFilter( d->fileDialogFilter );
> > }
> >
> > Why does it need to be set again in fileDialog()?
> Not sure, basicly it looks like when setFilter is called normally its before 
> myDialog is valid, so d->fileDialogFilter is just set. This is very odd 
> though since in theory when myFileDialog is created its all setup.  But its 
> not, so it wont work at all if you set the filter via a QProperty.  
> 
> Somehow threading through the logic the dialog is created without any of the 
> properties being set, hence my patch to the fileDialog() method.  Really its 
> not much addition to the overhead, and since it fixed the issue, I thought it 
> was reasonable.

This kind of reasoning seems to be against the "don't commit code you don't understand" rule.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list