Bug 271795 - MarbleClock initialized with invalid QDateTime
Summary: MarbleClock initialized with invalid QDateTime
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: 1.1.0
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-26 19:05 UTC by Jaime Silva
Modified: 2011-08-19 14:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Silva 2011-04-26 19:05:45 UTC
Version:           unspecified
OS:                All

The MarbleClock class modifies its m_datetime variable on a timer but this variable is not initialized to a proper value on construction.

In the marble application this is not a problem because somewhere this variable is set with a call to MarbleClock::setDateTime().

However, on a marblewidget based application if the same isn't done then this causes odd behaviour. For instance the stars background will jump around randomly because MarbleClock reports random times (Observed on WinXP with Qt 4.7.1).

Suggest initializing m_datetime variable to the current date time or documenting the fact that it must be set explicitly.


Reproducible: Always

Steps to Reproduce:
Create a basic marblewidget application from any of the tutorials. Zoom out to see the stars and watch them jump around randomly when the map is repainted.
Comment 1 Dennis Nienhüser 2011-04-28 00:05:26 UTC
Good catch. I always had the feeling the sun painting of the Marble plasmoid was doing funny things, maybe it's related...
Comment 2 Bernhard Beschow 2011-08-19 11:42:52 UTC
Git commit 5d0745dc1dbcbfa71d686d58734f8b0952f7150f by Bernhard Beschow.
Committed on 19/08/2011 at 13:39.
Pushed by beschow into branch 'master'.

initialize MarbleClock to current date and time

BUG: 271795

M  +1    -2    src/marble_part.cpp
M  +1    -0    src/lib/MarbleClock.cpp
M  +1    -2    src/QtMainWindow.cpp

http://commits.kde.org/marble/5d0745dc1dbcbfa71d686d58734f8b0952f7150f
Comment 3 Bernhard Beschow 2011-08-19 14:00:56 UTC
Git commit 3b2a39d6c185432cec3e26def3ede5d62d2dd990 by Bernhard Beschow.
Committed on 19/08/2011 at 13:39.
Pushed by beschow into branch 'kde-4.7'.

initialize MarbleClock to current date and time

BUG: 271795
(cherry picked from commit 5d0745dc1dbcbfa71d686d58734f8b0952f7150f)

M  +1    -2    src/marble_part.cpp
M  +1    -0    src/lib/MarbleClock.cpp
M  +1    -2    src/QtMainWindow.cpp

http://commits.kde.org/marble/3b2a39d6c185432cec3e26def3ede5d62d2dd990