[KPhotoAlbum] Bug in delete category code ?

Baptiste MATHUS ml at batmat.net
Sat Nov 18 21:43:14 GMT 2006


Hi,

Looking at the code, I just saw something bizarre, wouldn't it be a
mistake in SettingsDialog.cpp ?

void Settings::SettingsDialog::slotDeleteCurrent()
{
    int answer = KMessageBox::Yes;
    KMessageBox::questionYesNo( this, i18n("<qt>Really delete cateory
'%1'?").arg( _current->text()) );
    if ( answer == KMessageBox::No )
        return;

    _deleted.append( _current );
    _categories->takeItem( _current );

I suppose you wanted to mean :
answer = KMessageBox::questionYesNo( this, i18n("<qt>Really delete
cateory '%1'?").arg( _current->text()) );

As I see this, even if the user answers yes, the slot code will be executed...

-- Baptiste
PS : as you can see, there's also a small mistake "cateory" instead of
"category".

-- 
Baptiste <Batmat> Mathus
BMathus at Batmat point net - http://batmat.net
---------
Si chacun de nous a une idée et que nous les partageons, nous
repartirons tous les deux avec deux idées... C'est ça le Libre.



More information about the Kphotoalbum mailing list