X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Fapps%2FScosTime%2Fgui.cpp;h=6b4b1163d1278c5ff19852b56fb57600f13c1cb1;hb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;hp=ed7f09841dbc2f0d0a729d50aa22b8e3490be1ee;hpb=125303c933569fe238a087e5f24128ff2cb30e0a;p=evaf
diff --git a/src/apps/ScosTime/gui.cpp b/src/apps/ScosTime/gui.cpp
index ed7f098..6b4b116 100644
--- a/src/apps/ScosTime/gui.cpp
+++ b/src/apps/ScosTime/gui.cpp
@@ -18,7 +18,6 @@
*/
#include "gui.h"
-#include "version.h"
#include
#include
@@ -26,11 +25,10 @@
#include
#include
-#include
+#include
VER_EXPORT_VERSION_INFO()
-Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, eVaf::ScosTime::Module)
//-------------------------------------------------------------------
@@ -91,7 +89,8 @@ void Internal::DateTime::setEpoch(QDateTime const & epoch)
if (epoch != mEpoch)
{
- if (mDateTime.isValid())
+ // Adjust the date/time if the value was set from a CUC HEX string
+ if (mType == CUC && mDateTime.isValid())
{
qint64 diff = mEpoch.msecsTo(epoch);
mDateTime = mDateTime.addMSecs(diff);
@@ -429,7 +428,7 @@ void Module::dateTimeEdited(QString const & s)
wConvertDateTime->setEnabled(true);
wConvertDateTime->setText(tr("&to ASD", VER_MODULE_NAME_STR));
}
- else if (mDateTime.type() == Internal::DateTime::ISO)
+ else if (mDateTime.type() == Internal::DateTime::ASD)
{
wConvertDateTime->setEnabled(true);
wConvertDateTime->setText(tr("&to ISO", VER_MODULE_NAME_STR));