Merge lp://staging/~macslow/unity-notifications/modal-snap-decisions into lp://staging/unity-notifications

Proposed by Mirco Müller
Status: Merged
Approved by: Michał Sawicz
Approved revision: 210
Merged at revision: 203
Proposed branch: lp://staging/~macslow/unity-notifications/modal-snap-decisions
Merge into: lp://staging/unity-notifications
Diff against target: 195 lines (+37/-38)
5 files modified
debian/control (+2/-2)
include/NotificationModel.h (+0/-14)
src/CMakeLists.txt (+4/-0)
src/NotificationModel.cpp (+27/-22)
src/NotificationPlugin.cpp (+4/-0)
To merge this branch: bzr merge lp://staging/~macslow/unity-notifications/modal-snap-decisions
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid (community) Approve
Michael Zanetti (community) Needs Information
Review via email: mp+212483@code.staging.launchpad.net

Commit message

Make the Roles enum available to QML.

Description of the change

Make the Roles enum available to QML.

This is needed for the MR https://code.launchpad.net/~macslow/unity8/modal-snap-decisions/+merge/210988 to work with.

* Are there any related MPs required for this MP to build/function as expected? Please list.
Yes. https://code.launchpad.net/~macslow/unity-api/version-bump-to-0.1.3/+merge/216122 needs to land before this one will work.

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes.

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Yes.

* If you changed the UI, has there been a design review?
Not applicable.

To post a comment you must log in.
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Hmm... I think this should rather be defined in lp:unity-api and teted for its existence here in tst_NotificaitonInterface.qml, no?

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

Yeah, please submit a similar thing to lp:unity-api, even though this is not using it yet (it should!), let's keep it as close as possible.

Revision history for this message
Mirco Müller (macslow) wrote :

Just working on that.

Revision history for this message
Mirco Müller (macslow) wrote :
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Even though this model doesn't inherit the one from unity-api yet, I'm wondering if it wouldn't make sense to already now use the enums in there. Without having tested it, do you think we could just drop the enum definition in here and use ModelInterface::Roles everywhere in here already? Otherwise I see it drifting apart again.

review: Needs Information
Revision history for this message
Mirco Müller (macslow) wrote :

Ill will make sure we can use the enum from unity-api as drop-in here and see that it will still work (or make it work) with https://code.launchpad.net/~macslow/unity8/modal-snap-decisions/+merge/210988

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)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Q_ENUMS(Roles) seems like it should go away

review: Needs Fixing
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 :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes, still works

* Did CI run pass? If not, please explain why.
Yes.

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

This needs a bump in unity-notifications-impl provided, to go with a bump in a .pc file bump in unity-api.

See https://code.launchpad.net/~macslow/unity8/modal-snap-decisions/+merge/210988/comments/512330 for details.

review: Needs Fixing
206. By Mirco Müller

Make unity-notifications require at least unity-api 0.1.3 and thus also bump the Provides to unity-notifications-impl-3.

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

You're right, in a sense, that this implements both v2 and v3 of the Notifications API, but I don't think we're at the point where we care. Just drop the -impl-2 and replace with -impl-3 please.

The whole idea is like so:
unity-api defines the API by providing headers, for each group of interfaces (application, notifications etc.), there's a pkg-config file (i.e. unity-notifications.pc), which in the Version field defines the version of the API implemented. Right now it's manual, but we'll make it automagic, that unity-notifications-impl-$version will be generated from this .pc file.

Then, any consumer of this API (unity8 in our case) depends on $default-implementation-real-package | unity-$interface-impl, unity-$interface-impl-$version. We wouldn't need the first bit, but dpkg would choke on only-virtual dependency like that.

On top of that, the unity-api tests will be ran against the actual implementation to verify the expected API.

Makes some sense now? The idea is to ensure shell-facing API stability and allow for easy drop-in replacements, as long as they implement the same interfaces.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

This needs to build-depend on libunity-api-dev >= 7.80.7.

review: Needs Fixing
207. By Mirco Müller

Make sure to depend on the new upstream-version of libunity-api-dev

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

18 + unity-notifications-impl-2,
19 + unity-notifications-impl-3

See my previous comment - replace, don't add.

=====

54 +pkg_check_modules(NOTIFICATIONS_API REQUIRED unity-shell-notifications=1)

This version should be the same as -impl, so 3.

=====

76 +/* check if unity-api >= 0.1.3 */
77 +#include <unity/api/Version.h>
78 +#if UNITY_API_VERSION_MAJOR > 0 || \
79 + (UNITY_API_VERSION_MAJOR == 0 && (UNITY_API_VERSION_MINOR > 1 || \
80 + (UNITY_API_VERSION_MINOR == 1 && \
81 + UNITY_API_VERSION_MICRO < 3)))
82 + #error Unity-API needs to be at least 0.1.3
83 +#endif

You're not using that part of unity-api at all, so all that is not needed.

review: Needs Fixing
208. By Mirco Müller

Just bump the required unity-notification version on the packaging-side of things.

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

See https://code.launchpad.net/~macslow/unity-api/version-bump-to-0.1.3/+merge/217882/comments/518636, bump the build-depends to (>= 7.80.8).

Also, parentheses are required in dependencies!

You might want to run `wrap-and-sort -atv` to make sure of all the formatting in debian/ is good.

review: Needs Fixing
209. By Mirco Müller

Addes missing parentheses.

210. By Mirco Müller

Another version-bump in the dependency was needed, because another branch was merged to trunk before.

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)
Revision history for this message
Michał Sawicz (saviq) wrote :

Yup.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: