[Marble-devel] Review Request: Transform MarbleClock into a singleton

marbledeveloper marbledeveloper marbledeveloper at gmail.com
Sat Jun 2 09:24:22 UTC 2012



> On May 31, 2012, 9:27 p.m., Bernhard Beschow wrote:
> > Singletons are like global state which usually causes lots of problems. For instance, I'd expect two different marble widgets inside one application to have independent clocks. Therefore, I think that turning MarbleClock into a singleton is a bad idea.

Well, we can solve this with a MarbleClock list. One MarbleClock singleton for each marble widget. I think that turning MarbleClock into a singleton is a good idea because you can access to Marble clock for some calculus time dependent, for example to calculate the longitude values for the placemarks in a inertial reference system.


- marbledeveloper


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105088/#review14317
-----------------------------------------------------------


On May 28, 2012, 9:12 p.m., marbledeveloper marbledeveloper wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105088/
> -----------------------------------------------------------
> 
> (Updated May 28, 2012, 9:12 p.m.)
> 
> 
> Review request for Marble and Torsten Rahn.
> 
> 
> Description
> -------
> 
> This patch transforms MarbleClock into a singleton. So it's possible to access to it from anywhere of the code.
> 
> 
> Diffs
> -----
> 
>   src/lib/MarbleClock.h fed4448 
>   src/lib/MarbleClock.cpp 56b2fe4 
> 
> Diff: http://git.reviewboard.kde.org/r/105088/diff/
> 
> 
> Testing
> -------
> 
> Usage example:
> 
> #include "MarbleClock.h"
> ...
> MarbleClock::instance()->setUpdateInterval(20);
> ...
> 
> 
> Thanks,
> 
> marbledeveloper marbledeveloper
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120602/3753ec77/attachment.html>


More information about the Marble-devel mailing list