Merge lp:~paulliu/unity/phablet-fake-peoplepreviewdata into lp:unity/phablet

Proposed by Ying-Chun Liu
Status: Rejected
Rejected by: Albert Astals Cid
Proposed branch: lp:~paulliu/unity/phablet-fake-peoplepreviewdata
Merge into: lp:unity/phablet
Diff against target: 212 lines (+106/-1)
7 files modified
plugins/Unity/peoplepreviewdata.cpp (+4/-0)
tests/qmltests/plugins/Unity/CMakeLists.txt (+5/-0)
tests/qmltests/plugins/Unity/fake_lens.cpp (+5/-1)
tests/qmltests/plugins/Unity/fake_lens.h (+5/-0)
tests/qmltests/plugins/Unity/fake_peoplepreviewdata.cpp (+53/-0)
tests/qmltests/plugins/Unity/fake_peoplepreviewdata.h (+32/-0)
tests/qmltests/plugins/Unity/fake_unity_plugin.cpp (+2/-0)
To merge this branch: bzr merge lp:~paulliu/unity/phablet-fake-peoplepreviewdata
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Disapprove
Michał Sawicz Needs Information
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+161514@code.launchpad.net

Commit message

Add fake PeoplePreviewData.

Description of the change

Add fake PeoplePreviewData.

To post a comment you must log in.
639. By Albert Astals Cid

fix comment
.

Approved by PS Jenkins bot, Daniel d'Andrada.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
640. By Daniel d'Andrada

Remove unused function.

Approved by PS Jenkins bot, Albert Astals Cid.

641. By Andrea Cimitan

A little tweak to improve the switch application animation.

Approved by PS Jenkins bot.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
642. By Daniel d'Andrada

Use real enum from ApplicationInfo instead of its counterfeit local version

Application from Ubuntu.Application got renamed to ApplicationInfo in the
real implementation to avoid conflict with the Application component from
QtQuick 2.0. Thus now we can use the enums from it.

Approved by PS Jenkins bot, Albert Astals Cid.

643. By Michael Zanetti

cleanup tests according to Daniel's comments.

Approved by PS Jenkins bot, Daniel d'Andrada.

644. By Daniel d'Andrada

Add missing import to SideStage.qml.

Approved by PS Jenkins bot.

645. By Nick Dedekind

Added gdb debugging (-g/--gdb) run_on_device option.

Approved by Albert Astals Cid, PS Jenkins bot.

646. By Albert Astals Cid

Fix spacing.

Approved by PS Jenkins bot, Gerry Boland.

647. By Daniel d'Andrada

Fixes search history in the dash.

It was giving out warnings about non-existing "root" variable.
Also the seach history ended up being per-lens instead of
being the same for all lenses.

Approved by Albert Astals Cid, PS Jenkins bot.

648. By Daniel d'Andrada

Correctly load icons when running on the desktop

Less warnings and more eye-candy.

Approved by Albert Astals Cid, PS Jenkins bot.

649. By Daniel d'Andrada

Don't use searchHistory if it's null

During initialization, searchHistory from DashMusic is null for a moment,
when called from onIsCurrentChanged()

With this safeguard, we have one less warning during initialization :).

Approved by PS Jenkins bot, Albert Astals Cid.

Revision history for this message
Albert Astals Cid (aacid) wrote :

What's the purpose of this class? Do you plan to add a test later that uses it?

Also, do we really need
pkg_search_module(SIGCPP sigc++-2.0 REQUIRED)
and all the other sigc things? Don't see you it used in other place other than an include

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
650. By Albert Astals Cid

Hud: Support having toolbar items enabled/disabled.

Approved by Gerry Boland, PS Jenkins bot.

651. By Ying-Chun Liu

Add test for PeopleFilterGrid.

Approved by PS Jenkins bot, Albert Astals Cid.

652. By Pete Woods

Make out of source builds work in sibling directories in addition to child ones.

Approved by PS Jenkins bot, Jussi Pakkanen.

653. By Albert Astals Cid

Hud: remove the app quit toolbar item.

Approved by PS Jenkins bot, Gerry Boland.

Revision history for this message
Ying-Chun Liu (paulliu) wrote :

We need this class to test DashPeople.
I'll fix the SIGC++ stuff.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

