mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
AutoSaver: Save when app is about to quit
Fixes changes not being saved in classes where saving is done in destructor, like SpeedDial.
This commit is contained in:
parent
30f5cd2d7e
commit
82a9c398a6
|
@ -18,12 +18,14 @@
|
||||||
#include "autosaver.h"
|
#include "autosaver.h"
|
||||||
|
|
||||||
#include <QTimerEvent>
|
#include <QTimerEvent>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
#define SAVE_DELAY 1000 * 10 // 10 seconds
|
#define SAVE_DELAY 1000 * 10 // 10 seconds
|
||||||
|
|
||||||
AutoSaver::AutoSaver(QObject* parent)
|
AutoSaver::AutoSaver(QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
|
connect(qApp, &QCoreApplication::aboutToQuit, this, &AutoSaver::saveIfNecessary);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoSaver::saveIfNecessary()
|
void AutoSaver::saveIfNecessary()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user