From 2fea7077c84b97028a424d3e1d66f9838ccf9201 Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Sun, 26 Feb 2017 00:57:07 +0100 Subject: [PATCH] Make the dataengine alignment timer more precise It can and does happen that in case of two clocks, one with seconds and one without, the one without gets 1s behind. That's because the alignment is not corrected when the difference is 1s, however in case of the clock this 1s is cruicial. REVIEW: 123300 --- src/plasma/private/datacontainer_p.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plasma/private/datacontainer_p.cpp b/src/plasma/private/datacontainer_p.cpp index 919311150..5b94e6eee 100644 --- a/src/plasma/private/datacontainer_p.cpp +++ b/src/plasma/private/datacontainer_p.cpp @@ -89,9 +89,7 @@ void SignalRelay::checkAlignment() QTime t = QTime::currentTime(); if (m_align == Plasma::Types::AlignToMinute) { int seconds = t.second(); - if (seconds > 2) { - newTime = ((60 - seconds) * 1000) + 500; - } + newTime = ((60 - seconds) * 1000) + 500; } else if (m_align == Plasma::Types::AlignToHour) { int minutes = t.minute(); int seconds = t.second();