But this thing only has getters and almost not setters, maybe you can try to use it in the test? Because i am not seeing right now how it would be useful.

Also, maybe we could use the "real" ./plugins/Unity/peoplepreviewdata.h and you create a fake unity::dash::Preview::Ptr that gives the data? This way we test the peoplepreviewdata class too?

654. By Albert Astals Cid

Hud: No appstack anymore
.

Approved by PS Jenkins bot, Gerry Boland.

655. By Michael Terry

Clean up debian/control a bit and add qtubuntu Depend to the shell.

Approved by Albert Astals Cid, PS Jenkins bot.

656. By Michael Zanetti

Give PeoplePreview tests a better name.

Approved by PS Jenkins bot, Albert Astals Cid.

657. By Albert Astals Cid

Fix renaming in tst_PeoplePreview.qml.

Approved by PS Jenkins bot, Michael Zanetti.

658. By Michał Sawicz

drop support for quantal in build_script and update people lens revision.

Approved by Gerry Boland, PS Jenkins bot.

659. By Albert Astals Cid

Qt declarative needs libgl1-mesa-dri on runtime

Add it to our build depends so the tests do actually pass on jenkins.

Approved by PS Jenkins bot, Ying-Chun Liu, Gerry Boland, Michael Zanetti.

660. By Albert Astals Cid

Replace the wait(1) with a waitForRendering
.

Approved by PS Jenkins bot, Daniel d'Andrada.

661. By Michał Sawicz

add a check for multiple newlines at end of file to whitespace test.

Approved by PS Jenkins bot, Albert Astals Cid.

662. By Albert Astals Cid

Fix spacing.

Approved by PS Jenkins bot, Michał Sawicz.

663. By Daniel d'Andrada

Run tests for plugins/Utils as part of alltests target.

Approved by Albert Astals Cid, PS Jenkins bot.

664. By Albert Astals Cid

Need qtbase5-private-dev when using Qt 5.0.2
.

Approved by Michał Sawicz, PS Jenkins bot.

665. By Albert Astals Cid

Release 1.75
* Fix search history in the dash
* Hud: No appstack anymore
* Hud: Support having toolbar items enabled/disabled
* Hud: remove the app quit toolbar item
* Tweak to improve the switch application animation
* Correctly load icons when running on the desktop
* Use real enum from ApplicationInfo instead of its counterfeit local version
* Added gdb debugging (-g/--gdb) run_on_device option
* Drop support for quantal in build_unity script
* Make out of source builds work in sibling directories
* Clean up debian/control
* Build with the new Qt 5.0.2 packages
* Tests for:
  * IndicatorMenuWindow
  * PeopleFilterGrid.

Approved by Michał Sawicz, PS Jenkins bot.

666. By Albert Astals Cid

Remove ::get() in qsortfilterproxymodelqml

Using ::get() means that all the data of the model for a given row is obtained which in most of the cases is unnecessary and in some could mean getting expensive data. This data should be somewhere in the QML already so we should use that and not re-query it again.

Approved by Michał Sawicz, PS Jenkins bot.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
667. By Albert Astals Cid

Hud Result highlighting.

Approved by PS Jenkins bot, Gerry Boland, Daniel d'Andrada.

668. By Albert Astals Cid

Fix indent.

Approved by PS Jenkins bot, Michał Sawicz.

669. By Michał Sawicz

update CODING and build script to drop 12.10 references.

Approved by Albert Astals Cid, PS Jenkins bot.

670. By Michael Zanetti

update autopilot tests to work with autopilot 1.3.

Approved by Albert Astals Cid, PS Jenkins bot.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
671. By Andrea Cimitan

Implements DashBar using Panel Component.

Approved by Albert Astals Cid, PS Jenkins bot.

672. By Michael Terry

Add LightDM plugin that currently only has mock contents.

Approved by PS Jenkins bot, Michał Sawicz.

673. By Michael Terry

Make the larger autopilot test configuration slightly less tall to fit better on smaller laptop screens.

Approved by PS Jenkins bot, Michael Zanetti.

674. By Daniel d'Andrada

Move definition of main test targets to tests dir

