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
=== modified file 'plugins/Unity/peoplepreviewdata.cpp'
--- plugins/Unity/peoplepreviewdata.cpp 2013-05-08 09:51:55 +0000
+++ plugins/Unity/peoplepreviewdata.cpp 2013-06-03 12:49:26 +0000
@@ -436,3 +436,7 @@
436 m_addressList.append(address);436 m_addressList.append(address);
437 }437 }
438}438}
439
440void PeoplePreviewData::setUnityPeoplePreview(const unity::dash::Preview::Ptr& preview) {
441 setUnityPreview(uri().toStdString(), preview);
442}
439443
=== modified file 'tests/qmltests/plugins/Unity/CMakeLists.txt'
--- tests/qmltests/plugins/Unity/CMakeLists.txt 2013-05-02 16:38:00 +0000
+++ tests/qmltests/plugins/Unity/CMakeLists.txt 2013-06-03 12:49:26 +0000
@@ -6,6 +6,7 @@
6pkg_search_module(DEE dee-1.0 REQUIRED)6pkg_search_module(DEE dee-1.0 REQUIRED)
7pkg_search_module(GOBJECT gobject-2.0 REQUIRED)7pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
8pkg_search_module(DEEQT libdee-qt5 REQUIRED)8pkg_search_module(DEEQT libdee-qt5 REQUIRED)
9pkg_check_modules(UNITYCORE REQUIRED unity-core-6.0)
910
10include_directories(11include_directories(
11 ${CMAKE_SOURCE_DIR}/plugins/Unity12 ${CMAKE_SOURCE_DIR}/plugins/Unity
@@ -14,6 +15,7 @@
14 ${Qt5Quick_INCLUDE_DIRS}15 ${Qt5Quick_INCLUDE_DIRS}
15 ${DEE_INCLUDE_DIRS}16 ${DEE_INCLUDE_DIRS}
16 ${DEEQT_INCLUDE_DIRS}17 ${DEEQT_INCLUDE_DIRS}
18 ${UNITYCORE_INCLUDE_DIRS}
17)19)
1820
19add_definitions(-DQT_NO_KEYWORDS)21add_definitions(-DQT_NO_KEYWORDS)
@@ -21,10 +23,12 @@
21set(UnityQML_SOURCES23set(UnityQML_SOURCES
22 ${CMAKE_SOURCE_DIR}/plugins/Unity/categories.cpp24 ${CMAKE_SOURCE_DIR}/plugins/Unity/categories.cpp
23 ${CMAKE_SOURCE_DIR}/plugins/Unity/categoryfilter.cpp25 ${CMAKE_SOURCE_DIR}/plugins/Unity/categoryfilter.cpp
26 ${CMAKE_SOURCE_DIR}/plugins/Unity/peoplepreviewdata.cpp
24 ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp27 ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp
25 fake_lens.cpp28 fake_lens.cpp
26 fake_lenses.cpp29 fake_lenses.cpp
27 fake_unity_plugin.cpp30 fake_unity_plugin.cpp
31 fake_peoplepreviewdata.cpp
28)32)
2933
30add_library(FakeUnityQml MODULE ${UnityQML_SOURCES})34add_library(FakeUnityQml MODULE ${UnityQML_SOURCES})
@@ -33,6 +37,7 @@
33 ${Qt5Quick_LIBRARIES}37 ${Qt5Quick_LIBRARIES}
34 ${DEEQT_LDFLAGS}38 ${DEEQT_LDFLAGS}
35 ${GOBJECT_LDFLAGS}39 ${GOBJECT_LDFLAGS}
40 ${UNITYCORE_LDFLAGS}
36)41)
3742
38qt5_use_modules(FakeUnityQml Qml)43qt5_use_modules(FakeUnityQml Qml)
3944
=== modified file 'tests/qmltests/plugins/Unity/fake_lens.cpp'
--- tests/qmltests/plugins/Unity/fake_lens.cpp 2013-05-02 23:05:09 +0000
+++ tests/qmltests/plugins/Unity/fake_lens.cpp 2013-06-03 12:49:26 +0000
@@ -87,7 +87,11 @@
87}87}
8888
89Categories* Lens::categories() const {89Categories* Lens::categories() const {
90 return m_categories;90 return m_categories;
91}
92
93unity::dash::Lens::Ptr Lens::unityLens() const {
94 return m_unityLens;
91}95}
9296
93static const gchar * categories_model_schema[] = {97static const gchar * categories_model_schema[] = {
9498
=== modified file 'tests/qmltests/plugins/Unity/fake_lens.h'
--- tests/qmltests/plugins/Unity/fake_lens.h 2013-05-02 16:38:00 +0000
+++ tests/qmltests/plugins/Unity/fake_lens.h 2013-06-03 12:49:26 +0000
@@ -21,6 +21,9 @@
21#include <QObject>21#include <QObject>
22#include "categories.h"22#include "categories.h"
2323
24// libunity-core
25#include <UnityCore/Lens.h>
26
24class Lens : public QObject27class Lens : public QObject
25{28{
26 Q_OBJECT29 Q_OBJECT
@@ -41,6 +44,7 @@
4144
42 void setName(const QString &str);45 void setName(const QString &str);
43 void setSearchQuery(const QString &str);46 void setSearchQuery(const QString &str);
47 unity::dash::Lens::Ptr unityLens() const;
4448
45 Categories* categories() const;49 Categories* categories() const;
4650
@@ -58,6 +62,7 @@
58 bool m_visible;62 bool m_visible;
59 Categories* m_categories;63 Categories* m_categories;
60 DeeListModel* m_results;64 DeeListModel* m_results;
65 unity::dash::Lens::Ptr m_unityLens;
61};66};
6267
63#endif // FAKE_LENS_H68#endif // FAKE_LENS_H
6469
=== added file 'tests/qmltests/plugins/Unity/fake_peoplepreviewdata.cpp'
--- tests/qmltests/plugins/Unity/fake_peoplepreviewdata.cpp 1970-01-01 00:00:00 +0000
+++ tests/qmltests/plugins/Unity/fake_peoplepreviewdata.cpp 2013-06-03 12:49:26 +0000
@@ -0,0 +1,53 @@
1/* -*- tab-width: 8; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2/*
3 * Copyright (C) 2012 Canonical, Ltd.
4 *
5 * Authors:
6 * Ying-Chun Liu (PaulLiu) <paul.liu@canonical.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 3.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include <iostream>
22
23#include "fake_peoplepreviewdata.h"
24
25#include <QDebug>
26#include <UnityCore/PeoplePreview.h>
27#include "fake_lens.h"
28
29FakePeoplePreviewData::FakePeoplePreviewData(QObject *parent)
30 : PeoplePreviewData(parent)
31{
32 GVariantBuilder g_builder;
33 g_variant_builder_init(&g_builder, G_VARIANT_TYPE_ARRAY);
34 unity::variant::BuilderWrapper builder(&g_builder);
35
36 builder.add("display_name", "Bob Wang");
37 builder.add("avatar", "");
38 builder.add("favorite", false);
39 GVariantBuilder g_builder_imaccount;
40 g_variant_builder_init(&g_builder_imaccount, G_VARIANT_TYPE_ARRAY);
41 g_variant_builder_add(&g_builder_imaccount, "(ss)", "jabber",
42 "bob.wang@canonical.com");
43 builder.add("imaccount", g_variant_new("a(ss)", &g_builder_imaccount));
44
45 unity::glib::Variant properties(
46 g_variant_new("(ssssssa(sssua{sv})a(sssv)a{sv})",
47 "preview-people","","","","","",NULL,NULL,&g_builder));
48
49 unity::dash::Preview::Ptr myFakePeoplePreview =
50 unity::dash::Preview::PreviewForVariant(properties);
51
52 setUnityPeoplePreview(myFakePeoplePreview);
53}
054
=== added file 'tests/qmltests/plugins/Unity/fake_peoplepreviewdata.h'
--- tests/qmltests/plugins/Unity/fake_peoplepreviewdata.h 1970-01-01 00:00:00 +0000
+++ tests/qmltests/plugins/Unity/fake_peoplepreviewdata.h 2013-06-03 12:49:26 +0000
@@ -0,0 +1,32 @@
1/* -*- tab-width: 8; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2/*
3 * Copyright (C) 2012 Canonical, Ltd.
4 *
5 * Authors:
6 * Ying-Chun Liu (PaulLiu) <paul.liu@canonical.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 3.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef FAKE_PEOPLEPREVIEWDATA_H
22#define FAKE_PEOPLEPREVIEWDATA_H
23
24#include "peoplepreviewdata.h"
25
26class FakePeoplePreviewData : public PeoplePreviewData
27{
28 public:
29 FakePeoplePreviewData(QObject *parent = 0);
30};
31
32#endif
033
=== modified file 'tests/qmltests/plugins/Unity/fake_unity_plugin.cpp'
--- tests/qmltests/plugins/Unity/fake_unity_plugin.cpp 2013-05-02 23:05:09 +0000
+++ tests/qmltests/plugins/Unity/fake_unity_plugin.cpp 2013-06-03 12:49:26 +0000
@@ -23,6 +23,7 @@
23#include "fake_lenses.h"23#include "fake_lenses.h"
24#include "categories.h"24#include "categories.h"
25#include "categoryfilter.h"25#include "categoryfilter.h"
26#include "fake_peoplepreviewdata.h"
2627
27// External28// External
28#include <glib-object.h>29#include <glib-object.h>
@@ -40,4 +41,5 @@
40 qmlRegisterType<Lens>(uri, 0, 1, "Lens");41 qmlRegisterType<Lens>(uri, 0, 1, "Lens");
41 qmlRegisterType<Categories>(uri, 0, 1, "Categories");42 qmlRegisterType<Categories>(uri, 0, 1, "Categories");
42 qmlRegisterType<CategoryFilter>(uri, 0, 1, "CategoryFilter");43 qmlRegisterType<CategoryFilter>(uri, 0, 1, "CategoryFilter");
44 qmlRegisterType<FakePeoplePreviewData>(uri, 0, 1, "PeoplePreviewData");
43}45}

Subscribers

People subscribed via source and target branches