Bug 389611 - Milou cancels/resets the search if there are no first result after 500 ms
Summary: Milou cancels/resets the search if there are no first result after 500 ms
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.11.95
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-29 18:02 UTC by Friedrich W. H. Kossebau
Modified: 2019-06-18 16:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2018-01-29 18:02:47 UTC
When using a krunner plugin which takes some time to deliver results (e.g. because querying remote services) and no other krunner plugins deliver results as well quickly, the internal delayed model reset timeout snaps in and does a complete clearing of the model, but also the matching manager, incl. the match context.

So one the krunner plugins got their data prepared, they find the match context they worked for now being invalid.

See class Milou::SourcesModel, its m_resetTimer and SourcesModel::slotResetTimeout.

No immediate own idea how to fix that, so braindumping things for now here.

Can be triggered e.g. with the (ported version of the) mediawiki krunner plugin from kdeplasma-addons.
Comment 1 David Edmundson 2018-03-13 15:12:33 UTC
Relevant commit message:

   SourcesModel: Delay clearing the model on a new query
    
    We delay querying the model by about 500msec or until we get results when
    the query string is changed. This way, we avoid the extra resizing of
    the window between when the results show up and the query is sent


It doesn't sound like it should be clearing the matching manager and match context, it should be just a visual thing.
Comment 2 Fabian Vogt 2019-06-18 16:56:01 UTC
Git commit c918c2840bcbbc52da72f163c8494db227db3600 by Fabian Vogt.
Committed on 18/06/2019 at 16:55.
Pushed by fvogt into branch 'Plasma/5.12'.

Don't give up if no results arrive after 500ms

Summary:
Currently it resets the entire context if no results appear after 500ms,
which means no new results can appear. This makes no sense.

RunnerManager does not emit any matchChanged signal while the runners update
the matches too quickly. The way this delay is implemented can result in never
actually emitting the signal until all runners are done though.
Thus it's actually likely to hit this situation.

Test Plan:
Test results appear now, even if the first batch of runners is slow.
List of matches still clears if nothing was found.

Reviewers: #plasma

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21605

M  +6    -1    lib/sourcesmodel.cpp
M  +3    -0    lib/sourcesmodel.h

https://commits.kde.org/milou/c918c2840bcbbc52da72f163c8494db227db3600