11 MAINTENANCE::MAINTENANCE(QObject *parent) : QObject(parent) {
12 QTimer *timer =
new QTimer(
this);
13 timer->setInterval(3600000);
14 timer->setSingleShot(
false);
16 connect (timer, SIGNAL(timeout()),
17 this, SLOT(slotMaintenance()));
20 void MAINTENANCE::slotMaintenance() {
21 QTime initime = QTime::currentTime();
22 if (initime.hour() > 2) {
26 qDebug() <<
"maintenance begin";
28 qDebug() <<
"maintenance end:" << initime.msecsTo(QTime::currentTime()) <<
"msecs";
void execMaintenance()
Database maintenance.