Cancel search executes run() twice

Bug #1576311 reported by Kyle Nitzsche
6
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

Changed in canonical-scopes-project:
status: New → Triaged
Revision history for this message
Gary.Wang (gary-wzl77) wrote :

//1.Tapping cancel will trigger Query::run twice
Log:

resetPrimaryNavigationTag()
Filters changed
Scope::processPrimaryNavigationTag(): tag is ' "" '
active filters count: 0
invalidateResults ---> Sender: QObject(0x0)
Dispatching search: "untitled10.gary-wzl77_untitled10" "" ""
Scope:: query // 1

invalidateResults ---> Sender: QTimer(0x16be7d8)
Dispatching search: "untitled10.gary-wzl77_untitled10" "" ""
[2016-05-04 14:11:05.624] ERROR: untitled10.gary-wzl77_untitled10: QueryBase::run(): Operation was aborted by an application callback: Callback aborted
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.

Changed in unity-scopes-shell (Ubuntu):
assignee: nobody → Gary.Wang (gary-wzl77)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-scopes-shell - 0.5.7+16.10.20160525-0ubuntu1

---------------
unity-scopes-shell (0.5.7+16.10.20160525-0ubuntu1) yakkety; urgency=medium

  [ Gary.Wzl ]
  * Stop typing timer when reset navigation tag(tapping cancel). Also
    make sure relevant signal(searchQueryChanged) is triggered to keep
    query string updated as query string is empty after tapping cancel
    (LP: #1576311)

  [ Marcus Tomlinson ]
  * Only create an empty settings file when attempting to write to one
    (LP: #1583055)

  [ Pawel Stolowski ]
  * Don't depend on qt5-default.
  * Reject preview widgets with duplicated IDs. (LP: #1581495)
  * Set internet connectivity status in ActionMetadata (previews and
    preview actions). (LP: #1502282)
  * Workaround dependency issue on yakkety.

 -- Pawel Stolowski <email address hidden> Wed, 25 May 2016 08:16:27 +0000

Changed in unity-scopes-shell (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.