Code review comment for lp:~mhr3/unity-lens-files/with-locate

Revision history for this message
Michal Hruby (mhr3) wrote :

> 175 + /* We want to display something once dash is shown */
> 176 + scope.queue_search_changed (SearchType.GLOBAL);
>
> I think this deserves a branch and bug report on its own.

Fair enough. Removing from this branch.

>
>
> 240 + if (cancellable.is_cancelled ()) throw new IOError.CANCELLED
> ("Cancelled");
>
> Can you add a more useful message, like "Cancelled locate search for '%s'" or
> something?
>

Actually I should be just using cancellable.set_error_if_cancelled()

Moreover, daemon.vala:428:
      } catch (IOError.CANCELLED ioe) {
        return;

>
> 242 + var results = yield Locate.locate (query, cancellable);
> 243 + results.sort (Utils.cmp_file_info_by_mtime);
>
> Should we not be checking cancellable before proceeding after the async call?
>

No, an IOError is thrown in that case.

« Back to merge proposal