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
=== modified file 'modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp'
--- modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp 2015-05-18 05:42:05 +0000
+++ modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp 2015-05-27 18:03:19 +0000
@@ -23,6 +23,7 @@
23#include <QtQml/QQmlComponent>23#include <QtQml/QQmlComponent>
24#include <QtQml/QQmlContext>24#include <QtQml/QQmlContext>
25#include <QtQml/QQmlInfo>25#include <QtQml/QQmlInfo>
26#include <QtQml/QQmlEngine>
2627
27/*!28/*!
28 \qmltype Theme29 \qmltype Theme
@@ -74,6 +75,14 @@
7475
75void UCDeprecatedTheme::showDeprecatedNote(QObject *onItem, const char *note)76void UCDeprecatedTheme::showDeprecatedNote(QObject *onItem, const char *note)
76{77{
78 QQmlContext ctx(QQmlEngine::contextForObject(onItem));
79 // No warnings due to deprecated code used in the components themselves
80 if (ctx.baseUrl().toString().contains("/Ubuntu/Components/"))
81 return;
82 // Warnings without a filename are not helpful
83 if (ctx.baseUrl().isEmpty())
84 return;
85
77 QString noteId(QString("%1.%2").arg(note).arg(onItem->metaObject()->className()));86 QString noteId(QString("%1.%2").arg(note).arg(onItem->metaObject()->className()));
78 if (m_notes.contains(noteId))87 if (m_notes.contains(noteId))
79 return;88 return;

Subscribers

People subscribed via source and target branches