Merge lp:~timo-jyrinki/ubuntu-ui-toolkit/qt55_handler_type_qvector into lp:ubuntu-ui-toolkit/staging

Proposed by Timo Jyrinki
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1659
Merged at revision: 1699
Proposed branch: lp:~timo-jyrinki/ubuntu-ui-toolkit/qt55_handler_type_qvector
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 25 lines (+2/-2)
2 files modified
src/Ubuntu/Components/plugin/unixsignalhandler_p.cpp (+1/-1)
src/Ubuntu/Components/plugin/unixsignalhandler_p.h (+1/-1)
To merge this branch: bzr merge lp:~timo-jyrinki/ubuntu-ui-toolkit/qt55_handler_type_qvector
Reviewer Review Type Date Requested Status
Zsombor Egri Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+272604@code.launchpad.net

Commit message

Change HandlerType from int[2] to QVector<int> to make it work with Qt 5.5 (LP: #1484004) (LP: #1450346)

To post a comment you must log in.
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: Needs Fixing (continuous-integration)
1657. By Timo Jyrinki

Initialize the vector so that it works.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

This now seems to work!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1658. By Timo Jyrinki

Fix copy-paste typo.

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 :

I think personally (non SDK guy) I'd be happier with

    typedef struct {
        int first[2];
        QSocketNotifier *second;
    } HandlerType;

than using a QVector.

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

Or maybe

    typedef QPair<std::array<int, 2>, QSocketNotifier*> HandlerType;
    if (::socketpair(AF_UNIX, SOCK_STREAM, 0, handler.first.data())) {

that saves us from neededing handler.first.resize(2);

1659. By Timo Jyrinki

Change to the simpler method suggested.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Thanks, changed to the latter so it's just two lines change now.

Tested build at https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/landing-012/+sourcepub/5563574/+listing-archive-extra and camera still works after upgrading (one of the users of it).

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Good to go.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/plugin/unixsignalhandler_p.cpp'
2--- src/Ubuntu/Components/plugin/unixsignalhandler_p.cpp 2014-03-17 11:57:53 +0000
3+++ src/Ubuntu/Components/plugin/unixsignalhandler_p.cpp 2015-10-22 14:30:41 +0000
4@@ -48,7 +48,7 @@
5 qFatal("UNIX signal registration error");
6 }
7 HandlerType handler;
8- if (::socketpair(AF_UNIX, SOCK_STREAM, 0, handler.first)) {
9+ if (::socketpair(AF_UNIX, SOCK_STREAM, 0, handler.first.data())) {
10 qFatal("Cannot create signal socketpair");
11 }
12 handler.second = new QSocketNotifier(handler.first[1], QSocketNotifier::Read, this);
13
14=== modified file 'src/Ubuntu/Components/plugin/unixsignalhandler_p.h'
15--- src/Ubuntu/Components/plugin/unixsignalhandler_p.h 2014-02-06 15:04:43 +0000
16+++ src/Ubuntu/Components/plugin/unixsignalhandler_p.h 2015-10-22 14:30:41 +0000
17@@ -32,7 +32,7 @@
18 Terminate = SIGTERM
19 };
20
21- typedef QPair<int[2], QSocketNotifier*> HandlerType;
22+ typedef QPair<std::array<int, 2>, QSocketNotifier*> HandlerType;
23
24 static UnixSignalHandler &instance()
25 {

Subscribers

People subscribed via source and target branches