Merge lp://staging/~nick-dedekind/qmenumodel/lp1385331.led into lp://staging/qmenumodel

Proposed by Nick Dedekind
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 117
Merged at revision: 115
Proposed branch: lp://staging/~nick-dedekind/qmenumodel/lp1385331.led
Merge into: lp://staging/qmenumodel
Diff against target: 117 lines (+38/-2)
3 files modified
debian/changelog (+6/-0)
libqmenumodel/src/qdbusactiongroup.cpp (+23/-2)
libqmenumodel/src/qdbusactiongroup.h (+9/-0)
To merge this branch: bzr merge lp://staging/~nick-dedekind/qmenumodel/lp1385331.led
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+241422@code.staging.launchpad.net

Commit message

Add support for overriding QDBusActionGroup state parser

Description of the change

Add support for overriding QDBusActionGroup state parser

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
116. By Nick Dedekind

bump version

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: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Should we delete m_actionStateParser in m_actionStateParser ?

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

I meant:

Should we delete m_actionStateParser in setActionStateParser ?

Revision history for this message
Albert Astals Cid (aacid) wrote :

But...

Having a look at how setActionStateParser is used in https://code.launchpad.net/~nick-dedekind/unity8/lp1385331.led/+merge/241417 it seems it should not be deleted, but the code still makes me a bit unhappy since it's the typical structure in which you need to delete m_actionStateParser otherwise you leak the one you created in the constructor.

What about instead this change adding a
  Q_INVOKABLE QVariant actionState(const QString &name, ActionStateParser* actionStateParser);
?

So if it is passed you use it and otherwise you use Converter::toQVariant ?

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

After reading the code more i see my suggestion is not implementable without a big-ish rework (and maybe not at all) so i'll be happy enough if you add a comment to setActionStateParser saying that the class does not take ownership of actionStateParser

review: Needs Fixing
117. By Nick Dedekind

added comment

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> After reading the code more i see my suggestion is not implementable without a
> big-ish rework (and maybe not at all) so i'll be happy enough if you add a
> comment to setActionStateParser saying that the class does not take ownership
> of actionStateParser

done

Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches