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
=== modified file 'tests/mocks/Unity/fake_applications_scope.cpp'
--- tests/mocks/Unity/fake_applications_scope.cpp 2013-09-30 15:47:18 +0000
+++ tests/mocks/Unity/fake_applications_scope.cpp 2014-01-15 19:29:53 +0000
@@ -30,6 +30,7 @@
30 m_id = "applications.scope";30 m_id = "applications.scope";
31 m_name = "Applications";31 m_name = "Applications";
32 m_visible = visible;32 m_visible = visible;
33 m_previewRendererName = "preview-application";
33 m_categories->setModel(createCategoriesModel());34 m_categories->setModel(createCategoriesModel());
34}35}
3536
3637
=== modified file 'tests/mocks/Unity/fake_preview.cpp'
--- tests/mocks/Unity/fake_preview.cpp 2013-10-31 15:13:50 +0000
+++ tests/mocks/Unity/fake_preview.cpp 2014-01-15 19:29:53 +0000
@@ -16,13 +16,15 @@
1616
17#include "fake_preview.h"17#include "fake_preview.h"
1818
19Preview::Preview(QObject *parent): QObject(parent)19Preview::Preview(const QString &rendererName, QObject *parent):
20 QObject(parent),
21 m_rendererName(rendererName)
20{22{
21}23}
2224
23QString Preview::rendererName() const25QString Preview::rendererName() const
24{26{
25 return "generic-preview";27 return m_rendererName;
26}28}
2729
28QString Preview::title() const30QString Preview::title() const
2931
=== modified file 'tests/mocks/Unity/fake_preview.h'
--- tests/mocks/Unity/fake_preview.h 2013-10-31 15:13:50 +0000
+++ tests/mocks/Unity/fake_preview.h 2014-01-15 19:29:53 +0000
@@ -38,7 +38,7 @@
38 Q_PROPERTY(QString image READ image NOTIFY previewChanged)38 Q_PROPERTY(QString image READ image NOTIFY previewChanged)
3939
40public:40public:
41 explicit Preview(QObject *parent = 0);41 explicit Preview(const QString &rendererName, QObject *parent = 0);
4242
43 QString rendererName() const;43 QString rendererName() const;
44 QString title() const;44 QString title() const;
@@ -55,6 +55,9 @@
5555
56Q_SIGNALS:56Q_SIGNALS:
57 void previewChanged();57 void previewChanged();
58
59private:
60 QString m_rendererName;
58};61};
5962
60Q_DECLARE_METATYPE(Preview *)63Q_DECLARE_METATYPE(Preview *)
6164
=== modified file 'tests/mocks/Unity/fake_scope.cpp'
--- tests/mocks/Unity/fake_scope.cpp 2013-12-17 16:04:47 +0000
+++ tests/mocks/Unity/fake_scope.cpp 2014-01-15 19:29:53 +0000
@@ -38,6 +38,7 @@
38 , m_isActive(false)38 , m_isActive(false)
39 , m_categories(new Categories(this))39 , m_categories(new Categories(this))
40 , m_results(new DeeListModel(this))40 , m_results(new DeeListModel(this))
41 , m_previewRendererName("preview-generic")
41{42{
42 DeeModel* results_model = create_results_model(20, 300);43 DeeModel* results_model = create_results_model(20, 300);
43 m_categories->setResultModel(results_model);44 m_categories->setResultModel(results_model);
@@ -47,7 +48,7 @@
47 m_timer.setInterval(1000);48 m_timer.setInterval(1000);
48 m_timer.setSingleShot(true);49 m_timer.setSingleShot(true);
49 connect(&m_timer, &QTimer::timeout, [this]() {50 connect(&m_timer, &QTimer::timeout, [this]() {
50 Preview *p = new Preview(this);51 Preview *p = new Preview(m_previewRendererName, this);
51 Q_EMIT previewReady(p);52 Q_EMIT previewReady(p);
52 });53 });
53}54}
5455
=== modified file 'tests/mocks/Unity/fake_scope.h'
--- tests/mocks/Unity/fake_scope.h 2013-10-31 15:13:50 +0000
+++ tests/mocks/Unity/fake_scope.h 2014-01-15 19:29:53 +0000
@@ -116,6 +116,8 @@
116 bool m_searching;116 bool m_searching;
117 bool m_isActive;117 bool m_isActive;
118118
119 QString m_previewRendererName;
120
119 Categories* m_categories;121 Categories* m_categories;
120 DeeListModel* m_results;122 DeeListModel* m_results;
121123

Subscribers

People subscribed via source and target branches

to all changes: