Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/noDepNoteForComponents into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1521
Merged at revision: 1522
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/noDepNoteForComponents
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 26 lines (+9/-0)
1 file modified
modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp (+9/-0)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/noDepNoteForComponents
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+260302@code.launchpad.net

Commit message

No deprecation notes for our own components

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Small request, and good to go.

review: Needs Fixing
Revision history for this message
Zsombor Egri (zsombi) wrote :

Much better :) Thanks!

review: Approve
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
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp'
2--- modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp 2015-05-18 05:42:05 +0000
3+++ modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp 2015-05-27 18:03:19 +0000
4@@ -23,6 +23,7 @@
5 #include <QtQml/QQmlComponent>
6 #include <QtQml/QQmlContext>
7 #include <QtQml/QQmlInfo>
8+#include <QtQml/QQmlEngine>
9
10 /*!
11 \qmltype Theme
12@@ -74,6 +75,14 @@
13
14 void UCDeprecatedTheme::showDeprecatedNote(QObject *onItem, const char *note)
15 {
16+ QQmlContext ctx(QQmlEngine::contextForObject(onItem));
17+ // No warnings due to deprecated code used in the components themselves
18+ if (ctx.baseUrl().toString().contains("/Ubuntu/Components/"))
19+ return;
20+ // Warnings without a filename are not helpful
21+ if (ctx.baseUrl().isEmpty())
22+ return;
23+
24 QString noteId(QString("%1.%2").arg(note).arg(onItem->metaObject()->className()));
25 if (m_notes.contains(noteId))
26 return;

Subscribers

People subscribed via source and target branches