<br><br><div class="gmail_quote">2008/7/12 Rafael Fernández López <<a href="mailto:ereslibre@kde.org">ereslibre@kde.org</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Some comments: (and why you can't compile it):<br>
<br>
- You added a method declaration to KAbstractFileWidget which hasn't got an<br>
implementation. On KFileDialog, w is declared on KFileDialogPrivate as a<br>
"KAbstractFileWidget* w;"; so you get a call to a non existant method body.<br>
<br>
- In case you add a body, we are screwed. Since this method is not virtual,<br>
and the pointer said before is a KAbstractFileWidget, I don't know if it will<br>
compile. However, if it does, always the KAbstractFileWidget implementation<br>
will be called.<br>
<br>
Notes:<br>
<br>
All new methods are lacking a "@since 4.2".<br>
<br>
Solutions:<br>
<br>
As I pointed you before on the C++ binary compatibility issues there are ways<br>
to "workaround" this. You can use signals and slots for making this "fake<br>
virtual", and add a very BIG warning to fix this for KDE 5.<br>
<br>
You can add a signal on the abstract class that will be emitted on the<br>
setConfirmOverwrite method from KAbstractFileWidget. Then on the other<br>
implementations, you can connect that signal to their own slots, so they<br>
provide a private implementation for such a reaction. You don't need to<br>
"rewrite" setConfirmOverwrite on the inherited classes, just connecting to the<br>
signal that KAbstractFileWidget exports. It is important from my POV to mark<br>
this signal as @internal.<br>
<br>
<br>
Regards,<br>
<font color="#888888">Rafael Fernández López.<br>
</font></blockquote></div><br>Hi Rafael,<br>this is the first time for me with this workaround.<br>Btw KAbstractFileWidget does not inherit QObject so i can't make it emitting signals. Can i make another class in the same files which emits the signal when called from KAbstractFileWidget? Or there is something prettier to do this?<br>
<br>Thanks for your help.<br clear="all"><br>-- <br>Alessandro