~unity-team/unity-scopes-shell/drop-fill-mode

« back to all changes in this revision

Viewing changes to tests/data/mock-scope/mock-scope.cpp

  • Committer: CI bot
  • Author(s): Michal Hruby
  • Date: 2014-07-10 07:51:28 UTC
  • mfrom: (104.1.5 unity-scopes-shell)
  • Revision ID: ps-jenkins@lists.canonical.com-20140710075128-igbw8b1izi7a910d
Expose expansion queries as defined in latest unity-api. 
Approved by: Pete Woods

Show diffs side-by-side

added added

removed removed

Lines of Context:
204
204
            res1.set_title("result for: \"" + query_ + "\"");
205
205
            reply->push(res1);
206
206
        }
 
207
        else if (query_ == "expansion-query")
 
208
        {
 
209
            CategoryRenderer minimal_rndr(R"({"schema-version": 1, "components": {"title": "title"}})");
 
210
            auto cat = reply->register_category("cat1", "Category 1", "", query(), minimal_rndr);
 
211
            CategorisedResult res(cat);
 
212
            res.set_uri("test:uri");
 
213
            res.set_title("result for: \"" + query_ + "\"");
 
214
            res.set_art("art");
 
215
            res.set_dnd_uri("test:dnd_uri");
 
216
            reply->push(res);
 
217
        }
207
218
        else
208
219
        {
209
220
            auto cat = reply->register_category("cat1", "Category 1", "");