Merge lp:~uriboni/unity-2d/panel-check-valid-applet into lp:unity-2d/3.0

Proposed by Ugo Riboni
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 675
Merged at revision: 675
Proposed branch: lp:~uriboni/unity-2d/panel-check-valid-applet
Merge into: lp:unity-2d/3.0
Diff against target: 17 lines (+6/-1)
1 file modified
panel/app/panelmanager.cpp (+6/-1)
To merge this branch: bzr merge lp:~uriboni/unity-2d/panel-check-valid-applet
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
Review via email: mp+71834@code.launchpad.net

Description of the change

[panel] Check that the applet returned by plugins is valid before using it

To post a comment you must log in.
Revision history for this message
Alberto Mardegan (mardy) wrote :

Cool, plugin writers are warned! :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/app/panelmanager.cpp'
2--- panel/app/panelmanager.cpp 2011-08-17 09:21:18 +0000
3+++ panel/app/panelmanager.cpp 2011-08-17 09:45:28 +0000
4@@ -157,7 +157,12 @@
5 } else {
6 if (screen == leftmost || !onlyLeftmost) {
7 QWidget *applet = provider->createApplet();
8- panel->addWidget(applet);
9+ if (applet == 0) {
10+ qWarning() << "The panel applet plugin for" << appletName
11+ << "did not return a valid plugin.";
12+ } else {
13+ panel->addWidget(applet);
14+ }
15 }
16 }
17 }

Subscribers

People subscribed via source and target branches

to all changes: