D21607: Don't delay emission of matchesChanged indefinitely
Fabian Vogt
noreply at phabricator.kde.org
Wed Jun 5 17:34:33 BST 2019
fvogt added a comment.
In D21607#474763 <https://phabricator.kde.org/D21607#474763>, @bruns wrote:
> This would emit the signal more often, but wouldn't
>
> if (!matchChangeTimer.isActive())
> matchChangeTimer.start(100)
>
>
> achieve essentially the same?
That would do it even more often.
I'm thinking about doing it completely differently now though, with a 0 latency case (untested):
if(lastMatchChangeSignalled.hasExpired(100)) {
matchChangeTimer.stop();
emit q->matchesChanged(context.matches());
} else {
matchChangeTimer.start(100 - lastMatchChangeSignalled.expired());
}
What do you think?
REPOSITORY
R308 KRunner
REVISION DETAIL
https://phabricator.kde.org/D21607
To: fvogt, #frameworks, broulik
Cc: bruns, kde-frameworks-devel, LeGast00n, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190605/0cb30c3c/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list