fix build

This commit is contained in:
Martin Rotter 2021-08-13 11:39:34 +02:00
parent b1e45623c5
commit be051000b5
3 changed files with 11 additions and 8 deletions

View File

@ -506,25 +506,28 @@ void FeedlyNetwork::setBatchSize(int batch_size) {
void FeedlyNetwork::onTokensError(const QString& error, const QString& error_description) {
Q_UNUSED(error)
qApp->showGuiMessage(Notification::Event::GeneralEvent,
qApp->showGuiMessage(Notification::Event::LoginFailure,
tr("Feedly: authentication error"),
tr("Click this to login again. Error is: '%1'").arg(error_description),
QSystemTrayIcon::MessageIcon::Critical,
{}, {},
[this]() {
m_oauth->logout(false);
m_oauth->setAccessToken(QString());
m_oauth->setRefreshToken(QString());
//m_oauth->logout(false);
m_oauth->login();
});
}
void FeedlyNetwork::onAuthFailed() {
qApp->showGuiMessage(Notification::Event::GeneralEvent,
qApp->showGuiMessage(Notification::Event::LoginFailure,
tr("Feedly: authorization denied"),
tr("Click this to login again."),
QSystemTrayIcon::MessageIcon::Critical,
{}, {},
[this]() {
m_oauth->logout(false);
//m_oauth->logout(false);
m_oauth->login();
});
}

View File

@ -420,7 +420,7 @@ QVariantHash GmailNetworkFactory::getProfile(const QNetworkProxy& custom_proxy)
void GmailNetworkFactory::onTokensError(const QString& error, const QString& error_description) {
Q_UNUSED(error)
qApp->showGuiMessage(Notification::Event::GeneralEvent,
qApp->showGuiMessage(Notification::Event::LoginFailure,
tr("Gmail: authentication error"),
tr("Click this to login again. Error is: '%1'").arg(error_description),
QSystemTrayIcon::MessageIcon::Critical,

View File

@ -1081,7 +1081,7 @@ QString GreaderNetwork::generateFullUrl(GreaderNetwork::Operations operation) co
void GreaderNetwork::onTokensError(const QString& error, const QString& error_description) {
Q_UNUSED(error)
qApp->showGuiMessage(Notification::Event::GeneralEvent,
qApp->showGuiMessage(Notification::Event::LoginFailure,
tr("Inoreader: authentication error"),
tr("Click this to login again. Error is: '%1'").arg(error_description),
QSystemTrayIcon::MessageIcon::Critical,
@ -1106,8 +1106,8 @@ void GreaderNetwork::onAuthFailed() {
void GreaderNetwork::initializeOauth() {
#if defined(INOREADER_OFFICIAL_SUPPORT)
m_oauth2->setClientSecretId(TextFactory::decrypt(INOREADER_CLIENT_ID, OAUTH_DECRYPTION_KEY));
m_oauth2->setClientSecretSecret(TextFactory::decrypt(INOREADER_CLIENT_SECRET, OAUTH_DECRYPTION_KEY));
m_oauth->setClientSecretId(TextFactory::decrypt(INOREADER_CLIENT_ID, OAUTH_DECRYPTION_KEY));
m_oauth->setClientSecretSecret(TextFactory::decrypt(INOREADER_CLIENT_SECRET, OAUTH_DECRYPTION_KEY));
#endif
m_oauth->setRedirectUrl(QString(OAUTH_REDIRECT_URI) +