Merge lp:~gerboland/unity8/remove-unused-variable into lp:unity8

Proposed by Gerry Boland
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 1270
Merged at revision: 1304
Proposed branch: lp:~gerboland/unity8/remove-unused-variable
Merge into: lp:unity8
Diff against target: 56 lines (+7/-9)
2 files modified
plugins/Unity/Session/orientationlock.cpp (+6/-6)
plugins/Unity/Session/orientationlock.h (+1/-3)
To merge this branch: bzr merge lp:~gerboland/unity8/remove-unused-variable
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel d'Andrada (community) Approve
Review via email: mp+235145@code.launchpad.net

Commit message

Cleanup: Remove unused member and fix small syntax error in OrientationLock

Description of the change

Cleanup: Remove unused member and fix small syntax error in OrientationLock

 * Are there any related MPs required for this MP to build/function as expected? Please list.
N
 * Did you perform an exploratory manual test run of your code change and any related functionality?
Y
 * Did you make sure that your branch does not contain spurious tags?
Y
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Daniel d'Andrada (dandrader) :
review: Approve
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 'plugins/Unity/Session/orientationlock.cpp'
2--- plugins/Unity/Session/orientationlock.cpp 2014-08-26 23:33:17 +0000
3+++ plugins/Unity/Session/orientationlock.cpp 2014-09-18 14:59:28 +0000
4@@ -24,16 +24,16 @@
5 , m_enabled(false)
6 , m_savedOrientation(Qt::PortraitOrientation)
7 {
8- systemSettings = g_settings_new("com.ubuntu.touch.system");
9- g_signal_connect(systemSettings, "changed::rotation-lock",
10+ m_systemSettings = g_settings_new("com.ubuntu.touch.system");
11+ g_signal_connect(m_systemSettings, "changed::rotation-lock",
12 G_CALLBACK(OrientationLock::onEnabledChangedProxy), this);
13- m_enabled = g_settings_get_boolean(systemSettings, "rotation-lock");
14+ m_enabled = g_settings_get_boolean(m_systemSettings, "rotation-lock");
15 }
16
17 OrientationLock::~OrientationLock()
18 {
19- g_signal_handlers_disconnect_by_data(systemSettings, this);
20- g_object_unref(systemSettings);
21+ g_signal_handlers_disconnect_by_data(m_systemSettings, this);
22+ g_object_unref(m_systemSettings);
23 }
24
25 bool OrientationLock::enabled() const
26@@ -54,7 +54,7 @@
27
28 void OrientationLock::onEnabledChanged()
29 {
30- const bool enabled = g_settings_get_boolean(systemSettings, "rotation-lock");
31+ const bool enabled = g_settings_get_boolean(m_systemSettings, "rotation-lock");
32 if (m_enabled != enabled) {
33 m_enabled = enabled;
34 Q_EMIT enabledChanged();
35
36=== modified file 'plugins/Unity/Session/orientationlock.h'
37--- plugins/Unity/Session/orientationlock.h 2014-08-26 23:33:17 +0000
38+++ plugins/Unity/Session/orientationlock.h 2014-09-18 14:59:28 +0000
39@@ -19,7 +19,6 @@
40
41 #include <gio/gio.h>
42 #include <QtCore/QObject>
43-#include <QtDBus/QDBusInterface>
44
45 /**
46 * @brief The OrientationLock class exports orientation lock related properties to QML
47@@ -52,8 +51,7 @@
48 void onEnabledChanged();
49
50 private:
51- QDBusInterface *dbusInterface;
52- GSettings *systemSettings;
53+ GSettings *m_systemSettings;
54
55 bool m_enabled;
56 Qt::ScreenOrientation m_savedOrientation;

Subscribers

People subscribed via source and target branches