fix autosaver once more
This commit is contained in:
parent
bf208fc9dd
commit
e688e2e79f
@ -35,13 +35,16 @@ void AutoSaver::changeOccurred() {
|
|||||||
saveIfNeccessary();
|
saveIfNeccessary();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_timer.start(m_periodicSaveMsecs);
|
QMetaObject::invokeMethod(&m_timer,
|
||||||
|
"start",
|
||||||
|
Qt::ConnectionType::BlockingQueuedConnection,
|
||||||
|
Q_ARG(int, m_periodicSaveMsecs));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoSaver::saveIfNeccessary() {
|
void AutoSaver::saveIfNeccessary() {
|
||||||
if (m_timer.isActive()) {
|
if (m_timer.isActive()) {
|
||||||
m_timer.stop();
|
QMetaObject::invokeMethod(&m_timer, "stop", Qt::ConnectionType::BlockingQueuedConnection);
|
||||||
m_firstChange.invalidate();
|
m_firstChange.invalidate();
|
||||||
|
|
||||||
if (!QMetaObject::invokeMethod(parent(), qPrintable(m_savingSlot), Qt::ConnectionType::DirectConnection)) {
|
if (!QMetaObject::invokeMethod(parent(), qPrintable(m_savingSlot), Qt::ConnectionType::DirectConnection)) {
|
||||||
|
@ -14,6 +14,8 @@ class QWebEngineCookieStore;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
class CookieJar : public QNetworkCookieJar {
|
class CookieJar : public QNetworkCookieJar {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CookieJar(QObject* parent = nullptr);
|
explicit CookieJar(QObject* parent = nullptr);
|
||||||
|
|
||||||
@ -29,15 +31,15 @@ class CookieJar : public QNetworkCookieJar {
|
|||||||
public:
|
public:
|
||||||
static QList<QNetworkCookie> extractCookiesFromUrl(const QString& url);
|
static QList<QNetworkCookie> extractCookiesFromUrl(const QString& url);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void loadCookies();
|
||||||
|
void saveCookies();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool insertCookieInternal(const QNetworkCookie& cookie, bool notify_others, bool should_save);
|
bool insertCookieInternal(const QNetworkCookie& cookie, bool notify_others, bool should_save);
|
||||||
bool updateCookieInternal(const QNetworkCookie& cookie, bool notify_others);
|
bool updateCookieInternal(const QNetworkCookie& cookie, bool notify_others);
|
||||||
bool deleteCookieInternal(const QNetworkCookie& cookie, bool notify_others);
|
bool deleteCookieInternal(const QNetworkCookie& cookie, bool notify_others);
|
||||||
|
|
||||||
private slots:
|
|
||||||
void loadCookies();
|
|
||||||
void saveCookies();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if defined(USE_WEBENGINE)
|
#if defined(USE_WEBENGINE)
|
||||||
QWebEngineCookieStore* m_webEngineCookies;
|
QWebEngineCookieStore* m_webEngineCookies;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user