mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-27 12:39:56 +00:00
refactor: review delete and new operators
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user