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