[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] [PATCH] Do kolab resource work with kitchensync.
From: Reinhold Kainhofer <reinhold () kainhofer ! com>
Date: 2005-09-25 15:30:39
Message-ID: 200509251730.41929.reinhold () kainhofer ! com
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Sonntag, 25. September 2005 17:04 schrieb Mario Teijeiro Otero:
> {
> mUidMap.clear();
>
> - return loadAllEvents() & loadAllTodos() & loadAllJournals();
> + if ( loadAllEvents() & loadAllTodos() & loadAllJournals() ) {
> + emit resourceLoaded( this );
> + return true;
> + }
> + return false;
Emitting the signal directly in the code is possibly dangerous, since it
immediately invokes the handler. The method that called load/save might be
written in a way that crashes / doesn't work when the handler is invoked in
the middle of that method. I would use a QTimer::singleShot, so that the
caller can gracefully finish, and only afterwards the async handler is
invoked.
Cheers,
Reinhold
- --
- ------------------------------------------------------------------
Reinhold Kainhofer, Vienna, Austria
email: reinhold@kainhofer.com, http://reinhold.kainhofer.com/
* Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at
* K Desktop Environment, http://www.kde.org/, KOrganizer maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDNsKhTqjEwhXvPN0RAlhfAKCx24LplHfyp6cSKiEMLxj7t14JAwCgoa8K
JIg3nrc2+kjfpv43n1c8+Fo=
=/gWr
-----END PGP SIGNATURE-----
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic