refactor: review delete and new operators

This commit is contained in:
2024-04-17 17:43:33 +03:00
parent 397b523180
commit 95d5bb99c0
46 changed files with 175 additions and 311 deletions

View File

@ -34,8 +34,6 @@ QCronScheduler::QCronScheduler(QObject *_parent)
m_timer->setInterval(60 * 1000);
connect(m_timer, &QTimer::timeout, this, &QCronScheduler::expired);
m_timer->start();
}
@ -44,6 +42,7 @@ QCronScheduler::~QCronScheduler()
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
m_timer->stop();
m_timer->deleteLater();
}
@ -63,6 +62,22 @@ void QCronScheduler::parse(const QString &_timer)
}
void QCronScheduler::start()
{
qCDebug(LOG_LIB) << "Start cron timer";
m_timer->start();
}
void QCronScheduler::stop()
{
qCDebug(LOG_LIB) << "Stop cron timer";
m_timer->stop();
}
void QCronScheduler::expired()
{
auto now = QDateTime::currentDateTime();