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
=== modified file 'plugins/Unity/Session/orientationlock.cpp'
--- plugins/Unity/Session/orientationlock.cpp 2014-08-26 23:33:17 +0000
+++ plugins/Unity/Session/orientationlock.cpp 2014-09-18 14:59:28 +0000
@@ -24,16 +24,16 @@
24 , m_enabled(false)24 , m_enabled(false)
25 , m_savedOrientation(Qt::PortraitOrientation)25 , m_savedOrientation(Qt::PortraitOrientation)
26{26{
27 systemSettings = g_settings_new("com.ubuntu.touch.system");27 m_systemSettings = g_settings_new("com.ubuntu.touch.system");
28 g_signal_connect(systemSettings, "changed::rotation-lock",28 g_signal_connect(m_systemSettings, "changed::rotation-lock",
29 G_CALLBACK(OrientationLock::onEnabledChangedProxy), this);29 G_CALLBACK(OrientationLock::onEnabledChangedProxy), this);
30 m_enabled = g_settings_get_boolean(systemSettings, "rotation-lock");30 m_enabled = g_settings_get_boolean(m_systemSettings, "rotation-lock");
31}31}
3232
33OrientationLock::~OrientationLock()33OrientationLock::~OrientationLock()
34{34{
35 g_signal_handlers_disconnect_by_data(systemSettings, this);35 g_signal_handlers_disconnect_by_data(m_systemSettings, this);
36 g_object_unref(systemSettings);36 g_object_unref(m_systemSettings);
37}37}
3838
39bool OrientationLock::enabled() const39bool OrientationLock::enabled() const
@@ -54,7 +54,7 @@
5454
55void OrientationLock::onEnabledChanged()55void OrientationLock::onEnabledChanged()
56{56{
57 const bool enabled = g_settings_get_boolean(systemSettings, "rotation-lock");57 const bool enabled = g_settings_get_boolean(m_systemSettings, "rotation-lock");
58 if (m_enabled != enabled) {58 if (m_enabled != enabled) {
59 m_enabled = enabled;59 m_enabled = enabled;
60 Q_EMIT enabledChanged();60 Q_EMIT enabledChanged();
6161
=== modified file 'plugins/Unity/Session/orientationlock.h'
--- plugins/Unity/Session/orientationlock.h 2014-08-26 23:33:17 +0000
+++ plugins/Unity/Session/orientationlock.h 2014-09-18 14:59:28 +0000
@@ -19,7 +19,6 @@
1919
20#include <gio/gio.h>20#include <gio/gio.h>
21#include <QtCore/QObject>21#include <QtCore/QObject>
22#include <QtDBus/QDBusInterface>
2322
24/**23/**
25 * @brief The OrientationLock class exports orientation lock related properties to QML24 * @brief The OrientationLock class exports orientation lock related properties to QML
@@ -52,8 +51,7 @@
52 void onEnabledChanged();51 void onEnabledChanged();
5352
54private:53private:
55 QDBusInterface *dbusInterface;54 GSettings *m_systemSettings;
56 GSettings *systemSettings;
5755
58 bool m_enabled;56 bool m_enabled;
59 Qt::ScreenOrientation m_savedOrientation;57 Qt::ScreenOrientation m_savedOrientation;

Subscribers

People subscribed via source and target branches