Merge lp://staging/~aacid/qmenumodel/aboutToShow into lp://staging/qmenumodel

Proposed by Albert Astals Cid
Status: Merged
Approved by: Charles Kerr
Approved revision: 132
Merged at revision: 130
Proposed branch: lp://staging/~aacid/qmenumodel/aboutToShow
Merge into: lp://staging/qmenumodel
Diff against target: 96 lines (+51/-2)
3 files modified
debian/changelog (+7/-0)
libqmenumodel/src/unitymenumodel.cpp (+42/-1)
libqmenumodel/src/unitymenumodel.h (+2/-1)
To merge this branch: bzr merge lp://staging/~aacid/qmenumodel/aboutToShow
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+319078@code.staging.launchpad.net

Commit message

Call about to show for those items that have a qtubuntu-tag property

To post a comment you must log in.
130. By Albert Astals Cid

Increase version because of new api

Revision history for this message
dobey (dobey) :
Revision history for this message
Charles Kerr (charlesk) wrote :

comments inline

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

I will add all those auto, but those are *totally* not on the style of the rest of the file, basically the file has 0 auto variables.

> You probably meant to use -1 here to use the default timeout? I'm not sure what specifying a timeout of 0msec would do but it's probably not good
No, I don't want the default timeout, i simply want no timeout, it either works or doesn't, i don't see why it's "probably not good" to use a 0 timeout

> Not a blocker, but want to confirm that you meant to not provide a callback here so that you can log any errors reported by g_dbus_connection_call_finish(), yes?
Yes, if you want I can add error reporting, but don't think it's going to give us much tbh.

131. By Albert Astals Cid

Review improvements

Revision history for this message
Charles Kerr (charlesk) wrote :

> I will add all those auto, but those are *totally* not on the style of the
> rest of the file, basically the file has 0 auto variables.

No worries, as I said those were trivial comments. Redundant type info
is bad, but inconsistency is also bad, pick your minor poison :)

> > You probably meant to use -1 here to use the default timeout? I'm not sure
> what specifying a timeout of 0msec would do but it's probably not good
> No, I don't want the default timeout, i simply want no timeout, it either
> works or doesn't, i don't see why it's "probably not good" to use a 0 timeout

Because the docs say use G_MAXINT for no timeout.

g_dbus_connection_call() is in gdbusconnection.c, which the call down a few steps.
The timeout is applied in g_dbus_connection_send_message_with_reply_unlocked(),
which reads:

  if (timeout_msec != G_MAXINT)
    {
      data->timeout_source = g_timeout_source_new (timeout_msec);
      g_task_attach_source (task, data->timeout_source,
                            (GSourceFunc) send_message_with_reply_timeout_cb);
      g_source_unref (data->timeout_source);
    }

I /think/ you are effectively asking the call to timeout asap.

> > Not a blocker, but want to confirm that you meant to not provide a callback
> here so that you can log any errors reported by
> g_dbus_connection_call_finish(), yes?
> Yes, if you want I can add error reporting, but don't think it's going to give
> us much tbh.

Agreed that it's minor.

Keeping as NF for the G_MAXINT issue

review: Needs Fixing
132. By Albert Astals Cid

0 -> G_MAXINT as found by Charles

Revision history for this message
Charles Kerr (charlesk) :
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