Cancel search executes run() twice
Bug #1576311 reported by
Kyle Nitzsche
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
canonical-scopes-project |
Triaged
|
Undecided
|
Unassigned | ||
unity-scopes-shell (Ubuntu) |
Fix Released
|
Undecided
|
Gary.Wang |
Bug Description
OTA10:
I find that on tapping Cancel after entering a search query, the scope's run() method executes twice.
For example: calls-scope always prints "CALLS starting" on entering run().
While watching scope-registry.log:
(launch or refresh calls-scope)
CAllS starting
(enter query string)
CALLS starting
(tap Cancel)
CALLS starting
CALLS starting
There should not be two entries after tapping cancel.
Related branches
lp:~gary-wzl77/unity-scopes-shell/fix_1576311
- Paweł Stołowski (community): Approve
-
Diff: 18 lines (+8/-0)1 file modifiedsrc/Unity/scope.cpp (+8/-0)
Changed in canonical-scopes-project: | |
status: | New → Triaged |
To post a comment you must log in.
//1.Tapping cancel will trigger Query::run twice
Log:
resetPrimaryNav igationTag( ) processPrimaryN avigationTag( ): tag is ' "" ' gary-wzl77_ untitled10" "" ""
Filters changed
Scope::
active filters count: 0
invalidateResults ---> Sender: QObject(0x0)
Dispatching search: "untitled10.
Scope:: query // 1
invalidateResults ---> Sender: QTimer(0x16be7d8) gary-wzl77_ untitled10" "" "" gary-wzl77_ untitled10: QueryBase::run(): Operation was aborted by an application callback: Callback aborted
Dispatching search: "untitled10.
[2016-05-04 14:11:05.624] ERROR: untitled10.
Scope:: query // 2
The second run is caused by m_typingTimer. I think the proper fixing should be not to trigger timeout from m_typingTimer when query string is empty e.g Tapping cancel.