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
=== modified file 'src/dbusmenuexporter.cpp'
--- src/dbusmenuexporter.cpp 2011-02-24 16:29:54 +0000
+++ src/dbusmenuexporter.cpp 2011-04-27 13:09:30 +0000
@@ -358,7 +358,11 @@
358 DMRETURN_VALUE_IF_FAIL(action, QString());358 DMRETURN_VALUE_IF_FAIL(action, QString());
359#ifdef HAVE_QICON_NAME359#ifdef HAVE_QICON_NAME
360 QIcon icon = action->icon();360 QIcon icon = action->icon();
361 return icon.isNull() ? QString() : icon.name();361 if (action->isIconVisibleInMenu() && !icon.isNull()) {
362 return icon.name();
363 } else {
364 return QString();
365 }
362#else366#else
363 return QString();367 return QString();
364#endif368#endif

Subscribers

People subscribed via source and target branches