[PATCH] RunnerManager
Aaron J. Seigo
aseigo at kde.org
Tue Apr 29 21:45:46 CEST 2008
On Tuesday 29 April 2008, Jordi Polo wrote:
> Interface doesn't needs SearchContext anymore (it may be even become and
> internal class someday)
how would runners operate then? =)
> Apidox for AbstractRunner::ignoredType is wrong, just noticed
ignoredType is wrong. it should be:
SearchContext::Types ignoredTypes() const
using the flags (e.g. ignoredTypes & type) would done on the consumer's end
(e.g. in RunnerManager)
the Private copy ctor shouldn't copy the matches (it used only on detach,
right? so we don't want the matches). this makes the call to removeAllMatches
unecessary in reset(). that's the whole point of this approach: avoid
copying, deleting, etc.
in fact, i don't even see how this can work without crashing since it will
delete the SearchMatches that are in the collection of the detached Private
object, which are the same matches in the other Private object. the only
saving grace is that the code doesn't access those matches anymore, but
really you've got a bunch of dangling pointers there.
+ if (this !=d->q) {
+ //FIXME: this line must be uncommented.
+ d.detach();
+ }
that looks completely backwards to me. it also looks completely unecessary.
whenever reset is called it should detach. in practice, reset will only be
called on the real context object, and that one should detach... again, this
all about preventing copies and deletions.
the rest looks ok ... work needed in places still, but close enough ... i'm
tempted to say "commit it, and then i'll polish it up"
--
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 Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080429/beff8a60/attachment.pgp
More information about the Panel-devel
mailing list