[PATCH] KFileDialog overwrite confirmation
Rafael Fernández López
ereslibre at kde.org
Sat Jul 12 14:42:27 BST 2008
Some comments: (and why you can't compile it):
- You added a method declaration to KAbstractFileWidget which hasn't got an
implementation. On KFileDialog, w is declared on KFileDialogPrivate as a
"KAbstractFileWidget* w;"; so you get a call to a non existant method body.
- In case you add a body, we are screwed. Since this method is not virtual,
and the pointer said before is a KAbstractFileWidget, I don't know if it will
compile. However, if it does, always the KAbstractFileWidget implementation
will be called.
All new methods are lacking a "@since 4.2".
As I pointed you before on the C++ binary compatibility issues there are ways
to "workaround" this. You can use signals and slots for making this "fake
virtual", and add a very BIG warning to fix this for KDE 5.
You can add a signal on the abstract class that will be emitted on the
setConfirmOverwrite method from KAbstractFileWidget. Then on the other
implementations, you can connect that signal to their own slots, so they
provide a private implementation for such a reaction. You don't need to
"rewrite" setConfirmOverwrite on the inherited classes, just connecting to the
signal that KAbstractFileWidget exports. It is important from my POV to mark
this signal as @internal.
Rafael Fernández López.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel