konqy F2 file renaming bug

aleXXX alexander.neundorf at gmx.net
Wed May 8 23:36:46 BST 2002


Hi,

both in konqy's listview and in kdesktop there appears the following bug:

select an item, where you don't have permission to rename it, press F2, 
rename it, press enter -> error message appears "could not rename", but the 
renamed text of the icon/listview item stays changed.

Both konqy and kdesktop do actually the same:

void KonqBaseListViewWidget::slotItemRenamed(QListViewItem* item, const 
QString &name, int col)
{
   KFileItem * fileItem = static_cast<KonqBaseListViewItem*>(item)->item();
   KonqOperations::rename( this, fileItem->url(), name );
}

If the renaming fails, this is noticed if KonqOperations::slotResult() and a 
message box is displayed. There we don't know what caused the operation, 
whether it was DnD or icon renaming or listviewitem renaming.
And since the KonqOperations are async, they don't return whether they were 
successful.

So, what can we do ?

I see three ways:

1.) if MOVE and failed, then update the whole dir

2.) in slotItemRenamed() set some pointer in KonqOperations (we would need 
two, one for icon, one for listviewitem) to the item which initialized the 
renaming, and if it fails, rename the icon/listviewitem back to its original 
name

3.) before calling KonqOp::rename() stat the dir whether we have enough 
permissions (might slow it a bit down)

What should I do ? (my order: 3,1,2)

Bye
Alex




More information about the kfm-devel mailing list