Merge lp:~gnumdk/libdbusmenu-qt/fix-dropdown-firefox into lp:libdbusmenu-qt

Proposed by Cédric Bellegarde
Status: Rejected
Rejected by: Albert Astals Cid
Proposed branch: lp:~gnumdk/libdbusmenu-qt/fix-dropdown-firefox
Merge into: lp:libdbusmenu-qt
Diff against target: 28 lines (+10/-1)
1 file modified
src/dbusmenuimporter.cpp (+10/-1)
To merge this branch: bzr merge lp:~gnumdk/libdbusmenu-qt/fix-dropdown-firefox
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Disapprove
PS Jenkins bot (community) continuous-integration Needs Fixing
Charles Kerr (community) Approve
Review via email: mp+152920@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Cédric Bellegarde (gnumdk) wrote :

ping? Kubuntu 13.04 will be released soon with this bug :-(

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I think it's fine... Why hasn't Jenkins picked it up?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Or perhaps this simply isn't under CI :)

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

Looks good, this same fix has been used in other places, such as https://code.launchpad.net/~chrisccoulson/unity-2d/lp1010466/+merge/110075.

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

Approving to trigger CI as instructed by alesage :)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

My previous comment was smoking crack, we don't want to add an X11 dependency here or the package will fail when X isn't available.

Cédric, is there a more portable way of achieving the same ends?

241. By Cédric Bellegarde

Check for X11 availability

Revision history for this message
Cédric Bellegarde (gnumdk) wrote :

Is last commit ok ?

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

Well if we're going with that route, it would be better to test for #if defined(Q_WS_X11) ... CI is still going to fail with this new revision.

However since Mir and Wayland are gaining steam, I'd prefer if there was a fix that wasn't dependent on QX11Info. The Qt documentation for QX11AppInfo.appTime() only says "Returns the X11 time", so I'm not sure what the patch is doing.

Is there a portable alternative to using QX11AppInfo.appTime()?

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

For the benefit of other reviewers, this patch is based on a fix for a similar old Unity 2D issue tracked in bug #1010466 which had an excellent summary writeup by Chris Coulson @ https://bugs.launchpad.net/unity-2d/+bug/1010466/comments/22

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

...actually, even if we use some portable monotonically increasing timestamp, that still won't work because it'll disagree with the X11 time that gdk is passing along to FF elsewhere. So in the absence of a better solution we should try to use the X11 timestamp when available and keep the old behavior the rest of the time.

Cédric, please add the #ifdef wrappers and we'll run it through CI again, something like:

#if defined(Q_WS_X11)
#include <QX11Info>
#endif

...

#if defined(Q_WS_X11)
        // https://bugs.launchpad.net/libdbusmenu-qt/+bug/1027784
 uint timestamp = QX11Info::appTime();
#else
        timestamp = QDateTime::currentDateTime().toTime_t();
#endif

242. By Cédric Bellegarde

Check for Q_WS_X11

Revision history for this message
Joseph Yasi (joe-yasi) wrote :

That change will build, but the same wrong timestamp problem with happen when used with QT5. I've updated the patch to use the new QPA X11 features of QT5:
https://bugs.launchpad.net/ubuntu/+source/libdbusmenu-qt/+bug/1035755/+attachment/3621848/+files/fix-x-apptime.patch

QT5.1 will add QX11Info again.

Revision history for this message
Cédric Bellegarde (gnumdk) wrote :

Any plan to commit last patch version ? :-)

I receive a lot of bug reports like this:

https://bugs.kde.org/show_bug.cgi?id=318837

Revision history for this message
Cédric Bellegarde (gnumdk) wrote :

Charles Kerr?

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

Unmerged revisions

242. By Cédric Bellegarde

Check for Q_WS_X11

241. By Cédric Bellegarde

Check for X11 availability

240. By Cédric Bellegarde

Fix dropdown menus in Firefox

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dbusmenuimporter.cpp'
2--- src/dbusmenuimporter.cpp 2012-03-29 12:45:27 +0000
3+++ src/dbusmenuimporter.cpp 2013-04-18 12:31:26 +0000
4@@ -35,6 +35,10 @@
5 #include <QToolButton>
6 #include <QWidgetAction>
7
8+#ifdef Q_WS_X11
9+#include <QX11Info>
10+#endif
11+
12 // Local
13 #include "dbusmenutypes_p.h"
14 #include "dbusmenushortcut_p.h"
15@@ -276,7 +280,12 @@
16 void sendEvent(int id, const QString &eventId)
17 {
18 QVariant empty = QVariant::fromValue(QDBusVariant(QString()));
19- uint timestamp = QDateTime::currentDateTime().toTime_t();
20+ uint timestamp;
21+ #ifdef Q_WS_X11
22+ timestamp = QX11Info::appTime();
23+ #else
24+ timestamp = QDateTime::currentDateTime().toTime_t();
25+ #endif
26 m_interface->asyncCall("Event", id, eventId, empty, timestamp);
27 }
28 };

Subscribers

People subscribed via source and target branches

to all changes: