Merge lp:~mzanetti/unity8/fake-application-previews into lp:~elopio/unity8/app_preview

Proposed by Michael Zanetti
Status: Merged
Merged at revision: 640
Proposed branch: lp:~mzanetti/unity8/fake-application-previews
Merge into: lp:~elopio/unity8/app_preview
Diff against target: 89 lines (+13/-4)
5 files modified
tests/mocks/Unity/fake_applications_scope.cpp (+1/-0)
tests/mocks/Unity/fake_preview.cpp (+4/-2)
tests/mocks/Unity/fake_preview.h (+4/-1)
tests/mocks/Unity/fake_scope.cpp (+2/-1)
tests/mocks/Unity/fake_scope.h (+2/-0)
To merge this branch: bzr merge lp:~mzanetti/unity8/fake-application-previews
Reviewer Review Type Date Requested Status
Leo Arias Pending
Review via email: mp+201836@code.launchpad.net

Commit message

make fake applications use the application previews

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/mocks/Unity/fake_applications_scope.cpp'
2--- tests/mocks/Unity/fake_applications_scope.cpp 2013-09-30 15:47:18 +0000
3+++ tests/mocks/Unity/fake_applications_scope.cpp 2014-01-15 19:29:53 +0000
4@@ -30,6 +30,7 @@
5 m_id = "applications.scope";
6 m_name = "Applications";
7 m_visible = visible;
8+ m_previewRendererName = "preview-application";
9 m_categories->setModel(createCategoriesModel());
10 }
11
12
13=== modified file 'tests/mocks/Unity/fake_preview.cpp'
14--- tests/mocks/Unity/fake_preview.cpp 2013-10-31 15:13:50 +0000
15+++ tests/mocks/Unity/fake_preview.cpp 2014-01-15 19:29:53 +0000
16@@ -16,13 +16,15 @@
17
18 #include "fake_preview.h"
19
20-Preview::Preview(QObject *parent): QObject(parent)
21+Preview::Preview(const QString &rendererName, QObject *parent):
22+ QObject(parent),
23+ m_rendererName(rendererName)
24 {
25 }
26
27 QString Preview::rendererName() const
28 {
29- return "generic-preview";
30+ return m_rendererName;
31 }
32
33 QString Preview::title() const
34
35=== modified file 'tests/mocks/Unity/fake_preview.h'
36--- tests/mocks/Unity/fake_preview.h 2013-10-31 15:13:50 +0000
37+++ tests/mocks/Unity/fake_preview.h 2014-01-15 19:29:53 +0000
38@@ -38,7 +38,7 @@
39 Q_PROPERTY(QString image READ image NOTIFY previewChanged)
40
41 public:
42- explicit Preview(QObject *parent = 0);
43+ explicit Preview(const QString &rendererName, QObject *parent = 0);
44
45 QString rendererName() const;
46 QString title() const;
47@@ -55,6 +55,9 @@
48
49 Q_SIGNALS:
50 void previewChanged();
51+
52+private:
53+ QString m_rendererName;
54 };
55
56 Q_DECLARE_METATYPE(Preview *)
57
58=== modified file 'tests/mocks/Unity/fake_scope.cpp'
59--- tests/mocks/Unity/fake_scope.cpp 2013-12-17 16:04:47 +0000
60+++ tests/mocks/Unity/fake_scope.cpp 2014-01-15 19:29:53 +0000
61@@ -38,6 +38,7 @@
62 , m_isActive(false)
63 , m_categories(new Categories(this))
64 , m_results(new DeeListModel(this))
65+ , m_previewRendererName("preview-generic")
66 {
67 DeeModel* results_model = create_results_model(20, 300);
68 m_categories->setResultModel(results_model);
69@@ -47,7 +48,7 @@
70 m_timer.setInterval(1000);
71 m_timer.setSingleShot(true);
72 connect(&m_timer, &QTimer::timeout, [this]() {
73- Preview *p = new Preview(this);
74+ Preview *p = new Preview(m_previewRendererName, this);
75 Q_EMIT previewReady(p);
76 });
77 }
78
79=== modified file 'tests/mocks/Unity/fake_scope.h'
80--- tests/mocks/Unity/fake_scope.h 2013-10-31 15:13:50 +0000
81+++ tests/mocks/Unity/fake_scope.h 2014-01-15 19:29:53 +0000
82@@ -116,6 +116,8 @@
83 bool m_searching;
84 bool m_isActive;
85
86+ QString m_previewRendererName;
87+
88 Categories* m_categories;
89 DeeListModel* m_results;
90

Subscribers

People subscribed via source and target branches

to all changes: