#include "versiontimerthread.h" #include "pcloudapp.h" VersionTimerThread::VersionTimerThread(PCloudApp *a,QDateTime d) // d is the current time at the moment of creating the thread { app = a; connect(this, SIGNAL(sendTrayMsg(QString,QString)), app, SLOT(showTrayMessage(QString,QString))); connect(this, SIGNAL(restartTimer(int)), app, SLOT(setTimerInterval(int))); QDateTime now = QDateTime::currentDateTime(); // check if for ssettings set date notifications is missed because of sleep, app close or ect. if(d >= now) dateTimeForNotify = d; else // d is before now { dateTimeForNotify = QDateTime::currentDateTime(); app->settings->setValue("vrsnNotfyDtTime",dateTimeForNotify); qDebug()<quit(); } QDateTime now = QDateTime::currentDateTime(); if(now > dateTimeForNotify) { qDebug()<settings->value("vrsnNotifyInvervalIndx").toInt()); } } } void VersionTimerThread::setNewDateTimeForNotify(QDateTime d) { this->dateTimeForNotify = d; }