diff --git a/src/librssguard/network-web/oauth2service.cpp b/src/librssguard/network-web/oauth2service.cpp index fe6c0892c..33bb84b46 100644 --- a/src/librssguard/network-web/oauth2service.cpp +++ b/src/librssguard/network-web/oauth2service.cpp @@ -72,6 +72,10 @@ OAuth2Service::OAuth2Service(const QString& auth_url, const QString& token_url, }); } +OAuth2Service::~OAuth2Service() { + qDebugNN << LOGSEC_OAUTH << "Destroying OAuth2Service instance."; +} + QString OAuth2Service::bearer() { if (!isFullyLoggedIn()) { qApp->showGuiMessage(tr("You have to login first"), diff --git a/src/librssguard/network-web/oauth2service.h b/src/librssguard/network-web/oauth2service.h index 4e0a98405..bf91517de 100644 --- a/src/librssguard/network-web/oauth2service.h +++ b/src/librssguard/network-web/oauth2service.h @@ -38,6 +38,7 @@ class OAuth2Service : public QObject { explicit OAuth2Service(const QString& auth_url, const QString& token_url, const QString& client_id, const QString& client_secret, const QString& scope, QObject* parent = nullptr); + virtual ~OAuth2Service(); // Returns bearer HTTP header value. // NOTE: If on working thread, then call this only if isFullyLoggedIn() diff --git a/src/librssguard/services/inoreader/gui/formeditinoreaderaccount.cpp b/src/librssguard/services/inoreader/gui/formeditinoreaderaccount.cpp index 6272dc20e..11be45d4a 100644 --- a/src/librssguard/services/inoreader/gui/formeditinoreaderaccount.cpp +++ b/src/librssguard/services/inoreader/gui/formeditinoreaderaccount.cpp @@ -12,6 +12,8 @@ #include "services/inoreader/inoreaderserviceroot.h" #include "services/inoreader/network/inoreadernetworkfactory.h" +#include + FormEditInoreaderAccount::FormEditInoreaderAccount(QWidget* parent) : FormAccountDetails(qApp->icons()->miscIcon(QSL("inoreader")), parent), m_details(new InoreaderAccountDetails(this)) { insertCustomTab(m_details, tr("Server setup"), 0); @@ -31,6 +33,8 @@ void FormEditInoreaderAccount::apply() { account()->network()->oauth()->setTokensExpireIn(m_details->m_oauth->tokensExpireIn()); m_details->m_oauth->logout(true); m_details->m_oauth->deleteLater(); + + QThread::currentThread()->msleep(300); } account()->network()->oauth()->setClientId(m_details->m_ui.m_txtAppId->lineEdit()->text());