RFC: Policy on use of *Dialog::exec() in libraries
Aaron J. Seigo
aseigo at kde.org
Sat Nov 5 11:57:39 UTC 2011
hi ...
i would like to propose the following policy for Frameworks 5 classes:
====
Dialogs may not be exec()'d from a library, as the host application may
require an always unblocked user interface. If for some reason it is
absolutely unavoidable, then the use of a modal inteface must be clearly
mentioned in the API.
In most cases, a parented but non-modal dialog is prefered. Multiple instances
of the dialog should not be created (which exec() is often used as a means of
preventing). This usually means keeping a smart pointer (QWeakPointer) to the
dialog for re-use and setting the dialog to delete on close.
====
this keeps biting us in Plasma and really is an annoyance when you can't even
rely on a library to not freeze your entire UI on you because of some internal
implementation detail.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20111105/80077ff1/attachment.sig>
More information about the Kde-frameworks-devel
mailing list