Merge lp:~mardy/ubuntu-system-settings-online-accounts/password-1508935 into lp:ubuntu-system-settings-online-accounts

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: 311
Merged at revision: 314
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/password-1508935
Merge into: lp:ubuntu-system-settings-online-accounts
Diff against target: 86 lines (+15/-7)
3 files modified
online-accounts-ui/dialog-request.cpp (+2/-0)
online-accounts-ui/qml/SignOnUiDialog.qml (+1/-0)
tests/click-hooks/tst_online_accounts_hooks2.cpp (+12/-7)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/password-1508935
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Online Accounts Pending
Review via email: mp+276845@code.launchpad.net

Commit message

Fixes to the password dialog and tests:
- Correct layout, by setting a height on the button row
- Don't handle the finished() signal more than once
- Fix click hook tests, by using a sincle D-Bus connection for all tests

Description of the change

Fixes to the password dialog and tests:
- Correct layout, by setting a height on the button row
- Don't handle the finished() signal more than once
- Fix click hook tests, by using a sincle D-Bus connection for all tests

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'online-accounts-ui/dialog-request.cpp'
2--- online-accounts-ui/dialog-request.cpp 2014-10-10 11:45:03 +0000
3+++ online-accounts-ui/dialog-request.cpp 2015-11-06 08:12:55 +0000
4@@ -236,6 +236,8 @@
5 Q_Q(DialogRequest);
6
7 DEBUG() << "Dialog closed";
8+ QObject::disconnect(m_dialog, SIGNAL(finished(int)),
9+ this, SLOT(onFinished()));
10
11 QVariantMap reply;
12
13
14=== modified file 'online-accounts-ui/qml/SignOnUiDialog.qml'
15--- online-accounts-ui/qml/SignOnUiDialog.qml 2015-10-22 08:28:26 +0000
16+++ online-accounts-ui/qml/SignOnUiDialog.qml 2015-11-06 08:12:55 +0000
17@@ -83,6 +83,7 @@
18 Item {
19 anchors.left: parent.left
20 anchors.right: parent.right
21+ height: childrenRect.height
22
23 Button {
24 objectName: "cancelButton"
25
26=== modified file 'tests/click-hooks/tst_online_accounts_hooks2.cpp'
27--- tests/click-hooks/tst_online_accounts_hooks2.cpp 2015-09-28 14:35:19 +0000
28+++ tests/click-hooks/tst_online_accounts_hooks2.cpp 2015-11-06 08:12:55 +0000
29@@ -88,6 +88,10 @@
30 QStringList findGeneratedFiles() const;
31
32 private:
33+ QtDBusTest::DBusTestRunner m_dbus;
34+ QtDBusMock::DBusMock m_mock;
35+ FakeSignond m_signond;
36+ QByteArray m_busAddress;
37 QDir m_testDir;
38 QDir m_hooksDir;
39 QDir m_installDir;
40@@ -96,11 +100,15 @@
41
42 OnlineAccountsHooksTest::OnlineAccountsHooksTest():
43 QObject(0),
44+ m_dbus(),
45+ m_mock(m_dbus),
46+ m_signond(&m_mock),
47 m_testDir(TEST_DIR),
48 m_hooksDir(TEST_DIR "/online-accounts-hooks2"),
49 m_installDir(TEST_DIR "/accounts"),
50 m_packageDir(TEST_DIR "/package")
51 {
52+ m_busAddress = qgetenv("DBUS_SESSION_BUS_ADDRESS");
53 }
54
55 void OnlineAccountsHooksTest::clearHooksDir()
56@@ -710,11 +718,8 @@
57
58 void OnlineAccountsHooksTest::testRemovalWithAcl()
59 {
60- QtDBusTest::DBusTestRunner dbus;
61- QtDBusMock::DBusMock mock(dbus);
62- FakeSignond signond(&mock);
63-
64- dbus.startServices();
65+ qputenv("DBUS_SESSION_BUS_ADDRESS", m_busAddress);
66+ m_dbus.startServices();
67
68 QString myApp("applications/com.ubuntu.test_MyAcl.application");
69 writeInstalledFile(myApp,
70@@ -764,7 +769,7 @@
71 initialAcl << "one" << "com-ubuntu.test_MyAcl_0.1" << "two_click";
72 initialInfo["ACL"] = initialAcl;
73 initialInfo["Id"] = 25;
74- signond.addIdentity(25, initialInfo);
75+ m_signond.addIdentity(25, initialInfo);
76
77 /* Now run the hook process; it should delete the .service and .application
78 * files, and also disable the service and remove the app from the ACL */
79@@ -808,6 +813,6 @@
80 QVERIFY(!m_hooksDir.exists(staleTimestamp2));
81 }
82
83-QTEST_MAIN(OnlineAccountsHooksTest);
84+QTEST_GUILESS_MAIN(OnlineAccountsHooksTest);
85
86 #include "tst_online_accounts_hooks2.moc"

Subscribers

People subscribed via source and target branches