- Relatioship between main test targets is made clear.
- We can now add sub-targets to qmluitests also from within tests/plugins for
  instance.

Approved by PS Jenkins bot, Michał Sawicz.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
675. By Mirco Müller

First basic NotificationRenderer (Frontend) for NotifyOSD NG. Ephemeral and 2-button snap-decision layout are support for a start. Using mocked up notification-data for the moment.

Approved by PS Jenkins bot, Michał Sawicz, Michael Zanetti.

676. By Michał Sawicz

Release 1.76

  [ Albert Astals Cid ]
  * Remove QSortFilterProxyModelQML::get() to ensure per-role fetching
  * Highlight matching strings in the HUD
  [ Michał Sawicz ]
  * Dropped support for 12.10
  [ Michael Zanetti ]
  * Update autopilot tests for 1.3 release
  [ Andrea Cimitan ]
  * Use SDK's Panel - enable swipe from bottom to reveal Dash bottom bar
  [ Michael Terry ]
  * Introduce a mock LightDM plugin to prepare for real switch
  [ Daniel d'Andrada ]
  * Move definition of global test targets to main tests CMakeLists file
  [ Mirco Müller ]
  * Introduce Notifications UI, currently only driven by tests

677. By Michael Zanetti

Tease the launcher when the user presses on the greeter.

Approved by PS Jenkins bot, Michał Sawicz.

678. By Albert Astals Cid

Fix tryCompare syntax in the PageHeader test

Also install the ubuntu font since we use it and otherwise the test
does not pass because font sizing is different plus some other tests
to make it easier to understand in the future if the tryCompare fails.

Approved by PS Jenkins bot, Michael Zanetti.

679. By Michał Sawicz

Packaging review / Fix Build-Depends and Depends.

Approved by PS Jenkins bot, Michael Terry.

680. By Daniel d'Andrada

Make it possible to send touch events from within QML test code.

You would normally have to resort to C++ for that.

Approved by PS Jenkins bot, Michal Sawicz.

681. By Daniel d'Andrada

New: DirectionalDragArea component

An area that detects axis-aligned single-finger drag gestures.

Approved by PS Jenkins bot, Michal Sawicz.

682. By Renato Araujo Oliveira Filho

Renamed Media player files to match with new application name.
Removed Media player from launch since this does not work as standalone application.

Approved by PS Jenkins bot, Michael Terry.

683. By Sergio Schvezov

Releasing.

Approved by PS Jenkins bot, Ricardo Salveti.

684. By Michał Sawicz

fix ListView-related tests for ListView fixes in Qt.

Approved by PS Jenkins bot, Daniel d'Andrada.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
685. By Daniel d'Andrada

New build option to convert QMouseEvents into QTouchEvents

You will need this if you want to interact with touch-only components (such as
the upcoming Launcher) using a mouse.

Needed only when manually testing on a desktop.

Approved by Michal Sawicz, PS Jenkins bot.

686. By Nick Dedekind

Indicator panel now available in greeter. Fixes: https://bugs.launchpad.net/bugs/1181249.

Approved by Michal Sawicz, PS Jenkins bot.

687. By Sergio Schvezov

Replacing the music and ski safari mock apps with calendar and weather in
the launcher. Fixes: https://bugs.launchpad.net/bugs/1178262.

Approved by Michal Sawicz, PS Jenkins bot.

688. By Michał Sawicz

fix run_on_device to disable mouse→touch conversion.

Approved by Daniel d'Andrada, PS Jenkins bot.

689. By Michael Terry

Split mock liblightdm into a demo version and a test version. Adds a new mock LightDM plugin too.

Approved by Michael Zanetti, PS Jenkins bot.

690. By Daniel d'Andrada

Make Launcher use DirectionalDragArea and simplify it

You can no longer left-drag to launch an app. You have to first bring
up the launcher and then tap on one of its icons.
Also removed some dead code (unused signals).

Approved by Michal Sawicz, PS Jenkins bot.

691. By Daniel d'Andrada

Fix MouseTouchAdaptor

Filter native, xbc, events instead of Qt ones in order to avoid converting mouse
events generated by Qt::AA_SynthesizeMouseForUnhandledTouchEvents, which would
cause an infinite loop of MouseEvent converted to TouchEvent -> Unhandled
TouchEvent converted to MouseEvent.

Approved by Michal Sawicz, PS Jenkins bot.

692. By Michał Sawicz

allow for overriding TARGET_IP and TARGET_SSH_PORT for run_on_device.

Approved by PS Jenkins bot, Michael Zanetti.

693. By Ying-Chun Liu

Add i18n support.

Approved by PS Jenkins bot, Michal Sawicz.

694. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

695. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

696. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

697. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

698. By Michał Sawicz

hide greeter onFocusRequested to unlock on accepted incoming call. Fixes: https://bugs.launchpad.net/bugs/1181654.

Approved by PS Jenkins bot, Michael Zanetti.

699. By Ying-Chun Liu

Don't update(msgmerge) *.po files everytime when build.

Approved by PS Jenkins bot, Michał Sawicz.

700. By Daniel d'Andrada

Launcher: Remove fold() unfold() functions as they're interfering with normal behavior

Launcher's "folding icons"/accordeon behavior was disabled a while ago but its
code is still there. After the replacement of DraggingArea with DirectionalDragArea
it began interfering with normal Launcher behavior. Since this code it not needed
anyway, it's simple to remove it than to make it "not interfere with anything"
once again.

Approved by PS Jenkins bot, Michał Sawicz.

701. By Ying-Chun Liu

wrap-and-sort for debian/*.

Approved by PS Jenkins bot, Michał Sawicz.

702. By Michael Terry

Add greeter support for a bunch of PAM/LightDM interactions like two-factor login, info and error messages, and color backgrounds.

Approved by Michael Zanetti, PS Jenkins bot.

703. By Nick Dedekind

Added DashContent tests.

Approved by Albert Astals Cid, PS Jenkins bot.

704. By Daniel d'Andrada

New: AxisVelocityCalculator in Ubuntu.Gestures module.

Approved by PS Jenkins bot, Michał Sawicz.

705. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

706. By Michał Sawicz

use device-services in run_on_device.

Approved by PS Jenkins bot, Michael Zanetti.

707. By Albert Astals Cid

Don't animate the FilterGrid.

Approved by PS Jenkins bot, Michał Sawicz.

708. By Daniel d'Andrada

Make autopilot tests use only touch instead of mouse

To better emulate what happens on real usage, as phone and tablet UIs are
touch (not mouse) operated.

Includes some minor refactoring here and there as well.

Approved by PS Jenkins bot, Michał Sawicz, Albert Astals Cid.

709. By Michael Zanetti

fix autopilot tests on the phone.

Approved by Michał Sawicz, PS Jenkins bot, Omer Akram.

710. By Michał Sawicz

Filter input through the greeter (Fixes lp:1185443). Fixes: https://bugs.launchpad.net/bugs/1185443.

Approved by Gerry Boland, PS Jenkins bot.

711. By Ying-Chun Liu

Add more strings for translation.

Approved by PS Jenkins bot, Michał Sawicz.

712. By Michał Sawicz

Release 1.78

  [ Sergio Schvezov ]
  * Replacing the music and ski safari mock apps with calendar and weather in
    the launcher (LP: #1178262).

  [ Daniel d'Andrada ]
  * Support pointer-to-touch event conversion for desktop testing.
  * Use DirectionalDragArea in the Launcher.
  * Add AxisVelocityCalculator component.
  * Use touch instead of pointer interaction in autopilot.

  [ Nick Dedekind ]
  * Enable indicators in greeter.
  * Add DashContent tests.

  [ Michael Terry ]
  * Split mock and test LightDM plugins.
  * Add support for more PAM/LightDM features in the greeter.

  [ Ying-Chun Liu (PaulLiu) ]
  * Add i18n support.
  * Add libc6-dev to Build-Depends.

  [ Michał Sawicz ]
  * Unlock onFocusRequested to unlock on incoming call (LP: #1181654).
  * Use device-services in run_on_device.
  * Filter input in greeter. (LP: #1185443).

  [ Albert Astals Cid ]
  * Remove FilterGrid dimensions bahavior.

  [ Ubuntu Translators Team ]
  * Added translations for 36 languages. Thanks!

  [ Michael Zanetti ]
  * Fix autopilot tests on devices.

Approved by PS Jenkins bot, Sergio Schvezov.

713. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

714. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

715. By Michael Terry

This branch changes the phablet greeter to look like the desktop greeter in a few ways:
 * No longer wraps the list of users
 * Shows four users above and below the current selection, rather than two
 * Squishes the spacing between names

To implement these changes, I made the greeter's PathView into a ListView. Tests have been changed to match.

Approved by PS Jenkins bot, Katie Taylor, Michael Zanetti.

716. By Ying-Chun Liu

Add strings in Panel for translation.

Approved by Albert Astals Cid, PS Jenkins bot.

717. By Michael Zanetti

Limit people lens to 50 entries for now as it consumes too much memory. People not shown any more can still be found when searching the lens. Fixes: https://bugs.launchpad.net/bugs/1091921.

Approved by PS Jenkins bot, Bill Filler.

718. By Gerry Boland

[window management] If shell in front, any focused application change should not steal focus from shell. This fix exposed an animation bug which is also fixed. Fixes: https://bugs.launchpad.net/bugs/1178288.

Approved by PS Jenkins bot, Michael Zanetti.

719. By Gerry Boland

[window-management] On activation, detect if application starting up or already running. If starting up, add a delay before hiding screenshots to give application time to draw its first frame, so the whole startup animation is smooth. Fixes visual regression.

Approved by PS Jenkins bot, Michael Zanetti.

720. By Michael Zanetti

release 1.79.

Approved by PS Jenkins bot, Gerry Boland.

721. By Michał Sawicz

unfocus and refocus apps on lock / unlock. Fixes: https://bugs.launchpad.net/bugs/1183113.

Approved by Sergio Schvezov, PS Jenkins bot, Ricardo Mendoza.

722. By Michał Sawicz

release 1.80

* Focus/unfocus apps on lock/unlock to make sure keyboard is hidden.

Approved by PS Jenkins bot.

723. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

724. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

725. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

726. By Michał Sawicz

move Greeter's InputFilterArea out to reduce animations on it.

Approved by PS Jenkins bot, Michael Zanetti.

727. By Ying-Chun Liu

Add skeleton for fake peoplepreviewdata.
Add missing member functions of peoplepreviewdata.

728. By Ying-Chun Liu

Add fake data.

729. By Ying-Chun Liu

fix indent -> 4.

730. By Ying-Chun Liu

fix indent again.

731. By Ying-Chun Liu

Change the header.

732. By Ying-Chun Liu

fix the crash of fake peoplepreviewdata.

733. By Ying-Chun Liu

Fix whitespace.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Hey, what's the status of this, shall I rebase on lp:unity/8.0?

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

Rejecting, we don't have people* stuff in unity8 anymore.

review: Disapprove

Unmerged revisions

733. By Ying-Chun Liu

Fix whitespace.

732. By Ying-Chun Liu

fix the crash of fake peoplepreviewdata.

731. By Ying-Chun Liu

Change the header.

730. By Ying-Chun Liu

fix indent again.

729. By Ying-Chun Liu

fix indent -> 4.

728. By Ying-Chun Liu

Add fake data.

727. By Ying-Chun Liu

Add skeleton for fake peoplepreviewdata.
Add missing member functions of peoplepreviewdata.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/peoplepreviewdata.cpp'
2--- plugins/Unity/peoplepreviewdata.cpp 2013-05-08 09:51:55 +0000
3+++ plugins/Unity/peoplepreviewdata.cpp 2013-06-03 12:49:26 +0000
4@@ -436,3 +436,7 @@
5 m_addressList.append(address);
6 }
7 }
8+
9+void PeoplePreviewData::setUnityPeoplePreview(const unity::dash::Preview::Ptr& preview) {
10+ setUnityPreview(uri().toStdString(), preview);
11+}
12
13=== modified file 'tests/qmltests/plugins/Unity/CMakeLists.txt'
14--- tests/qmltests/plugins/Unity/CMakeLists.txt 2013-05-02 16:38:00 +0000
15+++ tests/qmltests/plugins/Unity/CMakeLists.txt 2013-06-03 12:49:26 +0000
16@@ -6,6 +6,7 @@
17 pkg_search_module(DEE dee-1.0 REQUIRED)
18 pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
19 pkg_search_module(DEEQT libdee-qt5 REQUIRED)
20+pkg_check_modules(UNITYCORE REQUIRED unity-core-6.0)
21
22 include_directories(
23 ${CMAKE_SOURCE_DIR}/plugins/Unity
24@@ -14,6 +15,7 @@
25 ${Qt5Quick_INCLUDE_DIRS}
26 ${DEE_INCLUDE_DIRS}
27 ${DEEQT_INCLUDE_DIRS}
28+ ${UNITYCORE_INCLUDE_DIRS}
29 )
30
31 add_definitions(-DQT_NO_KEYWORDS)
32@@ -21,10 +23,12 @@
33 set(UnityQML_SOURCES
34 ${CMAKE_SOURCE_DIR}/plugins/Unity/categories.cpp
35 ${CMAKE_SOURCE_DIR}/plugins/Unity/categoryfilter.cpp
36+ ${CMAKE_SOURCE_DIR}/plugins/Unity/peoplepreviewdata.cpp
37 ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp
38 fake_lens.cpp
39 fake_lenses.cpp
40 fake_unity_plugin.cpp
41+ fake_peoplepreviewdata.cpp
42 )
43
44 add_library(FakeUnityQml MODULE ${UnityQML_SOURCES})
45@@ -33,6 +37,7 @@
46 ${Qt5Quick_LIBRARIES}
47 ${DEEQT_LDFLAGS}
48 ${GOBJECT_LDFLAGS}
49+ ${UNITYCORE_LDFLAGS}
50 )
51
52 qt5_use_modules(FakeUnityQml Qml)
53
54=== modified file 'tests/qmltests/plugins/Unity/fake_lens.cpp'
55--- tests/qmltests/plugins/Unity/fake_lens.cpp 2013-05-02 23:05:09 +0000
56+++ tests/qmltests/plugins/Unity/fake_lens.cpp 2013-06-03 12:49:26 +0000
57@@ -87,7 +87,11 @@
58 }
59
60 Categories* Lens::categories() const {
61- return m_categories;
62+ return m_categories;
63+}
64+
65+unity::dash::Lens::Ptr Lens::unityLens() const {
66+ return m_unityLens;
67 }
68
69 static const gchar * categories_model_schema[] = {
70
71=== modified file 'tests/qmltests/plugins/Unity/fake_lens.h'
72--- tests/qmltests/plugins/Unity/fake_lens.h 2013-05-02 16:38:00 +0000
73+++ tests/qmltests/plugins/Unity/fake_lens.h 2013-06-03 12:49:26 +0000
74@@ -21,6 +21,9 @@
75 #include <QObject>
76 #include "categories.h"
77
78+// libunity-core
79+#include <UnityCore/Lens.h>
80+
81 class Lens : public QObject
82 {
83 Q_OBJECT
84@@ -41,6 +44,7 @@
85
86 void setName(const QString &str);
87 void setSearchQuery(const QString &str);
88+ unity::dash::Lens::Ptr unityLens() const;
89
90 Categories* categories() const;
91
92@@ -58,6 +62,7 @@
93 bool m_visible;
94 Categories* m_categories;
95 DeeListModel* m_results;
96+ unity::dash::Lens::Ptr m_unityLens;
97 };
98
99 #endif // FAKE_LENS_H
100
101=== added file 'tests/qmltests/plugins/Unity/fake_peoplepreviewdata.cpp'
102--- tests/qmltests/plugins/Unity/fake_peoplepreviewdata.cpp 1970-01-01 00:00:00 +0000
103+++ tests/qmltests/plugins/Unity/fake_peoplepreviewdata.cpp 2013-06-03 12:49:26 +0000
104@@ -0,0 +1,53 @@
105+/* -*- tab-width: 8; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
106+/*
107+ * Copyright (C) 2012 Canonical, Ltd.
108+ *
109+ * Authors:
110+ * Ying-Chun Liu (PaulLiu) <paul.liu@canonical.com>
111+ *
112+ * This program is free software; you can redistribute it and/or modify
113+ * it under the terms of the GNU General Public License as published by
114+ * the Free Software Foundation; version 3.
115+ *
116+ * This program is distributed in the hope that it will be useful,
117+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
118+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
119+ * GNU General Public License for more details.
120+ *
121+ * You should have received a copy of the GNU General Public License
122+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
123+ */
124+
125+#include <iostream>
126+
127+#include "fake_peoplepreviewdata.h"
128+
129+#include <QDebug>
130+#include <UnityCore/PeoplePreview.h>
131+#include "fake_lens.h"
132+
133+FakePeoplePreviewData::FakePeoplePreviewData(QObject *parent)
134+ : PeoplePreviewData(parent)
135+{
136+ GVariantBuilder g_builder;
137+ g_variant_builder_init(&g_builder, G_VARIANT_TYPE_ARRAY);
138+ unity::variant::BuilderWrapper builder(&g_builder);
139+
140+ builder.add("display_name", "Bob Wang");
141+ builder.add("avatar", "");
142+ builder.add("favorite", false);
143+ GVariantBuilder g_builder_imaccount;
144+ g_variant_builder_init(&g_builder_imaccount, G_VARIANT_TYPE_ARRAY);
145+ g_variant_builder_add(&g_builder_imaccount, "(ss)", "jabber",
146+ "bob.wang@canonical.com");
147+ builder.add("imaccount", g_variant_new("a(ss)", &g_builder_imaccount));
148+
149+ unity::glib::Variant properties(
150+ g_variant_new("(ssssssa(sssua{sv})a(sssv)a{sv})",
151+ "preview-people","","","","","",NULL,NULL,&g_builder));
152+
153+ unity::dash::Preview::Ptr myFakePeoplePreview =
154+ unity::dash::Preview::PreviewForVariant(properties);
155+
156+ setUnityPeoplePreview(myFakePeoplePreview);
157+}
158
159=== added file 'tests/qmltests/plugins/Unity/fake_peoplepreviewdata.h'
160--- tests/qmltests/plugins/Unity/fake_peoplepreviewdata.h 1970-01-01 00:00:00 +0000
161+++ tests/qmltests/plugins/Unity/fake_peoplepreviewdata.h 2013-06-03 12:49:26 +0000
162@@ -0,0 +1,32 @@
163+/* -*- tab-width: 8; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
164+/*
165+ * Copyright (C) 2012 Canonical, Ltd.
166+ *
167+ * Authors:
168+ * Ying-Chun Liu (PaulLiu) <paul.liu@canonical.com>
169+ *
170+ * This program is free software; you can redistribute it and/or modify
171+ * it under the terms of the GNU General Public License as published by
172+ * the Free Software Foundation; version 3.
173+ *
174+ * This program is distributed in the hope that it will be useful,
175+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
176+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
177+ * GNU General Public License for more details.
178+ *
179+ * You should have received a copy of the GNU General Public License
180+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
181+ */
182+
183+#ifndef FAKE_PEOPLEPREVIEWDATA_H
184+#define FAKE_PEOPLEPREVIEWDATA_H
185+
186+#include "peoplepreviewdata.h"
187+
188+class FakePeoplePreviewData : public PeoplePreviewData
189+{
190+ public:
191+ FakePeoplePreviewData(QObject *parent = 0);
192+};
193+
194+#endif
195
196=== modified file 'tests/qmltests/plugins/Unity/fake_unity_plugin.cpp'
197--- tests/qmltests/plugins/Unity/fake_unity_plugin.cpp 2013-05-02 23:05:09 +0000
198+++ tests/qmltests/plugins/Unity/fake_unity_plugin.cpp 2013-06-03 12:49:26 +0000
199@@ -23,6 +23,7 @@
200 #include "fake_lenses.h"
201 #include "categories.h"
202 #include "categoryfilter.h"
203+#include "fake_peoplepreviewdata.h"
204
205 // External
206 #include <glib-object.h>
207@@ -40,4 +41,5 @@
208 qmlRegisterType<Lens>(uri, 0, 1, "Lens");
209 qmlRegisterType<Categories>(uri, 0, 1, "Categories");
210 qmlRegisterType<CategoryFilter>(uri, 0, 1, "CategoryFilter");
211+ qmlRegisterType<FakePeoplePreviewData>(uri, 0, 1, "PeoplePreviewData");
212 }

Subscribers

People subscribed via source and target branches