mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-23 02:32:10 +02:00
18 lines
393 B
C++
18 lines
393 B
C++
|
#include "autosaver.h"
|
||
|
#include "mainapplication.h"
|
||
|
|
||
|
AutoSaver::AutoSaver(QObject *parent) :
|
||
|
QObject(parent)
|
||
|
,p_mainApp(MainApplication::getInstance())
|
||
|
{
|
||
|
m_timer.start(1000*5, this);
|
||
|
}
|
||
|
|
||
|
void AutoSaver::timerEvent(QTimerEvent *event)
|
||
|
{
|
||
|
if (event->timerId() == m_timer.timerId() && p_mainApp->isChanged())
|
||
|
emit saveApp();
|
||
|
else
|
||
|
QObject::timerEvent(event);
|
||
|
}
|