Ubuntu Pastebin

Paste from ubuntu at Tue, 31 Mar 2015 13:55:30 +0000

Download as text
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
=== modified file 'debian/changelog'
--- debian/changelog	2015-03-12 14:44:31 +0000
+++ debian/changelog	2015-03-31 12:29:46 +0000
@@ -1,3 +1,33 @@
+qtbase-opensource-src (5.4.1+dfsg-2ubuntu5) vivid; urgency=medium
+
+  * Patches for fixing DBus behavior (LP: #1421009):
+    - debian/patches/Implement-the-blocking-QtDBus-call-in-terms-of-the-n.patch
+    - debian/patches/Make-QDBusConnectionPrivate-send-return-bool.patch
+    - debian/patches/Move-the-sending-of-the-D-Bus-messages-with-reply-to.patch
+    - debian/patches/Remove-superfluous-code-in-QDBusConnectionPrivate-se.patch
+    - debian/patches/Simplify-some-code-in-QDBusConnectionPrivate-sendWit.patch
+    - debian/patches/Use-QDBusConnectionPrivate-when-QDBusServer-receives.patch
+    - debian/patches/Use-QDBusServiceWatcher-in-QDBusAbstractInterface-to.patch
+    - debian/patches/Use-a-dedicated-thread-for-handling-incoming-libdbus.patch
+    - debian/patches/Use-a-signal-for-updating-the-dispatch-status.patch
+    - debian/patches/And-move-the-sending-of-other-types-of-D-Bus-message.patch
+    - debian/patches/Remove-the-event-callbacks-in-QDBusConnectionPrivate.patch
+    - debian/patches/QDBusServiceWatcher-Move-the-logic-to-QDBusConnectio.patch
+    - debian/patches/Use-the-new-QDBusConnectionPrivate-shouldWatchServic.patch
+    - debian/patches/Make-QDBusConnectionPrivate-getNameOwnerNoCache-work.patch
+    - debian/patches/Bypass-connectSignal-for-receiving-the-NameOwnerChan.patch
+    - debian/patches/Make-sure-we-don-t-deadlock-when-connecting-signals.patch
+
+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com>  Fri, 20 Mar 2015 13:24:17 +0000
+
+qtbase-opensource-src (5.4.1+dfsg-2ubuntu4) vivid; urgency=medium
+
+  * debian/patches/upstream_xcb_use_themed_cursor.patch:
+    - backport upstream fix to use properly themed cursors under x11
+      (lp: #1277020)
+
+ -- Sebastien Bacher <seb128@ubuntu.com>  Tue, 31 Mar 2015 11:19:32 +0200
+
 qtbase-opensource-src (5.4.1+dfsg-2ubuntu3) vivid; urgency=medium
 
   * New upstream release. (LP: #1427560)

=== added file 'debian/patches/And-move-the-sending-of-other-types-of-D-Bus-message.patch'
--- debian/patches/And-move-the-sending-of-other-types-of-D-Bus-message.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/And-move-the-sending-of-other-types-of-D-Bus-message.patch	2015-03-24 11:30:58 +0000
@@ -0,0 +1,97 @@
+From a0bf5e824d3cb60e070055a58dd5daca2297ac2a Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 19:47:54 -0200
+Subject: [PATCH] And move the sending of other types of D-Bus messages to the
+ thread
+
+With this, we now know that all messages sent are sent from the same
+thread. This simplifies greatly the handling of the socket.
+
+Task-number: QTBUG-43585
+Change-Id: Ic5d393bfd36e48a193fcffff13b73758087344ed
+---
+ src/dbus/qdbusconnection_p.h  |  2 +-
+ src/dbus/qdbusintegrator.cpp  | 23 +++++++++++++----------
+ src/dbus/qdbusthreaddebug_p.h |  2 +-
+ 3 files changed, 15 insertions(+), 12 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index c75e47d..2869982 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -272,7 +272,7 @@ private slots:
+ 
+ signals:
+     void dispatchStatusChanged();
+-    void messageNeedsSending(QDBusPendingCallPrivate *pcall, void *msg, int timeout);
++    void messageNeedsSending(QDBusPendingCallPrivate *pcall, void *msg, int timeout = -1);
+     void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
+     void callWithCallbackFailed(const QDBusError &error, const QDBusMessage &message);
+     void newServerConnection(QDBusConnectionPrivate *newConnection);
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 907dea5..829614a 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1864,13 +1864,9 @@ bool QDBusConnectionPrivate::send(const QDBusMessage& message)
+     }
+ 
+     q_dbus_message_set_no_reply(msg, true); // the reply would not be delivered to anything
+-
+     qDBusDebug() << this << "sending message (no reply):" << message;
+-    checkThread();
+-    QDBusDispatchLocker locker(SendMessageAction, this);
+-    bool isOk = q_dbus_connection_send(connection, msg, 0);
+-    q_dbus_message_unref(msg);
+-    return isOk;
++    emit messageNeedsSending(Q_NULLPTR, msg);
++    return true;
+ }
+ 
+ // small helper to note long running blocking dbus calls.
+@@ -2079,10 +2075,15 @@ void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *
+     QDBusError error;
+     DBusPendingCall *pending = 0;
+     DBusMessage *msg = static_cast<DBusMessage *>(message);
++    bool isNoReply = !pcall;
++    Q_ASSERT(isNoReply == q_dbus_message_get_no_reply(msg));
++
+     checkThread();
++    QDBusDispatchLocker locker(SendMessageAction, this);
+ 
+-    QDBusDispatchLocker locker(SendWithReplyAsyncAction, this);
+-    if (q_dbus_connection_send_with_reply(connection, msg, &pending, timeout)) {
++    if (isNoReply && q_dbus_connection_send(connection, msg, Q_NULLPTR)) {
++        // success
++    } else if (!isNoReply && q_dbus_connection_send_with_reply(connection, msg, &pending, timeout)) {
+         if (pending) {
+             q_dbus_message_unref(msg);
+ 
+@@ -2103,8 +2104,10 @@ void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *
+     }
+ 
+     q_dbus_message_unref(msg);
+-    pcall->replyMessage = QDBusMessage::createError(error);
+-    processFinishedCall(pcall);
++    if (pcall) {
++        pcall->replyMessage = QDBusMessage::createError(error);
++        processFinishedCall(pcall);
++    }
+ }
+ 
+ bool QDBusConnectionPrivate::connectSignal(const QString &service,
+diff --git a/src/dbus/qdbusthreaddebug_p.h b/src/dbus/qdbusthreaddebug_p.h
+index d20d4b8..6929eef 100644
+--- a/src/dbus/qdbusthreaddebug_p.h
++++ b/src/dbus/qdbusthreaddebug_p.h
+@@ -83,7 +83,7 @@ enum ThreadAction {
+     HandleObjectCallPostEventAction = 22,
+     HandleObjectCallSemaphoreAction = 23,
+     DoDispatchAction = 24,
+-    SendWithReplyAsyncAction = 25,
++    // unused: 25,
+     MessageResultReceivedAction = 26,
+     ActivateSignalAction = 27,
+     PendingCallBlockAction = 28,
+-- 
+2.1.4
+

=== added file 'debian/patches/Bypass-connectSignal-for-receiving-the-NameOwnerChan.patch'
--- debian/patches/Bypass-connectSignal-for-receiving-the-NameOwnerChan.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Bypass-connectSignal-for-receiving-the-NameOwnerChan.patch	2015-03-31 10:51:29 +0000
@@ -0,0 +1,73 @@
+From 1205362f5ff916224ed873e743c056f2e36a302e Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 30 Mar 2015 19:38:32 -0700
+Subject: [PATCH] Bypass connectSignal() for receiving the NameOwnerChanged
+ signal
+
+This is an optimization but is required. Instead of going through the
+entire (dis)connectSignal() stack to add/remove matching rules for the
+NameOwnerChanged bus signal and call into our serviceOwnerChangedNoLock
+slot, create a static hook that will match the signal and simply add/
+remove the rules as needed.
+
+The required part is that this avoids a recursion into connectSignal().
+The next commit will move this code to the QtDBus manager thread and we
+won't be able to call connectSignal() from there (it would create a
+deadlock).
+
+Change-Id: Iee8cbc07c4434ce9b560ffff13d074ce90ad02d4
+---
+ src/dbus/qdbusintegrator.cpp | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 3b5adb0..bb9fd9b 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1679,6 +1679,15 @@ void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusError
+     Q_ASSERT(hook.midx != -1);
+     signalHooks.insert(QLatin1String("NameLost:" DBUS_INTERFACE_DBUS), hook);
+ 
++    // And initialize the hook for the NameOwnerChanged signal;
++    // we don't use connectSignal here because the rules are added by connectSignal on a per-need basis
++    hook.params.clear();
++    hook.params.reserve(4);
++    hook.params << QMetaType::Void << QVariant::String << QVariant::String << QVariant::String;
++    hook.midx = staticMetaObject.indexOfSlot("serviceOwnerChangedNoLock(QString,QString,QString)");
++    Q_ASSERT(hook.midx != -1);
++    signalHooks.insert(QLatin1String("NameOwnerChanged:" DBUS_INTERFACE_DBUS), hook);
++
+     qDBusDebug() << this << ": connected successfully";
+ 
+     // schedule a dispatch:
+@@ -2089,9 +2098,10 @@ void QDBusConnectionPrivate::connectSignal(const QString &key, const SignalHook
+                 WatchedServicesHash::mapped_type &data = watchedServices[hook.service];
+                 if (++data.refcount == 1) {
+                     // we need to watch for this service changing
+-                    connectSignal(dbusServiceString(), QString(), dbusInterfaceString(),
+-                                  QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(),
+-                                  this, SLOT(serviceOwnerChangedNoLock(QString,QString,QString)));
++                    q_dbus_bus_add_match(connection,
++                                         buildMatchRule(dbusServiceString(), QString(), dbusInterfaceString(),
++                                                        QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString()),
++                                         NULL);
+                     data.owner = getNameOwnerNoCache(hook.service);
+                     qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:"
+                                  << data.owner << ")";
+@@ -2169,9 +2179,10 @@ QDBusConnectionPrivate::disconnectSignal(SignalHookHash::Iterator &it)
+             if (sit != watchedServices.end()) {
+                 if (--sit.value().refcount == 0) {
+                     watchedServices.erase(sit);
+-                    disconnectSignal(dbusServiceString(), QString(), dbusInterfaceString(),
+-                                  QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(),
+-                                  this, SLOT(serviceOwnerChangedNoLock(QString,QString,QString)));
++                    q_dbus_bus_remove_match(connection,
++                                            buildMatchRule(dbusServiceString(), QString(), dbusInterfaceString(),
++                                                           QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString()),
++                                            NULL);
+                 }
+             }
+         }
+-- 
+2.1.4
+

=== added file 'debian/patches/Implement-the-blocking-QtDBus-call-in-terms-of-the-n.patch'
--- debian/patches/Implement-the-blocking-QtDBus-call-in-terms-of-the-n.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Implement-the-blocking-QtDBus-call-in-terms-of-the-n.patch	2015-03-31 08:57:21 +0000
@@ -0,0 +1,359 @@
+From 2ebe3af48e8c6ea205aa5d2d19dcef66652a262c Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 17:14:18 -0200
+Subject: [PATCH] Implement the blocking QtDBus call in terms of the
+ non-blocking one
+
+This simplifies the code a little by having a single code path. More
+importantly, we no longer need to call the evil function
+dbus_connection_send_with_reply_and_block. That function acquires a lock
+on the socket transport inside libdbus-1, which means all threads need
+to wait until the one call gets unblocked before they can continue.
+
+To do that, this commit reimplements the QDBus::Block part of
+QDBusConnectionPrivate::sendWithReply by reusing the existing call to
+sendWithReplyAsync() and then doing a blocking-wait with
+QDBusPendingCallPrivate::waitForFinished().
+
+By using (Q)DBusPendingCall and the threaded connection approach (next
+commit), now we never block on the socket. That also means the code to
+call dbus_pending_call_block() is no longer necessary and the
+waitForFinished() function itself can be considerably simplified.
+
+As a side-effect of no longer blocking, a number of pre-existing race
+conditions that used to be hidden showed up.
+
+Note: this commit deadlocks without the threading (next commits).
+
+Task-number: QTBUG-43585
+Change-Id: Ic5d393bfd36e48a193fcffff13b73754954a3f7d
+---
+ src/dbus/qdbus_symbols_p.h                         |  6 +-
+ src/dbus/qdbusconnection_p.h                       |  1 -
+ src/dbus/qdbusintegrator.cpp                       | 91 ++++------------------
+ src/dbus/qdbuspendingcall.cpp                      |  3 +-
+ src/dbus/qdbuspendingcall_p.h                      |  4 +-
+ src/dbus/qdbusthreaddebug_p.h                      |  4 +-
+ .../dbus/qdbusconnection/tst_qdbusconnection.cpp   | 14 +++-
+ 7 files changed, 35 insertions(+), 88 deletions(-)
+
+diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
+index cec8ad6..26d966c 100644
+--- a/src/dbus/qdbus_symbols_p.h
++++ b/src/dbus/qdbus_symbols_p.h
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -208,11 +209,6 @@ DEFINEFUNC(dbus_bool_t        , dbus_connection_send_with_reply, (DBusConnection
+                                                                   DBusPendingCall           **pending_return,
+                                                                   int                         timeout_milliseconds),
+            (connection, message, pending_return, timeout_milliseconds), return)
+-DEFINEFUNC(DBusMessage *      , dbus_connection_send_with_reply_and_block, (DBusConnection             *connection,
+-                                                                            DBusMessage                *message,
+-                                                                            int                         timeout_milliseconds,
+-                                                                            DBusError                  *error),
+-           (connection, message, timeout_milliseconds, error), return)
+ DEFINEFUNC(void               , dbus_connection_set_exit_on_disconnect, (DBusConnection             *connection,
+                                                                          dbus_bool_t                 exit_on_disconnect),
+            (connection, exit_on_disconnect), )
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index c628210..721b7b7 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -224,7 +224,6 @@ public:
+     void unregisterService(const QString &serviceName);
+ 
+     bool handleMessage(const QDBusMessage &msg);
+-    void waitForFinished(QDBusPendingCallPrivate *pcall);
+ 
+     QDBusMetaObject *findMetaObject(const QString &service, const QString &path,
+                                     const QString &interface, QDBusError &error);
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 20ef616..79e5b6f 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1788,34 +1788,6 @@ static void qDBusResultReceived(DBusPendingCall *pending, void *user_data)
+ }
+ }
+ 
+-void QDBusConnectionPrivate::waitForFinished(QDBusPendingCallPrivate *pcall)
+-{
+-    Q_ASSERT(pcall->pending);
+-    //Q_ASSERT(pcall->mutex.isLocked()); // there's no such function
+-
+-    if (pcall->waitingForFinished) {
+-        // another thread is already waiting
+-        pcall->waitForFinishedCondition.wait(&pcall->mutex);
+-    } else {
+-        pcall->waitingForFinished = true;
+-        pcall->mutex.unlock();
+-
+-        {
+-            QDBusDispatchLocker locker(PendingCallBlockAction, this);
+-            q_dbus_pending_call_block(pcall->pending);
+-            // QDBusConnectionPrivate::processFinishedCall() is called automatically
+-        }
+-        pcall->mutex.lock();
+-
+-        if (pcall->pending) {
+-            q_dbus_pending_call_unref(pcall->pending);
+-            pcall->pending = 0;
+-        }
+-
+-        pcall->waitForFinishedCondition.wakeAll();
+-    }
+-}
+-
+ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
+ {
+     QDBusConnectionPrivate *connection = const_cast<QDBusConnectionPrivate *>(call->connection);
+@@ -1831,7 +1803,7 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
+         msg = QDBusMessagePrivate::fromDBusMessage(reply, connection->capabilities);
+         q_dbus_message_unref(reply);
+     }
+-    qDBusDebug() << connection << "got message reply (async):" << msg;
++    qDBusDebug() << connection << "got message reply:" << msg;
+ 
+     // Check if the reply has the expected signature
+     call->checkReceivedSignature();
+@@ -1853,7 +1825,8 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
+             qDBusDebug() << "Deliver failed!";
+     }
+ 
+-    if (call->pending && !call->waitingForFinished) {
++    if (call->pending) {
++        call->waitForFinishedCondition.wakeAll();
+         q_dbus_pending_call_unref(call->pending);
+         call->pending = 0;
+     }
+@@ -2005,43 +1978,12 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
+         // special case for synchronous local calls
+         return sendWithReplyLocal(message);
+ 
+-    if (!QCoreApplication::instance() || sendMode == QDBus::Block) {
+-        QDBusError err;
+-        DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message, capabilities, &err);
+-        if (!msg) {
+-            qWarning("QDBusConnection: error: could not send message to service \"%s\" path \"%s\" interface \"%s\" member \"%s\": %s",
+-                     qPrintable(message.service()), qPrintable(message.path()),
+-                     qPrintable(message.interface()), qPrintable(message.member()),
+-                     qPrintable(err.message()));
+-            lastError = err;
+-            return QDBusMessage::createError(err);
+-        }
+-
+-        qDBusDebug() << this << "sending message (blocking):" << message;
+-        QDBusErrorInternal error;
+-        DBusMessage *reply;
+-        {
+-            QDBusDispatchLocker locker(SendWithReplyAndBlockAction, this);
+-            reply = q_dbus_connection_send_with_reply_and_block(connection, msg, timeout, error);
+-        }
+-
+-        q_dbus_message_unref(msg);
+-
+-        if (!!error) {
+-            lastError = err = error;
+-            return QDBusMessage::createError(err);
+-        }
+-
+-        QDBusMessage amsg = QDBusMessagePrivate::fromDBusMessage(reply, capabilities);
+-        q_dbus_message_unref(reply);
+-        qDBusDebug() << this << "got message reply (blocking):" << amsg;
+-
+-        return amsg;
+-    } else { // use the event loop
+-        QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, 0, 0, 0, timeout);
+-        Q_ASSERT(pcall);
++    QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, 0, 0, 0, timeout);
++    Q_ASSERT(pcall);
+ 
+-        if (pcall->replyMessage.type() == QDBusMessage::InvalidMessage) {
++    if (pcall->replyMessage.type() == QDBusMessage::InvalidMessage) {
++        // need to wait for the reply
++        if (sendMode == QDBus::BlockWithGui) {
+             pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
+             QEventLoop loop;
+             loop.connect(pcall->watcherHelper, SIGNAL(reply(QDBusMessage)), SLOT(quit()));
+@@ -2049,18 +1991,17 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
+ 
+             // enter the event loop and wait for a reply
+             loop.exec(QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents);
++        } else {
++            pcall->waitForFinished();
+         }
++    }
+ 
+-        QDBusMessage reply = pcall->replyMessage;
+-        lastError = QDBusError(reply);      // set or clear error
+-
+-        bool r = pcall->ref.deref();
+-        Q_ASSERT(!r);
+-        Q_UNUSED(r);
++    QDBusMessage reply = pcall->replyMessage;
++    lastError = QDBusError(reply);      // set or clear error
+ 
++    if (!pcall->ref.deref())
+         delete pcall;
+-        return reply;
+-    }
++    return reply;
+ }
+ 
+ QDBusMessage QDBusConnectionPrivate::sendWithReplyLocal(const QDBusMessage &message)
+@@ -2160,7 +2101,7 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
+         return pcall;
+     }
+ 
+-    qDBusDebug() << this << "sending message (async):" << message;
++    qDBusDebug() << this << "sending message:" << message;
+     DBusPendingCall *pending = 0;
+ 
+     QDBusDispatchLocker locker(SendWithReplyAsyncAction, this);
+diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
+index 09eff81..ad5632b 100644
+--- a/src/dbus/qdbuspendingcall.cpp
++++ b/src/dbus/qdbuspendingcall.cpp
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -231,7 +232,7 @@ void QDBusPendingCallPrivate::waitForFinished()
+     if (replyMessage.type() != QDBusMessage::InvalidMessage)
+         return;                 // already finished
+ 
+-    connection->waitForFinished(this);
++    waitForFinishedCondition.wait(&mutex);
+ }
+ 
+ /*!
+diff --git a/src/dbus/qdbuspendingcall_p.h b/src/dbus/qdbuspendingcall_p.h
+index ac39487..dcf7336 100644
+--- a/src/dbus/qdbuspendingcall_p.h
++++ b/src/dbus/qdbuspendingcall_p.h
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -89,11 +90,10 @@ public:
+     DBusPendingCall *pending;
+     QString expectedReplySignature;
+     int expectedReplyCount;
+-    bool waitingForFinished;
+     // }
+ 
+     QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection)
+-        : sentMessage(sent), connection(connection), watcherHelper(0), pending(0), waitingForFinished(false)
++        : sentMessage(sent), connection(connection), watcherHelper(0), pending(0)
+     { }
+     ~QDBusPendingCallPrivate();
+     bool setReplyCallback(QObject *target, const char *member);
+diff --git a/src/dbus/qdbusthreaddebug_p.h b/src/dbus/qdbusthreaddebug_p.h
+index a8e126c..60b6acd 100644
+--- a/src/dbus/qdbusthreaddebug_p.h
++++ b/src/dbus/qdbusthreaddebug_p.h
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -87,8 +88,7 @@ enum ThreadAction {
+     ActivateSignalAction = 27,
+     PendingCallBlockAction = 28,
+     SendMessageAction = 29,
+-    SendWithReplyAndBlockAction = 30,
+-    HuntAndEmitAction = 31,
++    HuntAndEmitAction = 30,
+ 
+     AddTimeoutAction = 50,
+     RealAddTimeoutAction = 51,
+diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+index 32c228c..9270919 100644
+--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
++++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the test suite of the Qt Toolkit.
+@@ -480,6 +481,7 @@ public slots:
+         QVERIFY(isConnected());
+         QVERIFY(c.isConnected());
+         QVERIFY(registerObject(c));
++        QTestEventLoop::instance().exitLoop();
+     }
+ 
+ private:
+@@ -507,11 +509,14 @@ void tst_QDBusConnection::registerObjectPeer()
+     MyServer server(path);
+ 
+     QDBusConnection::connectToPeer(server.address(), "beforeFoo");
++    QTestEventLoop::instance().enterLoop(2);
++    QVERIFY(!QTestEventLoop::instance().timeout());
+ 
+     {
+         QDBusConnection con = QDBusConnection::connectToPeer(server.address(), "foo");
+ 
+-        QCoreApplication::processEvents();
++        QTestEventLoop::instance().enterLoop(2);
++        QVERIFY(!QTestEventLoop::instance().timeout());
+         QVERIFY(con.isConnected());
+ 
+         MyObject obj;
+@@ -520,6 +525,7 @@ void tst_QDBusConnection::registerObjectPeer()
+     }
+ 
+     QDBusConnection::connectToPeer(server.address(), "afterFoo");
++    QTestEventLoop::instance().enterLoop(2);
+ 
+     {
+         QDBusConnection con("foo");
+@@ -668,6 +674,7 @@ public slots:
+         m_conn = c;
+         QVERIFY(isConnected());
+         QVERIFY(m_conn.isConnected());
++        QTestEventLoop::instance().exitLoop();
+     }
+ 
+ private:
+@@ -679,7 +686,8 @@ void tst_QDBusConnection::registerObjectPeer2()
+ {
+     MyServer2 server;
+     QDBusConnection con = QDBusConnection::connectToPeer(server.address(), "foo");
+-    QCoreApplication::processEvents();
++    QTestEventLoop::instance().enterLoop(2);
++    QVERIFY(!QTestEventLoop::instance().timeout());
+     QVERIFY(con.isConnected());
+ 
+     QDBusConnection srv_con = server.connection();
+@@ -834,6 +842,8 @@ void tst_QDBusConnection::registerQObjectChildrenPeer()
+ {
+     MyServer2 server;
+     QDBusConnection con = QDBusConnection::connectToPeer(server.address(), "foo");
++    QTestEventLoop::instance().enterLoop(2);
++    QVERIFY(!QTestEventLoop::instance().timeout());
+     QCoreApplication::processEvents();
+     QVERIFY(con.isConnected());
+ 
+-- 
+2.1.4
+

=== added file 'debian/patches/Make-QDBusConnectionPrivate-getNameOwnerNoCache-work.patch'
--- debian/patches/Make-QDBusConnectionPrivate-getNameOwnerNoCache-work.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Make-QDBusConnectionPrivate-getNameOwnerNoCache-work.patch	2015-03-31 10:57:56 +0000
@@ -0,0 +1,52 @@
+From a91c20ec4ce2d21c6d4bd99a17ae4af94b21708f Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 30 Mar 2015 19:34:03 -0700
+Subject: [PATCH] Make QDBusConnectionPrivate::getNameOwnerNoCache work in our
+ thread
+
+In two commits, we will attempt to call this function from the manager
+thread, so we need to be sure this function works from there. Right now,
+it would deadlock in QDBusPendingCallPrivate::waitForFinished(), inside
+QDBusConnectionPrivate::sendWithReply().
+
+The solution is simple: expand sendWithReply to the sendWithReplyAsync
+function it calls anyway, but tell the internal DBusPendingCall to
+finish before we call waitForFinished().
+
+Change-Id: Iee8cbc07c4434ce9b560ffff13d0749013d771ab
+---
+ src/dbus/qdbusintegrator.cpp | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index e40003c..3b5adb0 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -2345,9 +2345,21 @@ QString QDBusConnectionPrivate::getNameOwnerNoCache(const QString &serviceName)
+             QLatin1String("GetNameOwner"));
+     QDBusMessagePrivate::setParametersValidated(msg, true);
+     msg << serviceName;
+-    QDBusMessage reply = sendWithReply(msg, QDBus::Block);
+-    if (reply.type() == QDBusMessage::ReplyMessage)
+-        return reply.arguments().at(0).toString();
++
++    QDBusPendingCallPrivate *pcall = sendWithReplyAsync(msg, Q_NULLPTR, Q_NULLPTR, Q_NULLPTR);
++    if (thread() == QThread::currentThread()) {
++        // this function may be called in our own thread and
++        // QDBusPendingCallPrivate::waitForFinished() would deadlock there
++        q_dbus_pending_call_block(pcall->pending);
++    }
++    pcall->waitForFinished();
++    msg = pcall->replyMessage;
++
++    if (!pcall->ref.deref())
++        delete pcall;
++
++    if (msg.type() == QDBusMessage::ReplyMessage)
++        return msg.arguments().at(0).toString();
+     return QString();
+ }
+ 
+-- 
+2.1.4
+

=== added file 'debian/patches/Make-QDBusConnectionPrivate-send-return-bool.patch'
--- debian/patches/Make-QDBusConnectionPrivate-send-return-bool.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Make-QDBusConnectionPrivate-send-return-bool.patch	2015-03-19 06:41:43 +0000
@@ -0,0 +1,76 @@
+From e39fbf79c866994c03449bbfd64e76e5859b0e16 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 19:25:28 -0200
+Subject: [PATCH] Make QDBusConnectionPrivate::send return bool
+
+It used to return the sent message's serial ID, but we never used that.
+So simply use boolean instead.
+
+Change-Id: Ic5d393bfd36e48a193fcffff13b73753ccf47759
+---
+ src/dbus/qdbusconnection_p.h |  2 +-
+ src/dbus/qdbusintegrator.cpp | 19 ++++++-------------
+ 2 files changed, 7 insertions(+), 14 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index 6977b2e..3e824d5 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -198,7 +198,7 @@ public:
+ 
+     QString getNameOwner(const QString &service);
+ 
+-    int send(const QDBusMessage &message);
++    bool send(const QDBusMessage &message);
+     QDBusMessage sendWithReply(const QDBusMessage &message, int mode, int timeout = -1);
+     QDBusMessage sendWithReplyLocal(const QDBusMessage &message);
+     QDBusPendingCallPrivate *sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 3df98e9..232e3e5 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1864,10 +1864,10 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
+         delete call;
+ }
+ 
+-int QDBusConnectionPrivate::send(const QDBusMessage& message)
++bool QDBusConnectionPrivate::send(const QDBusMessage& message)
+ {
+     if (QDBusMessagePrivate::isLocal(message))
+-        return -1;              // don't send; the reply will be retrieved by the caller
++        return true;            // don't send; the reply will be retrieved by the caller
+                                 // through the d_ptr->localReply link
+ 
+     QDBusError error;
+@@ -1890,24 +1890,17 @@ int QDBusConnectionPrivate::send(const QDBusMessage& message)
+                      "invalid", qPrintable(message.service()),
+                      qPrintable(error.message()));
+         lastError = error;
+-        return 0;
++        return false;
+     }
+ 
+     q_dbus_message_set_no_reply(msg, true); // the reply would not be delivered to anything
+ 
+     qDBusDebug() << this << "sending message (no reply):" << message;
+     checkThread();
+-    bool isOk;
+-    {
+-        QDBusDispatchLocker locker(SendMessageAction, this);
+-        isOk = q_dbus_connection_send(connection, msg, 0);
+-    }
+-    int serial = 0;
+-    if (isOk)
+-        serial = q_dbus_message_get_serial(msg);
+-
++    QDBusDispatchLocker locker(SendMessageAction, this);
++    bool isOk = q_dbus_connection_send(connection, msg, 0);
+     q_dbus_message_unref(msg);
+-    return serial;
++    return isOk;
+ }
+ 
+ // small helper to note long running blocking dbus calls.
+-- 
+2.1.4
+

=== added file 'debian/patches/Make-sure-we-don-t-deadlock-when-connecting-signals.patch'
--- debian/patches/Make-sure-we-don-t-deadlock-when-connecting-signals.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Make-sure-we-don-t-deadlock-when-connecting-signals.patch	2015-03-31 08:35:31 +0000
@@ -0,0 +1,243 @@
+From 018260c956e28ea6720195094b6bf54e044fd649 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 30 Mar 2015 09:02:40 -0700
+Subject: [PATCH] Make sure we don't deadlock when connecting signals
+
+This commit moves the code that finishes the signal-slot connection into
+the QtDBus auxiliary thread. That is necessary because we're holding the
+lock for writing while making blocking calls. The auxiliary thread might
+be waiting for us to release that lock while processing some previous
+message.
+
+Change-Id: Iee8cbc07c4434ce9b560ffff13d0521b94a51833
+---
+ src/dbus/qdbusconnection.cpp |  2 --
+ src/dbus/qdbusconnection_p.h |  8 +++--
+ src/dbus/qdbusintegrator.cpp | 81 +++++++++++++++++++-------------------------
+ 3 files changed, 40 insertions(+), 51 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
+index 652e276..a3c6abc 100644
+--- a/src/dbus/qdbusconnection.cpp
++++ b/src/dbus/qdbusconnection.cpp
+@@ -702,7 +702,6 @@ bool QDBusConnection::connect(const QString &service, const QString &path, const
+         return false;
+     }
+ 
+-    QDBusWriteLocker locker(ConnectAction, d);
+     return d->connectSignal(service, path, interface, name, argumentMatch, signature, receiver, slot);
+ }
+ 
+@@ -758,7 +757,6 @@ bool QDBusConnection::disconnect(const QString &service, const QString &path, co
+     if (interface.isEmpty() && name.isEmpty())
+         return false;
+ 
+-    QDBusWriteLocker locker(DisconnectAction, d);
+     return d->disconnectSignal(service, path, interface, name, argumentMatch, signature, receiver, slot);
+ }
+ 
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index dcaaa03..d0c436f 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -214,8 +214,6 @@ public:
+     bool connectSignal(const QString &service, const QString &path, const QString& interface,
+                        const QString &name, const QStringList &argumentMatch, const QString &signature,
+                        QObject *receiver, const char *slot);
+-    void connectSignal(const QString &key, const SignalHook &hook);
+-    SignalHookHash::Iterator disconnectSignal(SignalHookHash::Iterator &it);
+     bool disconnectSignal(const QString &service, const QString &path, const QString& interface,
+                           const QString &name, const QStringList &argumentMatch, const QString &signature,
+                           QObject *receiver, const char *slot);
+@@ -255,6 +253,8 @@ private:
+     void deliverCall(QObject *object, int flags, const QDBusMessage &msg,
+                      const QVector<int> &metaTypes, int slotIdx);
+ 
++    SignalHookHash::Iterator removeSignalHookNoLock(SignalHookHash::Iterator it);
++
+     bool isServiceRegisteredByThread(const QString &serviceName);
+ 
+     QString getNameOwnerNoCache(const QString &service);
+@@ -271,6 +271,8 @@ public slots:
+     void socketWrite(int);
+     void objectDestroyed(QObject *o);
+     void relaySignal(QObject *obj, const QMetaObject *, int signalId, const QVariantList &args);
++    void addSignalHook(const QString &key, const SignalHook &hook);
++    bool removeSignalHook(const QString &key, const SignalHook &hook);
+ 
+ private slots:
+     void serviceOwnerChangedNoLock(const QString &name, const QString &oldOwner, const QString &newOwner);
+@@ -280,6 +282,8 @@ private slots:
+ signals:
+     void dispatchStatusChanged();
+     void messageNeedsSending(QDBusPendingCallPrivate *pcall, void *msg, int timeout = -1);
++    void signalNeedsConnecting(const QString &key, const QDBusConnectionPrivate::SignalHook &hook);
++    bool signalNeedsDisconnecting(const QString &key, const QDBusConnectionPrivate::SignalHook &hook);
+     void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
+     void callWithCallbackFailed(const QDBusError &error, const QDBusMessage &message);
+     void newServerConnection(QDBusConnectionPrivate *newConnection);
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index bb9fd9b..3d14b2b 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -961,6 +961,10 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
+             this, &QDBusConnectionPrivate::doDispatch, Qt::QueuedConnection);
+     connect(this, &QDBusConnectionPrivate::messageNeedsSending,
+             this, &QDBusConnectionPrivate::sendInternal);
++    connect(this, &QDBusConnectionPrivate::signalNeedsConnecting,
++            this, &QDBusConnectionPrivate::addSignalHook, Qt::BlockingQueuedConnection);
++    connect(this, &QDBusConnectionPrivate::signalNeedsDisconnecting,
++            this, &QDBusConnectionPrivate::removeSignalHook, Qt::BlockingQueuedConnection);
+ 
+     rootNode.flags = 0;
+ 
+@@ -1106,7 +1110,7 @@ void QDBusConnectionPrivate::objectDestroyed(QObject *obj)
+     SignalHookHash::iterator sit = signalHooks.begin();
+     while (sit != signalHooks.end()) {
+         if (static_cast<QObject *>(sit.value().obj) == obj)
+-            sit = disconnectSignal(sit);
++            sit = removeSignalHookNoLock(sit);
+         else
+             ++sit;
+     }
+@@ -2052,6 +2056,15 @@ bool QDBusConnectionPrivate::connectSignal(const QString &service,
+     if (!prepareHook(hook, key, service, path, interface, name, argumentMatch, receiver, slot, 0, false))
+         return false;           // don't connect
+ 
++    Q_ASSERT(thread() != QThread::currentThread());
++    emit signalNeedsConnecting(key, hook);
++    return true;
++}
++
++void QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook &hook)
++{
++    QDBusWriteLocker locker(ConnectAction, this);
++
+     // avoid duplicating:
+     QDBusConnectionPrivate::SignalHookHash::ConstIterator it = signalHooks.constFind(key);
+     QDBusConnectionPrivate::SignalHookHash::ConstIterator end = signalHooks.constEnd();
+@@ -2064,24 +2077,18 @@ bool QDBusConnectionPrivate::connectSignal(const QString &service,
+             entry.midx == hook.midx &&
+             entry.argumentMatch == hook.argumentMatch) {
+             // no need to compare the parameters if it's the same slot
+-            return true;        // already there
++            return;        // already there
+         }
+     }
+ 
+-    connectSignal(key, hook);
+-    return true;
+-}
+-
+-void QDBusConnectionPrivate::connectSignal(const QString &key, const SignalHook &hook)
+-{
+     signalHooks.insertMulti(key, hook);
+     connect(hook.obj, SIGNAL(destroyed(QObject*)), SLOT(objectDestroyed(QObject*)),
+-            Qt::ConnectionType(Qt::DirectConnection | Qt::UniqueConnection));
++            Qt::ConnectionType(Qt::BlockingQueuedConnection | Qt::UniqueConnection));
+ 
+-    MatchRefCountHash::iterator it = matchRefCounts.find(hook.matchRule);
++    MatchRefCountHash::iterator mit = matchRefCounts.find(hook.matchRule);
+ 
+-    if (it != matchRefCounts.end()) { // Match already present
+-        it.value() = it.value() + 1;
++    if (mit != matchRefCounts.end()) { // Match already present
++        mit.value() = mit.value() + 1;
+         return;
+     }
+ 
+@@ -2127,7 +2134,14 @@ bool QDBusConnectionPrivate::disconnectSignal(const QString &service,
+     if (!prepareHook(hook, key, service, path, interface, name, argumentMatch, receiver, slot, 0, false))
+         return false;           // don't disconnect
+ 
+-    // avoid duplicating:
++    Q_ASSERT(thread() != QThread::currentThread());
++    return emit signalNeedsDisconnecting(key, hook);
++}
++
++bool QDBusConnectionPrivate::removeSignalHook(const QString &key, const SignalHook &hook)
++{
++    // remove it from our list:
++    QDBusWriteLocker locker(ConnectAction, this);
+     QDBusConnectionPrivate::SignalHookHash::Iterator it = signalHooks.find(key);
+     QDBusConnectionPrivate::SignalHookHash::Iterator end = signalHooks.end();
+     for ( ; it != end && it.key() == key; ++it) {
+@@ -2139,7 +2153,7 @@ bool QDBusConnectionPrivate::disconnectSignal(const QString &service,
+             entry.midx == hook.midx &&
+             entry.argumentMatch == hook.argumentMatch) {
+             // no need to compare the parameters if it's the same slot
+-            disconnectSignal(it);
++            removeSignalHookNoLock(it);
+             return true;        // it was there
+         }
+     }
+@@ -2149,7 +2163,7 @@ bool QDBusConnectionPrivate::disconnectSignal(const QString &service,
+ }
+ 
+ QDBusConnectionPrivate::SignalHookHash::Iterator
+-QDBusConnectionPrivate::disconnectSignal(SignalHookHash::Iterator &it)
++QDBusConnectionPrivate::removeSignalHookNoLock(SignalHookHash::Iterator it)
+ {
+     const SignalHook &hook = it.value();
+ 
+@@ -2195,7 +2209,7 @@ QDBusConnectionPrivate::disconnectSignal(SignalHookHash::Iterator &it)
+ void QDBusConnectionPrivate::registerObject(const ObjectTreeNode *node)
+ {
+     connect(node->obj, SIGNAL(destroyed(QObject*)), SLOT(objectDestroyed(QObject*)),
+-            Qt::DirectConnection);
++            Qt::ConnectionType(Qt::BlockingQueuedConnection | Qt::UniqueConnection));
+ 
+     if (node->flags & (QDBusConnection::ExportAdaptors
+                        | QDBusConnection::ExportScriptableSignals
+@@ -2249,21 +2263,8 @@ void QDBusConnectionPrivate::connectRelay(const QString &service,
+                      QDBusAbstractInterface::staticMetaObject.methodCount(), true))
+         return;                 // don't connect
+ 
+-    // add it to our list:
+-    QDBusWriteLocker locker(ConnectRelayAction, this);
+-    SignalHookHash::ConstIterator it = signalHooks.constFind(key);
+-    SignalHookHash::ConstIterator end = signalHooks.constEnd();
+-    for ( ; it != end && it.key() == key; ++it) {
+-        const SignalHook &entry = it.value();
+-        if (entry.service == hook.service &&
+-            entry.path == hook.path &&
+-            entry.signature == hook.signature &&
+-            entry.obj == hook.obj &&
+-            entry.midx == hook.midx)
+-            return;             // already there, no need to re-add
+-    }
+-
+-    connectSignal(key, hook);
++    Q_ASSERT(thread() != QThread::currentThread());
++    emit signalNeedsConnecting(key, hook);
+ }
+ 
+ void QDBusConnectionPrivate::disconnectRelay(const QString &service,
+@@ -2283,22 +2284,8 @@ void QDBusConnectionPrivate::disconnectRelay(const QString &service,
+                      QDBusAbstractInterface::staticMetaObject.methodCount(), true))
+         return;                 // don't connect
+ 
+-    // remove it from our list:
+-    QDBusWriteLocker locker(DisconnectRelayAction, this);
+-    SignalHookHash::Iterator it = signalHooks.find(key);
+-    SignalHookHash::Iterator end = signalHooks.end();
+-    for ( ; it != end && it.key() == key; ++it) {
+-        const SignalHook &entry = it.value();
+-        if (entry.service == hook.service &&
+-            entry.path == hook.path &&
+-            entry.signature == hook.signature &&
+-            entry.obj == hook.obj &&
+-            entry.midx == hook.midx) {
+-            // found it
+-            disconnectSignal(it);
+-            return;
+-        }
+-    }
++    Q_ASSERT(thread() != QThread::currentThread());
++    emit signalNeedsDisconnecting(key, hook);
+ }
+ 
+ bool QDBusConnectionPrivate::shouldWatchService(const QString &service)
+-- 
+2.1.4
+

=== added file 'debian/patches/Move-the-sending-of-the-D-Bus-messages-with-reply-to.patch'
--- debian/patches/Move-the-sending-of-the-D-Bus-messages-with-reply-to.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Move-the-sending-of-the-D-Bus-messages-with-reply-to.patch	2015-03-19 06:55:02 +0000
@@ -0,0 +1,139 @@
+From 5f370a015202f988ff4176e7415807d7765c7da0 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 19:16:53 -0200
+Subject: [PATCH] Move the sending of the D-Bus messages with reply to the
+ thread
+
+This is intended to simply the handling of the socket in the
+future. Now, we know that all calls to send_with_reply are placed only
+from the manager's thread.
+
+Task-number: QTBUG-43585
+Change-Id: Ic5d393bfd36e48a193fcffff13b737575c231927
+---
+ src/dbus/qdbusconnection.cpp |  2 +-
+ src/dbus/qdbusconnection_p.h |  2 ++
+ src/dbus/qdbusintegrator.cpp | 22 +++++++++++++++-------
+ 3 files changed, 18 insertions(+), 8 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
+index 8e15b29..245788a 100644
+--- a/src/dbus/qdbusconnection.cpp
++++ b/src/dbus/qdbusconnection.cpp
+@@ -481,7 +481,7 @@ bool QDBusConnection::send(const QDBusMessage &message) const
+             d->lastError = err;
+         return false;
+     }
+-    return d->send(message) != 0;
++    return d->send(message);
+ }
+ 
+ /*!
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index 6f06dfb..c75e47d 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -242,6 +242,7 @@ private:
+     bool activateInternalFilters(const ObjectTreeNode &node, const QDBusMessage &msg);
+     bool activateCall(QObject *object, int flags, const QDBusMessage &msg);
+ 
++    void sendInternal(QDBusPendingCallPrivate *pcall, void *msg, int timeout);
+     void sendError(const QDBusMessage &msg, QDBusError::ErrorType code);
+     void deliverCall(QObject *object, int flags, const QDBusMessage &msg,
+                      const QVector<int> &metaTypes, int slotIdx);
+@@ -271,6 +272,7 @@ private slots:
+ 
+ signals:
+     void dispatchStatusChanged();
++    void messageNeedsSending(QDBusPendingCallPrivate *pcall, void *msg, int timeout);
+     void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
+     void callWithCallbackFailed(const QDBusError &error, const QDBusMessage &message);
+     void newServerConnection(QDBusConnectionPrivate *newConnection);
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 6707e28..907dea5 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1012,6 +1012,8 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
+     QDBusMetaTypeId::init();
+     connect(this, &QDBusConnectionPrivate::dispatchStatusChanged,
+             this, &QDBusConnectionPrivate::doDispatch, Qt::QueuedConnection);
++    connect(this, &QDBusConnectionPrivate::messageNeedsSending,
++            this, &QDBusConnectionPrivate::sendInternal);
+ 
+     rootNode.flags = 0;
+ 
+@@ -1085,6 +1087,7 @@ void QDBusConnectionPrivate::closeConnection()
+ void QDBusConnectionPrivate::checkThread()
+ {
+     Q_ASSERT(thread() == QDBusConnectionManager::instance());
++    Q_ASSERT(QThread::currentThread() == thread());
+ }
+ 
+ bool QDBusConnectionPrivate::handleError(const QDBusErrorInternal &error)
+@@ -1813,7 +1816,6 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
+     }
+ 
+     if (call->pending) {
+-        call->waitForFinishedCondition.wakeAll();
+         q_dbus_pending_call_unref(call->pending);
+         call->pending = 0;
+     }
+@@ -1822,6 +1824,7 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
+     if (call->watcherHelper)
+         call->watcherHelper->emitSignals(msg, call->sentMessage);
+ 
++    call->waitForFinishedCondition.wakeAll();
+     locker.unlock();
+ 
+     if (msg.type() == QDBusMessage::ErrorMessage)
+@@ -2022,8 +2025,6 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
+                                                                     QObject *receiver, const char *returnMethod,
+                                                                     const char *errorMethod, int timeout)
+ {
+-    checkThread();
+-
+     QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate(message, this);
+     bool isLoopback;
+     if ((isLoopback = isServiceRegisteredByThread(message.service()))) {
+@@ -2066,11 +2067,19 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
+         pcall->replyMessage = QDBusMessage::createError(error);
+         lastError = error;
+         processFinishedCall(pcall);
+-        return pcall;
++    } else {
++        qDBusDebug() << this << "sending message:" << message;
++        emit messageNeedsSending(pcall, msg, timeout);
+     }
++    return pcall;
++}
+ 
+-    qDBusDebug() << this << "sending message:" << message;
++void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *message, int timeout)
++{
++    QDBusError error;
+     DBusPendingCall *pending = 0;
++    DBusMessage *msg = static_cast<DBusMessage *>(message);
++    checkThread();
+ 
+     QDBusDispatchLocker locker(SendWithReplyAsyncAction, this);
+     if (q_dbus_connection_send_with_reply(connection, msg, &pending, timeout)) {
+@@ -2084,7 +2093,7 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
+             if (mode == QDBusConnectionPrivate::PeerMode)
+                 pendingCalls.append(pcall);
+ 
+-            return pcall;
++            return;
+         } else {
+             // we're probably disconnected at this point
+             lastError = error = QDBusError(QDBusError::Disconnected, QLatin1String("Not connected to server"));
+@@ -2096,7 +2105,6 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
+     q_dbus_message_unref(msg);
+     pcall->replyMessage = QDBusMessage::createError(error);
+     processFinishedCall(pcall);
+-    return pcall;
+ }
+ 
+ bool QDBusConnectionPrivate::connectSignal(const QString &service,
+-- 
+2.1.4
+

=== added file 'debian/patches/QDBusServiceWatcher-Move-the-logic-to-QDBusConnectio.patch'
--- debian/patches/QDBusServiceWatcher-Move-the-logic-to-QDBusConnectio.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/QDBusServiceWatcher-Move-the-logic-to-QDBusConnectio.patch	2015-03-31 12:28:18 +0000
@@ -0,0 +1,187 @@
+From f1b337f55a1f0143c4ed0938730c17ea0d5c47d1 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 30 Mar 2015 17:53:06 -0700
+Subject: [PATCH] QDBusServiceWatcher: Move the logic to QDBusConnectionPrivate
+
+With kdbus, we won't have a regular signal, but instead a special
+message. So keep the logic of what to do in QDBusConnectionPrivate.
+
+Change-Id: Iee8cbc07c4434ce9b560ffff13d06f0d9904cb6d
+---
+ src/dbus/qdbusconnection_p.h     |  7 ++++++
+ src/dbus/qdbusintegrator.cpp     | 51 +++++++++++++++++++++++++++++++++++++---
+ src/dbus/qdbusservicewatcher.cpp | 34 ++++-----------------------
+ 3 files changed, 60 insertions(+), 32 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index c9905dc..dcaaa03 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -63,6 +63,7 @@
+ #include "qdbus_symbols_p.h"
+ 
+ #include <qdbusmessage.h>
++#include <qdbusservicewatcher.h>    // for the WatchMode enum
+ 
+ #ifndef QT_NO_DBUS
+ 
+@@ -199,6 +200,12 @@ public:
+ 
+     QString getNameOwner(const QString &service);
+ 
++    bool shouldWatchService(const QString &service);
++    void watchService(const QString &service, QDBusServiceWatcher::WatchMode mode,
++                      QObject *obj, const char *member);
++    void unwatchService(const QString &service, QDBusServiceWatcher::WatchMode mode,
++                        QObject *obj, const char *member);
++
+     bool send(const QDBusMessage &message);
+     QDBusMessage sendWithReply(const QDBusMessage &message, int mode, int timeout = -1);
+     QDBusMessage sendWithReplyLocal(const QDBusMessage &message);
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 6be710b..e40003c 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -443,11 +443,27 @@ static QObject *findChildObject(const QDBusConnectionPrivate::ObjectTreeNode *ro
+     return 0;
+ }
+ 
+-static bool shouldWatchService(const QString &service)
++static QStringList matchArgsForService(const QString &service, QDBusServiceWatcher::WatchMode mode)
+ {
+-    return !service.isEmpty() && !service.startsWith(QLatin1Char(':'));
++    QStringList matchArgs;
++    matchArgs << service;
++
++    switch (mode) {
++    case QDBusServiceWatcher::WatchForOwnerChange:
++        break;
++
++    case QDBusServiceWatcher::WatchForRegistration:
++        matchArgs << QString::fromLatin1("", 0);
++        break;
++
++    case QDBusServiceWatcher::WatchForUnregistration:
++        matchArgs << QString() << QString::fromLatin1("", 0);
++        break;
++    }
++    return matchArgs;
+ }
+ 
++
+ extern Q_DBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);
+ void qDBusAddSpyHook(QDBusSpyHook hook)
+ {
+@@ -1470,7 +1486,7 @@ void QDBusConnectionPrivate::handleSignal(const QString &key, const QDBusMessage
+     //qDBusDebug() << signalHooks.keys();
+     for ( ; it != end && it.key() == key; ++it) {
+         const SignalHook &hook = it.value();
+-        if (!hook.service.isEmpty()) {
++        if (mode != PeerMode && !hook.service.isEmpty()) {
+             const QString owner =
+                     shouldWatchService(hook.service) ?
+                     watchedServices.value(hook.service).owner :
+@@ -2274,6 +2290,35 @@ void QDBusConnectionPrivate::disconnectRelay(const QString &service,
+     }
+ }
+ 
++bool QDBusConnectionPrivate::shouldWatchService(const QString &service)
++{
++    // we don't have to watch anything in peer mode;
++    // we also don't have to watch unique bus names (start with ":"), the bus driver,
++    // and wildcard services (empty strings)
++    return mode == ClientMode && !service.isEmpty() && !service.startsWith(QLatin1Char(':'))
++            && service != dbusServiceString();
++}
++
++void QDBusConnectionPrivate::watchService(const QString &service, QDBusServiceWatcher::WatchMode mode, QObject *obj, const char *member)
++{
++    if (!shouldWatchService(service))
++        return;     // nothing to see here, move along
++
++    QStringList matchArgs = matchArgsForService(service, mode);
++    connectSignal(dbusServiceString(), QString(), dbusInterfaceString(), QLatin1String("NameOwnerChanged"),
++                  matchArgs, QString(), obj, member);
++}
++
++void QDBusConnectionPrivate::unwatchService(const QString &service, QDBusServiceWatcher::WatchMode mode, QObject *obj, const char *member)
++{
++    if (!shouldWatchService(service))
++        return;     // nothing to see here, move along
++
++    QStringList matchArgs = matchArgsForService(service, mode);
++    disconnectSignal(dbusServiceString(), QString(), dbusInterfaceString(), QLatin1String("NameOwnerChanged"),
++                     matchArgs, QString(), obj, member);
++}
++
+ QString QDBusConnectionPrivate::getNameOwner(const QString& serviceName)
+ {
+     if (QDBusUtil::isValidUniqueConnectionName(serviceName))
+diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
+index 4adf049..4369fbb 100644
+--- a/src/dbus/qdbusservicewatcher.cpp
++++ b/src/dbus/qdbusservicewatcher.cpp
+@@ -38,6 +38,7 @@
+ #include <QStringList>
+ 
+ #include <private/qobject_p.h>
++#include <private/qdbusconnection_p.h>
+ 
+ #ifndef QT_NO_DBUS
+ 
+@@ -59,7 +60,6 @@ public:
+     void _q_serviceOwnerChanged(const QString &, const QString &, const QString &);
+     void setConnection(const QStringList &services, const QDBusConnection &c, QDBusServiceWatcher::WatchMode watchMode);
+ 
+-    QStringList matchArgsForService(const QString &service);
+     void addService(const QString &service);
+     void removeService(const QString &service);
+ };
+@@ -93,40 +93,16 @@ void QDBusServiceWatcherPrivate::setConnection(const QStringList &s, const QDBus
+     }
+ }
+ 
+-QStringList QDBusServiceWatcherPrivate::matchArgsForService(const QString &service)
+-{
+-    QStringList matchArgs;
+-    matchArgs << service;
+-
+-    switch (watchMode) {
+-    case QDBusServiceWatcher::WatchForOwnerChange:
+-        break;
+-
+-    case QDBusServiceWatcher::WatchForRegistration:
+-        matchArgs << QString::fromLatin1("", 0);
+-        break;
+-
+-    case QDBusServiceWatcher::WatchForUnregistration:
+-        matchArgs << QString() << QString::fromLatin1("", 0);
+-        break;
+-    }
+-    return matchArgs;
+-}
+-
+ void QDBusServiceWatcherPrivate::addService(const QString &service)
+ {
+-    QStringList matchArgs = matchArgsForService(service);
+-    connection.connect(*busService(), QString(), *busInterface(), *signalName(),
+-                       matchArgs, QString(), q_func(),
+-                       SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
++    QDBusConnectionPrivate::d(connection)->watchService(service, watchMode, q_func(),
++                                                        SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
+ }
+ 
+ void QDBusServiceWatcherPrivate::removeService(const QString &service)
+ {
+-    QStringList matchArgs = matchArgsForService(service);
+-    connection.disconnect(*busService(), QString(), *busInterface(), *signalName(),
+-                          matchArgs, QString(), q_func(),
+-                          SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
++    QDBusConnectionPrivate::d(connection)->unwatchService(service, watchMode, q_func(),
++                                                          SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
+ }
+ 
+ /*!
+-- 
+2.1.4
+

=== added file 'debian/patches/Remove-superfluous-code-in-QDBusConnectionPrivate-se.patch'
--- debian/patches/Remove-superfluous-code-in-QDBusConnectionPrivate-se.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Remove-superfluous-code-in-QDBusConnectionPrivate-se.patch	2015-03-19 06:43:56 +0000
@@ -0,0 +1,37 @@
+From 3996be5877787eb5536bb86a409ae7d476656ada Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 18:12:51 -0200
+Subject: [PATCH] Remove superfluous code in
+ QDBusConnectionPrivate::sendWithReply
+
+No need to check for the local loop if that's the first thing
+QDBusConnectionPrivate::sendWithReplyAsync will do. The side effect is
+that this now allocates memory for the QDBusPendingCallPrivate object,
+but loopback messages aren't that common to be worth the special casing.
+
+Task-number: QTBUG-43585
+Change-Id: Ic5d393bfd36e48a193fcffff13b73756ab802ba2
+---
+ src/dbus/qdbusintegrator.cpp | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index e32533e..6707e28 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1959,12 +1959,6 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
+ {
+     QDBusBlockingCallWatcher watcher(message);
+ 
+-    checkThread();
+-    if ((sendMode == QDBus::BlockWithGui || sendMode == QDBus::Block)
+-         && isServiceRegisteredByThread(message.service()))
+-        // special case for synchronous local calls
+-        return sendWithReplyLocal(message);
+-
+     QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, 0, 0, 0, timeout);
+     Q_ASSERT(pcall);
+ 
+-- 
+2.1.4
+

=== added file 'debian/patches/Remove-the-event-callbacks-in-QDBusConnectionPrivate.patch'
--- debian/patches/Remove-the-event-callbacks-in-QDBusConnectionPrivate.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Remove-the-event-callbacks-in-QDBusConnectionPrivate.patch	2015-03-24 11:31:18 +0000
@@ -0,0 +1,318 @@
+From 79e3c87bc301682199da27af65bec010064ebf58 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Tue, 30 Dec 2014 11:46:52 -0200
+Subject: [PATCH] Remove the event callbacks in QDBusConnectionPrivate
+
+They were used when we called the libdbus-1 message-sending functions
+from any thread, which meant that the callbacks could be triggered on
+any thread. Since we moved the message-sending to one thread only (the
+manager's thread), there's no need for the event fallback anymore.
+
+Since they're also always[*] running on an aux thread, there's no point
+in checking for the presence of a QCoreApplication instance anymore. I
+don't think there has been a need for this for many years, as the event
+dispatcher has been decoupled from QCoreApplication for a long time.
+
+[*] exception: the callbacks are first called in the thread that invoked
+QDBusConnection::connectTo{Bus,Peer}, before we've done the
+moveToThread.
+
+Task-number: QTBUG-43585
+Change-Id: Ic5d393bfd36e48a193fcffff13b73758c798d6b0
+---
+ src/dbus/qdbusconnection_p.h |   1 -
+ src/dbus/qdbusintegrator.cpp | 144 ++++++-------------------------------------
+ src/dbus/qdbusintegrator_p.h |  23 -------
+ 3 files changed, 19 insertions(+), 149 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index 2869982..ea0f221 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -254,7 +254,6 @@ private:
+     void _q_newConnection(QDBusConnectionPrivate *newConnection);
+ 
+ protected:
+-    void customEvent(QEvent *e);
+     void timerEvent(QTimerEvent *e);
+ 
+ public slots:
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 829614a..f34deff 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -128,7 +128,6 @@ extern "C" {
+ 
+     // libdbus-1 callbacks
+ 
+-static bool qDBusRealAddTimeout(QDBusConnectionPrivate *d, DBusTimeout *timeout, int ms);
+ static dbus_bool_t qDBusAddTimeout(DBusTimeout *timeout, void *data)
+ {
+     Q_ASSERT(timeout);
+@@ -137,29 +136,17 @@ static dbus_bool_t qDBusAddTimeout(DBusTimeout *timeout, void *data)
+   //  qDebug("addTimeout %d", q_dbus_timeout_get_interval(timeout));
+ 
+     QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
++    Q_ASSERT(QThread::currentThread() == d->thread());
+ 
+-    if (!q_dbus_timeout_get_enabled(timeout))
+-        return true;
++    // we may get called from qDBusToggleTimeout
++    if (Q_UNLIKELY(!q_dbus_timeout_get_enabled(timeout)))
++        return false;
+ 
+     QDBusDispatchLocker locker(AddTimeoutAction, d);
+-    if (QCoreApplication::instance() && QThread::currentThread() == d->thread()) {
+-        // correct thread
+-        return qDBusRealAddTimeout(d, timeout, q_dbus_timeout_get_interval(timeout));
+-    } else {
+-        // wrong thread: sync back
+-        QDBusConnectionCallbackEvent *ev = new QDBusConnectionCallbackEvent;
+-        ev->subtype = QDBusConnectionCallbackEvent::AddTimeout;
+-        d->timeoutsPendingAdd.append(qMakePair(timeout, q_dbus_timeout_get_interval(timeout)));
+-        d->postEventToThread(AddTimeoutAction, d, ev);
+-        return true;
+-    }
+-}
+-
+-static bool qDBusRealAddTimeout(QDBusConnectionPrivate *d, DBusTimeout *timeout, int ms)
+-{
+     Q_ASSERT(d->timeouts.keys(timeout).isEmpty());
+ 
+-    int timerId = d->startTimer(ms);
++    int timerId = d->startTimer(q_dbus_timeout_get_interval(timeout));
++    Q_ASSERT_X(timerId, "QDBusConnection", "Failed to start a timer");
+     if (!timerId)
+         return false;
+ 
+@@ -175,33 +162,14 @@ static void qDBusRemoveTimeout(DBusTimeout *timeout, void *data)
+   //  qDebug("removeTimeout");
+ 
+     QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
++    Q_ASSERT(QThread::currentThread() == d->thread());
+ 
+     QDBusDispatchLocker locker(RemoveTimeoutAction, d);
+ 
+-    // is it pending addition?
+-    QDBusConnectionPrivate::PendingTimeoutList::iterator pit = d->timeoutsPendingAdd.begin();
+-    while (pit != d->timeoutsPendingAdd.end()) {
+-        if (pit->first == timeout)
+-            pit = d->timeoutsPendingAdd.erase(pit);
+-        else
+-            ++pit;
+-    }
+-
+-    // is it a running timer?
+-    bool correctThread = QCoreApplication::instance() && QThread::currentThread() == d->thread();
+     QDBusConnectionPrivate::TimeoutHash::iterator it = d->timeouts.begin();
+     while (it != d->timeouts.end()) {
+         if (it.value() == timeout) {
+-            if (correctThread) {
+-                // correct thread
+-                d->killTimer(it.key());
+-            } else {
+-                // incorrect thread or no application, post an event for later
+-                QDBusConnectionCallbackEvent *ev = new QDBusConnectionCallbackEvent;
+-                ev->subtype = QDBusConnectionCallbackEvent::KillTimer;
+-                ev->timerId = it.key();
+-                d->postEventToThread(KillTimerAction, d, ev);
+-            }
++            d->killTimer(it.key());
+             it = d->timeouts.erase(it);
+             break;
+         } else {
+@@ -221,52 +189,33 @@ static void qDBusToggleTimeout(DBusTimeout *timeout, void *data)
+     qDBusAddTimeout(timeout, data);
+ }
+ 
+-static bool qDBusRealAddWatch(QDBusConnectionPrivate *d, DBusWatch *watch, int flags, int fd);
+ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
+ {
+     Q_ASSERT(watch);
+     Q_ASSERT(data);
+ 
+     QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
++    Q_ASSERT(QThread::currentThread() == d->thread());
+ 
+     int flags = q_dbus_watch_get_flags(watch);
+     int fd = q_dbus_watch_get_unix_fd(watch);
+ 
+-    if (QCoreApplication::instance() && QThread::currentThread() == d->thread()) {
+-        return qDBusRealAddWatch(d, watch, flags, fd);
+-    } else {
+-        QDBusConnectionCallbackEvent *ev = new QDBusConnectionCallbackEvent;
+-        ev->subtype = QDBusConnectionCallbackEvent::AddWatch;
+-        ev->watch = watch;
+-        ev->fd = fd;
+-        ev->extra = flags;
+-        d->postEventToThread(AddWatchAction, d, ev);
+-        return true;
+-    }
+-}
+-
+-static bool qDBusRealAddWatch(QDBusConnectionPrivate *d, DBusWatch *watch, int flags, int fd)
+-{
+     QDBusConnectionPrivate::Watcher watcher;
+ 
+     QDBusDispatchLocker locker(AddWatchAction, d);
+     if (flags & DBUS_WATCH_READABLE) {
+         //qDebug("addReadWatch %d", fd);
+         watcher.watch = watch;
+-        if (QCoreApplication::instance()) {
+-            watcher.read = new QSocketNotifier(fd, QSocketNotifier::Read, d);
+-            watcher.read->setEnabled(q_dbus_watch_get_enabled(watch));
+-            d->connect(watcher.read, SIGNAL(activated(int)), SLOT(socketRead(int)));
+-        }
++        watcher.read = new QSocketNotifier(fd, QSocketNotifier::Read, d);
++        watcher.read->setEnabled(q_dbus_watch_get_enabled(watch));
++        d->connect(watcher.read, SIGNAL(activated(int)), SLOT(socketRead(int)));
+     }
+     if (flags & DBUS_WATCH_WRITABLE) {
+         //qDebug("addWriteWatch %d", fd);
+         watcher.watch = watch;
+-        if (QCoreApplication::instance()) {
+-            watcher.write = new QSocketNotifier(fd, QSocketNotifier::Write, d);
+-            watcher.write->setEnabled(q_dbus_watch_get_enabled(watch));
+-            d->connect(watcher.write, SIGNAL(activated(int)), SLOT(socketWrite(int)));
+-        }
++        watcher.write = new QSocketNotifier(fd, QSocketNotifier::Write, d);
++        watcher.write->setEnabled(q_dbus_watch_get_enabled(watch));
++        d->connect(watcher.write, SIGNAL(activated(int)), SLOT(socketWrite(int)));
+     }
+     d->watchers.insertMulti(fd, watcher);
+ 
+@@ -281,23 +230,15 @@ static void qDBusRemoveWatch(DBusWatch *watch, void *data)
+     //qDebug("remove watch");
+ 
+     QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
++    Q_ASSERT(QThread::currentThread() == d->thread());
+     int fd = q_dbus_watch_get_unix_fd(watch);
+ 
+     QDBusDispatchLocker locker(RemoveWatchAction, d);
+     QDBusConnectionPrivate::WatcherHash::iterator i = d->watchers.find(fd);
+     while (i != d->watchers.end() && i.key() == fd) {
+         if (i.value().watch == watch) {
+-            if (QCoreApplication::instance() && QThread::currentThread() == d->thread()) {
+-                // correct thread, delete the socket notifiers
+-                delete i.value().read;
+-                delete i.value().write;
+-            } else {
+-                // incorrect thread or no application, use delete later
+-                if (i->read)
+-                    i->read->deleteLater();
+-                if (i->write)
+-                    i->write->deleteLater();
+-            }
++            delete i.value().read;
++            delete i.value().write;
+             i = d->watchers.erase(i);
+         } else {
+             ++i;
+@@ -305,28 +246,15 @@ static void qDBusRemoveWatch(DBusWatch *watch, void *data)
+     }
+ }
+ 
+-static void qDBusRealToggleWatch(QDBusConnectionPrivate *d, DBusWatch *watch, int fd);
+ static void qDBusToggleWatch(DBusWatch *watch, void *data)
+ {
+     Q_ASSERT(watch);
+     Q_ASSERT(data);
+ 
+     QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
++    Q_ASSERT(QThread::currentThread() == d->thread());
+     int fd = q_dbus_watch_get_unix_fd(watch);
+ 
+-    if (QCoreApplication::instance() && QThread::currentThread() == d->thread()) {
+-        qDBusRealToggleWatch(d, watch, fd);
+-    } else {
+-        QDBusConnectionCallbackEvent *ev = new QDBusConnectionCallbackEvent;
+-        ev->subtype = QDBusConnectionCallbackEvent::ToggleWatch;
+-        ev->watch = watch;
+-        ev->fd = fd;
+-        d->postEventToThread(ToggleWatchAction, d, ev);
+-    }
+-}
+-
+-static void qDBusRealToggleWatch(QDBusConnectionPrivate *d, DBusWatch *watch, int fd)
+-{
+     QDBusDispatchLocker locker(ToggleWatchAction, d);
+ 
+     QDBusConnectionPrivate::WatcherHash::iterator i = d->watchers.find(fd);
+@@ -1113,40 +1041,6 @@ void QDBusConnectionPrivate::timerEvent(QTimerEvent *e)
+     doDispatch();
+ }
+ 
+-void QDBusConnectionPrivate::customEvent(QEvent *e)
+-{
+-    Q_ASSERT(e->type() == QEvent::User);
+-
+-    QDBusConnectionCallbackEvent *ev = static_cast<QDBusConnectionCallbackEvent *>(e);
+-    QDBusLockerBase::reportThreadAction(int(AddTimeoutAction) + int(ev->subtype),
+-                                        QDBusLockerBase::BeforeDeliver, this);
+-    switch (ev->subtype)
+-    {
+-    case QDBusConnectionCallbackEvent::AddTimeout: {
+-        QDBusDispatchLocker locker(RealAddTimeoutAction, this);
+-        while (!timeoutsPendingAdd.isEmpty()) {
+-            QPair<DBusTimeout *, int> entry = timeoutsPendingAdd.takeFirst();
+-            qDBusRealAddTimeout(this, entry.first, entry.second);
+-        }
+-        break;
+-    }
+-
+-    case QDBusConnectionCallbackEvent::KillTimer:
+-        killTimer(ev->timerId);
+-        break;
+-
+-    case QDBusConnectionCallbackEvent::AddWatch:
+-        qDBusRealAddWatch(this, ev->watch, ev->extra, ev->fd);
+-        break;
+-
+-    case QDBusConnectionCallbackEvent::ToggleWatch:
+-        qDBusRealToggleWatch(this, ev->watch, ev->fd);
+-        break;
+-    }
+-    QDBusLockerBase::reportThreadAction(int(AddTimeoutAction) + int(ev->subtype),
+-                                        QDBusLockerBase::AfterDeliver, this);
+-}
+-
+ void QDBusConnectionPrivate::doDispatch()
+ {
+     QDBusDispatchLocker locker(DoDispatchAction, this);
+diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h
+index 38aad9f..1d3ffb0 100644
+--- a/src/dbus/qdbusintegrator_p.h
++++ b/src/dbus/qdbusintegrator_p.h
+@@ -123,29 +123,6 @@ private:
+     bool handled;
+ };
+ 
+-class QDBusConnectionCallbackEvent : public QEvent
+-{
+-public:
+-    QDBusConnectionCallbackEvent()
+-        : QEvent(User), subtype(Subtype(0))
+-    { }
+-
+-    DBusWatch *watch;
+-    union {
+-        int timerId;
+-        int fd;
+-    };
+-    int extra;
+-
+-    enum Subtype {
+-        AddTimeout = 0,
+-        KillTimer,
+-        AddWatch,
+-        //RemoveWatch,
+-        ToggleWatch
+-    } subtype;
+-};
+-
+ QT_END_NAMESPACE
+ 
+ Q_DECLARE_METATYPE(QDBusSlotCache)
+-- 
+2.1.4
+

=== added file 'debian/patches/Simplify-some-code-in-QDBusConnectionPrivate-sendWit.patch'
--- debian/patches/Simplify-some-code-in-QDBusConnectionPrivate-sendWit.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Simplify-some-code-in-QDBusConnectionPrivate-sendWit.patch	2015-03-19 06:43:42 +0000
@@ -0,0 +1,76 @@
+From 235657b0f377609562fa2b3a9c3c2c4490b3793c Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 18:01:39 -0200
+Subject: [PATCH] Simplify some code in
+ QDBusConnectionPrivate::sendWithReplyAsync
+
+They're pretty much the same, clearly a copy & paste. Instead, merge the
+two codepaths so that we don't run the risk of applying a change in one
+part and forgetting the other.
+
+Task-number: QTBUG-43585
+Change-Id: Ic5d393bfd36e48a193fcffff13b737560f6753be
+---
+ src/dbus/qdbusintegrator.cpp | 35 +++++++++++------------------------
+ 1 file changed, 11 insertions(+), 24 deletions(-)
+
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 693bfd1..e32533e 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -2028,34 +2028,15 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
+                                                                     QObject *receiver, const char *returnMethod,
+                                                                     const char *errorMethod, int timeout)
+ {
+-    if (isServiceRegisteredByThread(message.service())) {
++    checkThread();
++
++    QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate(message, this);
++    bool isLoopback;
++    if ((isLoopback = isServiceRegisteredByThread(message.service()))) {
+         // special case for local calls
+-        QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate(message, this);
+         pcall->replyMessage = sendWithReplyLocal(message);
+-        if (receiver && returnMethod)
+-            pcall->setReplyCallback(receiver, returnMethod);
+-
+-        if (errorMethod) {
+-            pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
+-            connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod,
+-                    Qt::QueuedConnection);
+-            pcall->watcherHelper->moveToThread(thread());
+-        }
+-
+-        if ((receiver && returnMethod) || errorMethod) {
+-           // no one waiting, will delete pcall in processFinishedCall()
+-           pcall->ref.store(1);
+-        } else {
+-           // set double ref to prevent race between processFinishedCall() and ref counting
+-           // by QDBusPendingCall::QExplicitlySharedDataPointer<QDBusPendingCallPrivate>
+-           pcall->ref.store(2);
+-        }
+-        processFinishedCall(pcall);
+-        return pcall;
+     }
+ 
+-    checkThread();
+-    QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate(message, this);
+     if (receiver && returnMethod)
+         pcall->setReplyCallback(receiver, returnMethod);
+ 
+@@ -2075,6 +2056,12 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
+        pcall->ref.store(2);
+     }
+ 
++    if (isLoopback) {
++        // a loopback call
++        processFinishedCall(pcall);
++        return pcall;
++    }
++
+     QDBusError error;
+     DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message, capabilities, &error);
+     if (!msg) {
+-- 
+2.1.4
+

=== added file 'debian/patches/Use-QDBusConnectionPrivate-when-QDBusServer-receives.patch'
--- debian/patches/Use-QDBusConnectionPrivate-when-QDBusServer-receives.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Use-QDBusConnectionPrivate-when-QDBusServer-receives.patch	2015-03-31 08:55:50 +0000
@@ -0,0 +1,230 @@
+From d42509ff9e81cc391b39f3265f052ea57c349d06 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 18:06:42 -0200
+Subject: [PATCH] Use QDBusConnectionPrivate* when QDBusServer receives a new
+ connection
+
+This is because the socket activity will move to a different thread;
+QDBusConnectionPrivate* can be queued, QDBusConnection can't easily.
+
+Change-Id: I82722016018b7fcfb246cda6043469fadbfd987d
+---
+ src/dbus/qdbusconnection.cpp |  2 +-
+ src/dbus/qdbusconnection_p.h | 17 +++++++++++------
+ src/dbus/qdbusintegrator.cpp | 15 +++++++++++----
+ src/dbus/qdbusserver.cpp     | 15 +++++++++------
+ src/dbus/qdbusserver.h       |  2 ++
+ 5 files changed, 34 insertions(+), 17 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
+index 0adb3dd..bd765a3 100644
+--- a/src/dbus/qdbusconnection.cpp
++++ b/src/dbus/qdbusconnection.cpp
+@@ -929,7 +929,7 @@ QObject *QDBusConnection::objectRegisteredAt(const QString &path) const
+ */
+ QDBusConnectionInterface *QDBusConnection::interface() const
+ {
+-    if (!d)
++    if (!d || d->mode != QDBusConnectionPrivate::ClientMode)
+         return 0;
+     return d->busService;
+ }
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index 5d8777c..63e4deb 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -79,6 +80,7 @@ struct QDBusMetaObject;
+ class QDBusAbstractInterface;
+ class QDBusConnectionInterface;
+ class QDBusPendingCallPrivate;
++class QDBusServer;
+ 
+ #ifndef QT_BOOTSTRAPPED
+ 
+@@ -192,7 +194,7 @@ public:
+     void setBusService(const QDBusConnection &connection);
+     void setPeer(DBusConnection *connection, const QDBusErrorInternal &error);
+     void setConnection(DBusConnection *connection, const QDBusErrorInternal &error);
+-    void setServer(DBusServer *server, const QDBusErrorInternal &error);
++    void setServer(QDBusServer *object, DBusServer *server, const QDBusErrorInternal &error);
+     void closeConnection();
+ 
+     QString getNameOwner(const QString &service);
+@@ -229,9 +231,6 @@ public:
+ 
+     void postEventToThread(int action, QObject *target, QEvent *event);
+ 
+-    inline void serverConnection(const QDBusConnection &connection)
+-        { emit newServerConnection(connection); }
+-
+ private:
+     void checkThread();
+     bool handleError(const QDBusErrorInternal &error);
+@@ -253,6 +252,8 @@ private:
+ 
+     QString getNameOwnerNoCache(const QString &service);
+ 
++    void _q_newConnection(QDBusConnectionPrivate *newConnection);
++
+ protected:
+     void customEvent(QEvent *e);
+     void timerEvent(QTimerEvent *e);
+@@ -273,7 +274,7 @@ private slots:
+ signals:
+     void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
+     void callWithCallbackFailed(const QDBusError &error, const QDBusMessage &message);
+-    void newServerConnection(const QDBusConnection &connection);
++    void newServerConnection(QDBusConnectionPrivate *newConnection);
+ 
+ public:
+     QAtomicInt ref;
+@@ -283,7 +284,10 @@ public:
+     QStringList serverConnectionNames;
+ 
+     ConnectionMode mode;
+-    QDBusConnectionInterface *busService;
++    union {
++        QDBusConnectionInterface *busService;
++        QDBusServer *serverObject;
++    };
+ 
+     // the dispatch lock protects everything related to the DBusConnection or DBusServer
+     // including the timeouts and watches
+@@ -334,6 +338,7 @@ public:
+ 
+     friend class QDBusActivateObjectEvent;
+     friend class QDBusCallDeliveryEvent;
++    friend class QDBusServer;
+ };
+ 
+ // in qdbusmisc.cpp
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 4fd324e..6d7729e 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -52,6 +53,7 @@
+ #include "qdbusmetatype_p.h"
+ #include "qdbusabstractadaptor.h"
+ #include "qdbusabstractadaptor_p.h"
++#include "qdbusserver.h"
+ #include "qdbusutil_p.h"
+ #include "qdbusvirtualobject.h"
+ #include "qdbusmessage_p.h"
+@@ -391,10 +393,14 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, v
+     QDBusErrorInternal error;
+     newConnection->setPeer(connection, error);
+ 
+-    QDBusConnection retval = QDBusConnectionPrivate::q(newConnection);
++    // this is a queued connection and will resume in the QDBusServer's thread
++    emit serverConnection->newServerConnection(newConnection);
++}
+ 
+-    // make QDBusServer emit the newConnection signal
+-    serverConnection->serverConnection(retval);
++void QDBusConnectionPrivate::_q_newConnection(QDBusConnectionPrivate *newConnection)
++{
++    Q_ASSERT(mode == ServerMode);
++    emit serverObject->newConnection(QDBusConnectionPrivate::q(newConnection));
+ }
+ 
+ } // extern "C"
+@@ -1643,9 +1649,10 @@ void QDBusConnectionPrivate::handleSignal(const QDBusMessage& msg)
+     handleSignal(key, msg);                  // third try
+ }
+ 
+-void QDBusConnectionPrivate::setServer(DBusServer *s, const QDBusErrorInternal &error)
++void QDBusConnectionPrivate::setServer(QDBusServer *object, DBusServer *s, const QDBusErrorInternal &error)
+ {
+     mode = ServerMode;
++    serverObject = object;
+     if (!s) {
+         handleError(error);
+         return;
+diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
+index 2fc7c75..fc19ef7 100644
+--- a/src/dbus/qdbusserver.cpp
++++ b/src/dbus/qdbusserver.cpp
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -64,11 +65,11 @@ QDBusServer::QDBusServer(const QString &address, QObject *parent)
+     }
+     d = new QDBusConnectionPrivate(this);
+ 
+-    QObject::connect(d, SIGNAL(newServerConnection(QDBusConnection)),
+-                     this, SIGNAL(newConnection(QDBusConnection)));
++    QObject::connect(d, SIGNAL(newServerConnection(QDBusConnectionPrivate*)),
++                     this, SLOT(_q_newConnection(QDBusConnectionPrivate*)), Qt::QueuedConnection);
+ 
+     QDBusErrorInternal error;
+-    d->setServer(q_dbus_server_listen(address.toUtf8().constData(), error), error);
++    d->setServer(this, q_dbus_server_listen(address.toUtf8().constData(), error), error);
+ }
+ 
+ /*!
+@@ -92,11 +93,11 @@ QDBusServer::QDBusServer(QObject *parent)
+     }
+     d = new QDBusConnectionPrivate(this);
+ 
+-    QObject::connect(d, SIGNAL(newServerConnection(QDBusConnection)),
+-                     this, SIGNAL(newConnection(QDBusConnection)));
++    QObject::connect(d, SIGNAL(newServerConnection(QDBusConnectionPrivate*)),
++                     this, SLOT(_q_newConnection(QDBusConnectionPrivate*)), Qt::QueuedConnection);
+ 
+     QDBusErrorInternal error;
+-    d->setServer(q_dbus_server_listen(address, error), error);
++    d->setServer(this, q_dbus_server_listen(address, error), error);
+ }
+ 
+ /*!
+@@ -185,4 +186,6 @@ bool QDBusServer::isAnonymousAuthenticationAllowed() const
+ 
+ QT_END_NAMESPACE
+ 
++#include "moc_qdbusserver.cpp"
++
+ #endif // QT_NO_DBUS
+diff --git a/src/dbus/qdbusserver.h b/src/dbus/qdbusserver.h
+index cdd5318..2f4477a 100644
+--- a/src/dbus/qdbusserver.h
++++ b/src/dbus/qdbusserver.h
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -66,6 +67,7 @@ Q_SIGNALS:
+ 
+ private:
+     Q_DISABLE_COPY(QDBusServer)
++    Q_PRIVATE_SLOT(d, void _q_newConnection(QDBusConnectionPrivate*))
+     QDBusConnectionPrivate *d;
+ };
+ 
+-- 
+2.1.4
+

=== added file 'debian/patches/Use-QDBusServiceWatcher-in-QDBusAbstractInterface-to.patch'
--- debian/patches/Use-QDBusServiceWatcher-in-QDBusAbstractInterface-to.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Use-QDBusServiceWatcher-in-QDBusAbstractInterface-to.patch	2015-03-19 06:50:14 +0000
@@ -0,0 +1,131 @@
+From 8df962df6370e27dd828916f9f073f13aba5a07d Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 23:37:11 -0200
+Subject: [PATCH] Use QDBusServiceWatcher in QDBusAbstractInterface to track
+ the owner
+
+Instead of connecting to the "NameOwnerChanged" signal. This has
+better performance, is simpler to implement and is future-proof: when we
+switch to kdbus, there won't be a "NameOwnerChanged" signal to connect
+to. On the drawback side, this will use slightly more memory.
+
+Change-Id: I5801b8027949f041309567a493000fe7de9bf227
+---
+ src/dbus/qdbusabstractinterface.cpp | 45 ++++++++++++++-----------------------
+ src/dbus/qdbusabstractinterface_p.h |  2 ++
+ 2 files changed, 19 insertions(+), 28 deletions(-)
+
+diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
+index bd1bc71..15090ce 100644
+--- a/src/dbus/qdbusabstractinterface.cpp
++++ b/src/dbus/qdbusabstractinterface.cpp
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -41,6 +42,7 @@
+ #include "qdbusmessage_p.h"
+ #include "qdbusmetaobject_p.h"
+ #include "qdbusmetatype_p.h"
++#include "qdbusservicewatcher.h"
+ #include "qdbusutil_p.h"
+ 
+ #include <qdebug.h>
+@@ -97,6 +99,17 @@ QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv
+     }
+ }
+ 
++void QDBusAbstractInterfacePrivate::initOwnerTracking()
++{
++    if (!isValid || !connection.isConnected() || connectionPrivate()->mode == QDBusConnectionPrivate::PeerMode)
++        return;
++    if (service.isEmpty() || service.startsWith(QLatin1Char(':')))
++        return;
++    QObject::connect(new QDBusServiceWatcher(service, connection, QDBusServiceWatcher::WatchForOwnerChange, q_func()),
++                     SIGNAL(serviceOwnerChanged(QString,QString,QString)),
++                     q_func(), SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
++}
++
+ bool QDBusAbstractInterfacePrivate::canMakeCalls() const
+ {
+     // recheck only if we have a wildcard (i.e. empty) service or path
+@@ -217,9 +230,8 @@ void QDBusAbstractInterfacePrivate::_q_serviceOwnerChanged(const QString &name,
+ {
+     Q_UNUSED(oldOwner);
+     //qDebug() << "QDBusAbstractInterfacePrivate serviceOwnerChanged" << name << oldOwner << newOwner;
+-    if (name == service) {
+-        currentOwner = newOwner;
+-    }
++    Q_ASSERT(name == service);
++    currentOwner = newOwner;
+ }
+ 
+ QDBusAbstractInterfaceBase::QDBusAbstractInterfaceBase(QDBusAbstractInterfacePrivate &d, QObject *parent)
+@@ -284,19 +296,7 @@ int QDBusAbstractInterfaceBase::qt_metacall(QMetaObject::Call _c, int _id, void
+ QDBusAbstractInterface::QDBusAbstractInterface(QDBusAbstractInterfacePrivate &d, QObject *parent)
+     : QDBusAbstractInterfaceBase(d, parent)
+ {
+-    // keep track of the service owner
+-    if (d.isValid &&
+-        d.connection.isConnected()
+-        && !d.service.isEmpty()
+-        && !d.service.startsWith(QLatin1Char(':'))
+-        && d.connectionPrivate()->mode != QDBusConnectionPrivate::PeerMode)
+-        d_func()->connection.connect(QLatin1String(DBUS_SERVICE_DBUS), // service
+-                                     QString(), // path
+-                                     QLatin1String(DBUS_INTERFACE_DBUS), // interface
+-                                     QLatin1String("NameOwnerChanged"),
+-                                     QStringList() << d.service,
+-                                     QString(), // signature
+-                                     this, SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
++    d.initOwnerTracking();
+ }
+ 
+ /*!
+@@ -311,18 +311,7 @@ QDBusAbstractInterface::QDBusAbstractInterface(const QString &service, const QSt
+                                                  con, false), parent)
+ {
+     // keep track of the service owner
+-    if (d_func()->isValid &&
+-        d_func()->connection.isConnected()
+-        && !service.isEmpty()
+-        && !service.startsWith(QLatin1Char(':'))
+-        && d_func()->connectionPrivate()->mode != QDBusConnectionPrivate::PeerMode)
+-        d_func()->connection.connect(QLatin1String(DBUS_SERVICE_DBUS), // service
+-                                     QString(), // path
+-                                     QLatin1String(DBUS_INTERFACE_DBUS), // interface
+-                                     QLatin1String("NameOwnerChanged"),
+-                                     QStringList() << service,
+-                                     QString(), //signature
+-                                     this, SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
++    d_func()->initOwnerTracking();
+ }
+ 
+ /*!
+diff --git a/src/dbus/qdbusabstractinterface_p.h b/src/dbus/qdbusabstractinterface_p.h
+index 3873e96..ad20053 100644
+--- a/src/dbus/qdbusabstractinterface_p.h
++++ b/src/dbus/qdbusabstractinterface_p.h
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -78,6 +79,7 @@ public:
+     QDBusAbstractInterfacePrivate(const QString &serv, const QString &p,
+                                   const QString &iface, const QDBusConnection& con, bool dynamic);
+     virtual ~QDBusAbstractInterfacePrivate() { }
++    void initOwnerTracking();
+     bool canMakeCalls() const;
+ 
+     // these functions do not check if the property is valid
+-- 
+2.1.4
+

=== added file 'debian/patches/Use-a-dedicated-thread-for-handling-incoming-libdbus.patch'
--- debian/patches/Use-a-dedicated-thread-for-handling-incoming-libdbus.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Use-a-dedicated-thread-for-handling-incoming-libdbus.patch	2015-03-31 10:56:08 +0000
@@ -0,0 +1,389 @@
+From 820669776945404faf285e6d1c12f909cbb43f3d Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 29 Dec 2014 11:35:36 -0200
+Subject: [PATCH] Use a dedicated thread for handling incoming libdbus-1 events
+
+Each application will have one thread dedicated for this, for all
+QDBusConnections. I wouldn't mind sharing such a thread with other uses
+in Qt, provided none of them ever block (the QProcessManager thread
+comes to mind, but it's going away soon).
+
+The cost associated with this change in this commit is so far rather
+minimal. All incoming D-Bus calls need to be handled after an event is
+posted anyway, to avoid deadlocking on reentering libdbus-1 functions
+that acquire locks still held. The cost is the one more thread running
+and the cost of synchronizing them when an event is posted.
+
+The benefits far outweigh that cost: no longer will we have problems of
+QtDBus failing to run if the main system or session connections are used
+before QCoreApplication is run. Moreover, events can be received and
+handled in aux threads even if the main thread is blocked on some
+operation.
+
+Note: this commit may not be testable (tst_qdbusconnection may fail)
+
+Task-number: QTBUG-43585
+Change-Id: Ic5d393bfd36e48a193fcffff13b737556ccd11a8
+---
+ src/dbus/qdbusconnection.cpp                       | 56 ++++++++++++----------
+ src/dbus/qdbusconnectionmanager_p.h                | 11 ++++-
+ src/dbus/qdbusintegrator.cpp                       | 12 ++---
+ src/dbus/qdbusserver.cpp                           |  6 ++-
+ .../dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp | 33 +------------
+ 5 files changed, 48 insertions(+), 70 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
+index bd765a3..44e5f62 100644
+--- a/src/dbus/qdbusconnection.cpp
++++ b/src/dbus/qdbusconnection.cpp
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -77,17 +78,16 @@ void QDBusConnectionManager::removeConnection(const QString &name)
+     // ### Output a warning if connections are being used after they have been removed.
+ }
+ 
++QDBusConnectionManager::QDBusConnectionManager()
++{
++    moveToThread(Q_NULLPTR);    // we don't handle events
++    start();
++}
++
+ QDBusConnectionManager::~QDBusConnectionManager()
+ {
+-    for (QHash<QString, QDBusConnectionPrivate *>::const_iterator it = connectionHash.constBegin();
+-         it != connectionHash.constEnd(); ++it) {
+-        QDBusConnectionPrivate *d = it.value();
+-        if (!d->ref.deref())
+-            d->deleteYourself();
+-        else
+-            d->closeConnection();
+-    }
+-    connectionHash.clear();
++    quit();
++    wait();
+ }
+ 
+ QDBusConnectionManager* QDBusConnectionManager::instance()
+@@ -106,6 +106,23 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP
+     c->name = name;
+ }
+ 
++void QDBusConnectionManager::run()
++{
++    exec();
++
++    // cleanup:
++    QMutexLocker locker(&mutex);
++    for (QHash<QString, QDBusConnectionPrivate *>::const_iterator it = connectionHash.constBegin();
++         it != connectionHash.constEnd(); ++it) {
++        QDBusConnectionPrivate *d = it.value();
++        if (d->ref.deref())
++            delete d;
++        else
++            d->closeConnection();
++    }
++    connectionHash.clear();
++}
++
+ /*!
+     \class QDBusConnection
+     \inmodule QtDBus
+@@ -295,8 +312,6 @@ QDBusConnection &QDBusConnection::operator=(const QDBusConnection &other)
+ */
+ QDBusConnection QDBusConnection::connectToBus(BusType type, const QString &name)
+ {
+-//    Q_ASSERT_X(QCoreApplication::instance(), "QDBusConnection::addConnection",
+-//               "Cannot create connection without a Q[Core]Application instance");
+     if (!qdbus_loadLibDBus()) {
+         QDBusConnectionPrivate *d = 0;
+         return QDBusConnection(d);
+@@ -331,6 +346,7 @@ QDBusConnection QDBusConnection::connectToBus(BusType type, const QString &name)
+     // create the bus service
+     // will lock in QDBusConnectionPrivate::connectRelay()
+     d->setBusService(retval);
++    d->moveToThread(_q_manager());
+ 
+     return retval;
+ }
+@@ -342,8 +358,6 @@ QDBusConnection QDBusConnection::connectToBus(BusType type, const QString &name)
+ QDBusConnection QDBusConnection::connectToBus(const QString &address,
+                                               const QString &name)
+ {
+-//    Q_ASSERT_X(QCoreApplication::instance(), "QDBusConnection::addConnection",
+-//               "Cannot create connection without a Q[Core]Application instance");
+     if (!qdbus_loadLibDBus()) {
+         QDBusConnectionPrivate *d = 0;
+         return QDBusConnection(d);
+@@ -373,6 +387,7 @@ QDBusConnection QDBusConnection::connectToBus(const QString &address,
+     // create the bus service
+     // will lock in QDBusConnectionPrivate::connectRelay()
+     d->setBusService(retval);
++    d->moveToThread(_q_manager());
+ 
+     return retval;
+ }
+@@ -385,8 +400,6 @@ QDBusConnection QDBusConnection::connectToBus(const QString &address,
+ QDBusConnection QDBusConnection::connectToPeer(const QString &address,
+                                                const QString &name)
+ {
+-//    Q_ASSERT_X(QCoreApplication::instance(), "QDBusConnection::addConnection",
+-//               "Cannot create connection without a Q[Core]Application instance");
+     if (!qdbus_loadLibDBus()) {
+         QDBusConnectionPrivate *d = 0;
+         return QDBusConnection(d);
+@@ -405,6 +418,7 @@ QDBusConnection QDBusConnection::connectToPeer(const QString &address,
+ 
+     d->setPeer(c, error);
+     _q_manager()->setConnection(name, d);
++    d->moveToThread(_q_manager());
+ 
+     QDBusConnection retval(d);
+ 
+@@ -1061,16 +1075,7 @@ class QDBusDefaultConnection: public QDBusConnection
+ public:
+     inline QDBusDefaultConnection(BusType type, const char *name)
+         : QDBusConnection(connectToBus(type, QString::fromLatin1(name))), ownName(name)
+-    {
+-        // make sure this connection is running on the main thread
+-        QCoreApplication *instance = QCoreApplication::instance();
+-        if (!instance) {
+-            qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
+-                     type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
+-        } else if (QDBusConnectionPrivate::d(*this)) {
+-            QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
+-        }
+-    }
++    { }
+ 
+     inline ~QDBusDefaultConnection()
+     { disconnectFromBus(QString::fromLatin1(ownName)); }
+@@ -1125,6 +1130,7 @@ QDBusConnection QDBusConnection::sender()
+ */
+ void QDBusConnectionPrivate::setBusService(const QDBusConnection &connection)
+ {
++    Q_ASSERT(mode == ClientMode);
+     busService = new QDBusConnectionInterface(connection, this);
+     ref.deref(); // busService has increased the refcounting to us
+                  // avoid cyclic refcounting
+diff --git a/src/dbus/qdbusconnectionmanager_p.h b/src/dbus/qdbusconnectionmanager_p.h
+index fc0bb51..5b07769 100644
+--- a/src/dbus/qdbusconnectionmanager_p.h
++++ b/src/dbus/qdbusconnectionmanager_p.h
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the QtDBus module of the Qt Toolkit.
+@@ -47,15 +48,17 @@
+ #define QDBUSCONNECTIONMANAGER_P_H
+ 
+ #include "qdbusconnection_p.h"
++#include <QtCore/qthread.h>
+ 
+ #ifndef QT_NO_DBUS
+ 
+ QT_BEGIN_NAMESPACE
+ 
+-class QDBusConnectionManager
++class QDBusConnectionManager : public QThread
+ {
++    Q_OBJECT
+ public:
+-    QDBusConnectionManager() {}
++    QDBusConnectionManager();
+     ~QDBusConnectionManager();
+     static QDBusConnectionManager* instance();
+ 
+@@ -67,6 +67,10 @@
+     void setSender(const QDBusConnectionPrivate *s);
+ 
+     mutable QMutex mutex;
++
++protected:
++    void run() Q_DECL_OVERRIDE;
++
+ private:
+     QHash<QString, QDBusConnectionPrivate *> connectionHash;
+ 
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 79e5b6f..cba45e9 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -1089,13 +1089,7 @@ void QDBusConnectionPrivate::closeConnection()
+ 
+ void QDBusConnectionPrivate::checkThread()
+ {
+-    if (!thread()) {
+-        if (QCoreApplication::instance())
+-            moveToThread(QCoreApplication::instance()->thread());
+-        else
+-            qWarning("The thread that had QDBusConnection('%s') has died and there is no main thread",
+-                     qPrintable(name));
+-    }
++    Q_ASSERT(thread() == QDBusConnectionManager::instance());
+ }
+ 
+ bool QDBusConnectionPrivate::handleError(const QDBusErrorInternal &error)
+@@ -1831,12 +1825,12 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
+         call->pending = 0;
+     }
+ 
+-    locker.unlock();
+-
+     // Are there any watchers?
+     if (call->watcherHelper)
+         call->watcherHelper->emitSignals(msg, call->sentMessage);
+ 
++    locker.unlock();
++
+     if (msg.type() == QDBusMessage::ErrorMessage)
+         emit connection->callWithCallbackFailed(QDBusError(msg), call->sentMessage);
+ 
+diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
+index fc19ef7..85ebb98 100644
+--- a/src/dbus/qdbusserver.cpp
++++ b/src/dbus/qdbusserver.cpp
+@@ -63,13 +63,14 @@ QDBusServer::QDBusServer(const QString &address, QObject *parent)
+         d = 0;
+         return;
+     }
+-    d = new QDBusConnectionPrivate(this);
++    d = new QDBusConnectionPrivate;
+ 
+     QObject::connect(d, SIGNAL(newServerConnection(QDBusConnectionPrivate*)),
+                      this, SLOT(_q_newConnection(QDBusConnectionPrivate*)), Qt::QueuedConnection);
+ 
+     QDBusErrorInternal error;
+     d->setServer(this, q_dbus_server_listen(address.toUtf8().constData(), error), error);
++    d->moveToThread(QDBusConnectionManager::instance());
+ }
+ 
+ /*!
+@@ -91,13 +92,14 @@ QDBusServer::QDBusServer(QObject *parent)
+         d = 0;
+         return;
+     }
+-    d = new QDBusConnectionPrivate(this);
++    d = new QDBusConnectionPrivate;
+ 
+     QObject::connect(d, SIGNAL(newServerConnection(QDBusConnectionPrivate*)),
+                      this, SLOT(_q_newConnection(QDBusConnectionPrivate*)), Qt::QueuedConnection);
+ 
+     QDBusErrorInternal error;
+     d->setServer(this, q_dbus_server_listen(address, error), error);
++    d->moveToThread(QDBusConnectionManager::instance());
+ }
+ 
+ /*!
+diff --git a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
+index 9c334f7..cc12ef8 100644
+--- a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
++++ b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
+@@ -1,6 +1,7 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
++** Copyright (C) 2015 Intel Corporation.
+ ** Contact: http://www.qt-project.org/legal
+ **
+ ** This file is part of the test suite of the Qt Toolkit.
+@@ -172,10 +173,6 @@ QDBusPendingCall tst_QDBusPendingCall::sendError()
+ void tst_QDBusPendingCall::waitForFinished()
+ {
+     QDBusPendingCall ac = sendMessage();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     ac.waitForFinished();
+     QVERIFY(ac.isFinished());
+     QVERIFY(!ac.isError());
+@@ -195,10 +192,6 @@ void tst_QDBusPendingCall::waitForFinished()
+ void tst_QDBusPendingCall::waitForFinished_error()
+ {
+     QDBusPendingCall ac = sendError();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     ac.waitForFinished();
+     QVERIFY(ac.isFinished());
+     QVERIFY(ac.isError());
+@@ -254,10 +247,6 @@ void tst_QDBusPendingCall::callWithCallback_localLoop_errorReply()
+ void tst_QDBusPendingCall::watcher()
+ {
+     QDBusPendingCall ac = sendMessage();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     callCount = 0;
+     watchArgument = 0;
+ 
+@@ -284,10 +273,6 @@ void tst_QDBusPendingCall::watcher()
+ void tst_QDBusPendingCall::watcher_error()
+ {
+     QDBusPendingCall ac = sendError();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     callCount = 0;
+     watchArgument = 0;
+ 
+@@ -312,10 +297,6 @@ void tst_QDBusPendingCall::watcher_error()
+ void tst_QDBusPendingCall::watcher_waitForFinished()
+ {
+     QDBusPendingCall ac = sendMessage();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     callCount = 0;
+     watchArgument = 0;
+ 
+@@ -391,10 +372,6 @@ void tst_QDBusPendingCall::watcher_waitForFinished_threaded()
+ void tst_QDBusPendingCall::watcher_waitForFinished_alreadyFinished()
+ {
+     QDBusPendingCall ac = sendMessage();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     ac.waitForFinished();
+     QVERIFY(ac.isFinished());
+     QVERIFY(!ac.isError());
+@@ -425,10 +402,6 @@ void tst_QDBusPendingCall::watcher_waitForFinished_alreadyFinished()
+ void tst_QDBusPendingCall::watcher_waitForFinished_alreadyFinished_eventLoop()
+ {
+     QDBusPendingCall ac = sendMessage();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     ac.waitForFinished();
+     QVERIFY(ac.isFinished());
+     QVERIFY(!ac.isError());
+@@ -462,10 +435,6 @@ void tst_QDBusPendingCall::watcher_waitForFinished_alreadyFinished_eventLoop()
+ void tst_QDBusPendingCall::watcher_waitForFinished_error()
+ {
+     QDBusPendingCall ac = sendError();
+-    QVERIFY(!ac.isFinished());
+-    QVERIFY(!ac.isError());
+-    QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+-
+     callCount = 0;
+     watchArgument = 0;
+ 
+-- 
+2.1.4
+

=== added file 'debian/patches/Use-a-signal-for-updating-the-dispatch-status.patch'
--- debian/patches/Use-a-signal-for-updating-the-dispatch-status.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Use-a-signal-for-updating-the-dispatch-status.patch	2015-03-19 06:41:29 +0000
@@ -0,0 +1,67 @@
+From 15807ca3c178ee5c886e096d2c3d6beb74605e40 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Tue, 30 Dec 2014 11:51:30 -0200
+Subject: [PATCH] Use a signal for updating the dispatch status
+
+The cost of connecting a signal may be a bit high, but it's comparable
+to looking up the invokable method. However, QMetaMethod::invoke has a
+higher cost than a signal-slot emission -- though in any case they're
+both dwarfed by the cost of allocating the QMetaCallEvent and the
+posting of it.
+
+This is much more readable, though.
+
+Change-Id: Iccecbecbe6288fb3b6d16578fdff3f203b6db29c
+---
+ src/dbus/qdbusconnection_p.h |  1 +
+ src/dbus/qdbusintegrator.cpp | 14 +++-----------
+ 2 files changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index 5ccd015..6977b2e 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -271,6 +271,7 @@ private slots:
+     void unregisterServiceNoLock(const QString &serviceName);
+ 
+ signals:
++    void dispatchStatusChanged();
+     void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
+     void callWithCallbackFailed(const QDBusError &error, const QDBusMessage &message);
+     void newServerConnection(QDBusConnectionPrivate *newConnection);
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index dd1d3f0..3df98e9 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -352,18 +352,8 @@ static void qDBusUpdateDispatchStatus(DBusConnection *connection, DBusDispatchSt
+     Q_ASSERT(connection);
+     Q_UNUSED(connection);
+     QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
+-
+-    static int slotId; // 0 is QObject::deleteLater()
+-    if (!slotId) {
+-        // it's ok to do this: there's no race condition because the store is atomic
+-        // and we always set to the same value
+-        slotId = QDBusConnectionPrivate::staticMetaObject.indexOfSlot("doDispatch()");
+-    }
+-
+-    //qDBusDebug() << "Updating dispatcher status" << slotId;
+     if (new_status == DBUS_DISPATCH_DATA_REMAINS)
+-        QDBusConnectionPrivate::staticMetaObject.method(slotId).
+-            invoke(d, Qt::QueuedConnection);
++        emit d->dispatchStatusChanged();
+ }
+ 
+ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, void *data)
+@@ -1020,6 +1010,8 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
+ #endif
+ 
+     QDBusMetaTypeId::init();
++    connect(this, &QDBusConnectionPrivate::dispatchStatusChanged,
++            this, &QDBusConnectionPrivate::doDispatch, Qt::QueuedConnection);
+ 
+     rootNode.flags = 0;
+ 
+-- 
+2.1.4
+

=== added file 'debian/patches/Use-the-new-QDBusConnectionPrivate-shouldWatchServic.patch'
--- debian/patches/Use-the-new-QDBusConnectionPrivate-shouldWatchServic.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/Use-the-new-QDBusConnectionPrivate-shouldWatchServic.patch	2015-03-31 08:33:09 +0000
@@ -0,0 +1,32 @@
+From 6ac3fd1d34a57cd9e73743e991d81cbfd894cfbe Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 30 Mar 2015 17:54:14 -0700
+Subject: [PATCH] Use the new QDBusConnectionPrivate::shouldWatchService
+ function
+
+That function was added in the previous commit, so deduplicate the code
+from QDBusAbstractInterfacePrivate::initOwnerTracking().
+
+Change-Id: Iee8cbc07c4434ce9b560ffff13d06f1d9fb0cde5
+---
+ src/dbus/qdbusabstractinterface.cpp | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
+index 6093aba..a73869a 100644
+--- a/src/dbus/qdbusabstractinterface.cpp
++++ b/src/dbus/qdbusabstractinterface.cpp
+@@ -101,9 +101,7 @@ QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv
+ 
+ void QDBusAbstractInterfacePrivate::initOwnerTracking()
+ {
+-    if (!isValid || !connection.isConnected() || connectionPrivate()->mode == QDBusConnectionPrivate::PeerMode)
+-        return;
+-    if (service.isEmpty() || service.startsWith(QLatin1Char(':')))
++    if (!isValid || !connection.isConnected() || !connectionPrivate()->shouldWatchService(service))
+         return;
+     QObject::connect(new QDBusServiceWatcher(service, connection, QDBusServiceWatcher::WatchForOwnerChange, q_func()),
+                      SIGNAL(serviceOwnerChanged(QString,QString,QString)),
+-- 
+2.1.4
+

=== modified file 'debian/patches/series'
--- debian/patches/series	2015-03-12 14:44:31 +0000
+++ debian/patches/series	2015-03-31 12:30:05 +0000
@@ -27,3 +27,21 @@
 upstream_xcb-Update-mouse-buttons-from-MotionNotify-events.patch
 upstream-gerrit_Handle-SelectionWindowDestroy-in-QXcbClipboard.patch
 upstream_Call-ofono-nm-Registered-delayed-in-constructor-othe.patch
+upstream_xcb_use_themed_cursor.patch
+# Cherrypicked - will be in 5.5.0
+Use-QDBusServiceWatcher-in-QDBusAbstractInterface-to.patch
+Use-QDBusConnectionPrivate-when-QDBusServer-receives.patch
+Use-a-signal-for-updating-the-dispatch-status.patch
+Make-QDBusConnectionPrivate-send-return-bool.patch
+Implement-the-blocking-QtDBus-call-in-terms-of-the-n.patch
+Use-a-dedicated-thread-for-handling-incoming-libdbus.patch
+Simplify-some-code-in-QDBusConnectionPrivate-sendWit.patch
+Remove-superfluous-code-in-QDBusConnectionPrivate-se.patch
+Move-the-sending-of-the-D-Bus-messages-with-reply-to.patch
+And-move-the-sending-of-other-types-of-D-Bus-message.patch
+Remove-the-event-callbacks-in-QDBusConnectionPrivate.patch
+QDBusServiceWatcher-Move-the-logic-to-QDBusConnectio.patch
+Use-the-new-QDBusConnectionPrivate-shouldWatchServic.patch
+Make-QDBusConnectionPrivate-getNameOwnerNoCache-work.patch
+Bypass-connectSignal-for-receiving-the-NameOwnerChan.patch
+Make-sure-we-don-t-deadlock-when-connecting-signals.patch

=== added file 'debian/patches/upstream_xcb_use_themed_cursor.patch'
--- debian/patches/upstream_xcb_use_themed_cursor.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/upstream_xcb_use_themed_cursor.patch	2015-03-31 12:30:29 +0000
@@ -0,0 +1,47 @@
+From c7b003ea3b8b4b7124d4971df7d910f2bc3fc4fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B8rgen=20Lind?= <jorgen.lind@theqtcompany.com>
+Date: Mon, 30 Mar 2015 12:03:30 +0200
+Subject: [PATCH 03/16] Use Xlib to resolve font cursor if possible
+
+before fallingback to uploading a bitmap cursor
+
+Task-number: QTBUG-30016
+Change-Id: I53eeda6bb5f6cab66e3bc10a2e5382ce55cc1bab
+Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
+---
+ src/plugins/platforms/xcb/qxcbcursor.cpp | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
+index e3a04c1..8dd27ec 100644
+--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
++++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
+@@ -53,6 +53,12 @@ typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *);
+ typedef int (*PtrXcursorLibraryGetDefaultSize)(void *);
+ 
+ #ifdef XCB_USE_XLIB
++#include <X11/Xlib.h>
++enum {
++    XCursorShape = CursorShape
++};
++#undef CursorShape
++
+ static PtrXcursorLibraryLoadCursor ptrXcursorLibraryLoadCursor = 0;
+ static PtrXcursorLibraryGetTheme ptrXcursorLibraryGetTheme = 0;
+ static PtrXcursorLibrarySetTheme ptrXcursorLibrarySetTheme = 0;
+@@ -552,6 +558,12 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+     }
+     if (cursor)
+         return cursor;
++    if (!cursor && cursorId) {
++        cursor = XCreateFontCursor(DISPLAY_FROM_XCB(this), cursorId);
++        if (cursor)
++            return cursor;
++    }
++
+ #endif
+ 
+     // Non-standard X11 cursors are created from bitmaps
+-- 
+2.1.4
+
Download as text