[Kde-pim] Notifications on KMail

Artur Souza (MoRpHeUz) asouza at kde.org
Wed Jul 14 20:59:10 BST 2010


Hi Ingo!

2010/7/14 Ingo Klöcker <kloecker at kde.org>:
> I would prefer callbacks over signals because callbacks would also allow
> the UI components to return something to the composer.

Why is that needed? If the UI component needs to return something to
the composer couldn't the composer export what is needed and the UI
would just deal with it?

> Alternatively, do it more C++-like and pass a NotificationInterface (or
> UserInteractionInterface?) to the composer and write two different
> implementations, one for KMail-mobile and one for KMail desktop. This
> interface would provide all needed methods, e.g. void showWarning( const
> QString& message ), AnswerType question( const QString& question, const
> QString& button1, const QString& button2 ), etc. Use a factory for the
> instantiation of the correct implementation.

Ok, I *think* I technically understood your suggestion but I couldn't
see the benefit over having the signal and letting the UI itself take
care of how it wants to handle that information. I see that in the end
it's the UI that is taking care of the situation in your suggestion
too, but maybe that would imply in more imperative code on QML side
(mobile) where it was supposed to be more declarative (and signals
help on this matter) ?

Thanks for helping out on this! :)

Cheers!
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list