Merge lp:~donadigo/pantheon-agent-geoclue2/code-improvements into lp:~elementary-pantheon/pantheon-agent-geoclue2/trunk
Proposed by
Adam Bieńkowski
Status: | Merged |
---|---|
Approved by: | David Hewitt |
Approved revision: | 19 |
Merged at revision: | 16 |
Proposed branch: | lp:~donadigo/pantheon-agent-geoclue2/code-improvements |
Merge into: | lp:~elementary-pantheon/pantheon-agent-geoclue2/trunk |
Diff against target: |
221 lines (+60/-47) 3 files modified
src/Agent.vala (+30/-29) src/Interfaces.vala (+1/-1) src/Utils.vala (+29/-17) |
To merge this branch: | bzr merge lp:~donadigo/pantheon-agent-geoclue2/code-improvements |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Hewitt | code, function | Approve | |
Review via email: mp+318306@code.launchpad.net |
Commit message
* Initialize fields in construct
* Make GeoClue2Manager a singleton
* Add null checks for methods that need them
Description of the change
This branch improves the way initializing variables, client and manager handling works.
Initializing is now done in the construct clause, and the assignments in fields are now gone.
Instead of getting the proxy of the GeoClue Manager everytime, it is now a singleton, so it is initialized once.
There are also some null checks added because methods like get_geoclue_client could return a nullable object.
There are still some things to think about, but I think it's a good start.
To post a comment you must log in.
Thanks for this, makes some good improvements.