Merge lp:~mterry/libdbusmenu-qt/dont-show-more-icons-than-desired into lp:~agateau/libdbusmenu-qt/trunk

Proposed by Michael Terry
Status: Merged
Merge reported by: Aurélien Gâteau
Merged at revision: not available
Proposed branch: lp:~mterry/libdbusmenu-qt/dont-show-more-icons-than-desired
Merge into: lp:~agateau/libdbusmenu-qt/trunk
Diff against target: 16 lines (+5/-1)
1 file modified
src/dbusmenuexporter.cpp (+5/-1)
To merge this branch: bzr merge lp:~mterry/libdbusmenu-qt/dont-show-more-icons-than-desired
Reviewer Review Type Date Requested Status
Aurélien Gâteau Approve
Michael Terry (community) Needs Resubmitting
Review via email: mp+58387@code.launchpad.net

Description of the change

Respect QAction's setting for whether an icon should be shown in the menu or not.

To post a comment you must log in.
Revision history for this message
Aurélien Gâteau (agateau) wrote :

Hi Michael,

The patch looks good, it only need some coding style fixes:
- 4-space indents
- curly braces around if and else blocks

Thanks!

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote :

Whoops! Updated.

review: Needs Resubmitting
209. By Michael Terry

style fixes

Revision history for this message
Aurélien Gâteau (agateau) wrote :

Your changes broke the unit tests, but I fixed them and added one test to test the new code. It is merged now, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dbusmenuexporter.cpp'
2--- src/dbusmenuexporter.cpp 2011-02-24 16:29:54 +0000
3+++ src/dbusmenuexporter.cpp 2011-04-27 13:09:30 +0000
4@@ -358,7 +358,11 @@
5 DMRETURN_VALUE_IF_FAIL(action, QString());
6 #ifdef HAVE_QICON_NAME
7 QIcon icon = action->icon();
8- return icon.isNull() ? QString() : icon.name();
9+ if (action->isIconVisibleInMenu() && !icon.isNull()) {
10+ return icon.name();
11+ } else {
12+ return QString();
13+ }
14 #else
15 return QString();
16 #endif

Subscribers

People subscribed via source and target branches