mirror of https://github.com/KDE/kasts.git
Fix windows build
This commit is contained in:
parent
54888f6011
commit
3fef53a355
|
@ -440,6 +440,7 @@ void Sync::savePasswordToKeyChain(const QString &username, const QString &passwo
|
||||||
{
|
{
|
||||||
qCDebug(kastsSync) << "Save the password to the keychain for" << username;
|
qCDebug(kastsSync) << "Save the password to the keychain for" << username;
|
||||||
|
|
||||||
|
#ifndef Q_OS_WINDOWS
|
||||||
QKeychain::WritePasswordJob *job = new QKeychain::WritePasswordJob(qAppName(), this);
|
QKeychain::WritePasswordJob *job = new QKeychain::WritePasswordJob(qAppName(), this);
|
||||||
job->setAutoDelete(false);
|
job->setAutoDelete(false);
|
||||||
job->setKey(username);
|
job->setKey(username);
|
||||||
|
@ -457,6 +458,7 @@ void Sync::savePasswordToKeyChain(const QString &username, const QString &passwo
|
||||||
job->deleteLater();
|
job->deleteLater();
|
||||||
});
|
});
|
||||||
job->start();
|
job->start();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sync::savePasswordToFile(const QString &username, const QString &password)
|
void Sync::savePasswordToFile(const QString &username, const QString &password)
|
||||||
|
@ -569,6 +571,7 @@ void Sync::deletePasswordFromKeychain(const QString &username)
|
||||||
// Workaround: first try and store a dummy entry to the keychain to ensure
|
// Workaround: first try and store a dummy entry to the keychain to ensure
|
||||||
// that the keychain is unlocked before we try to delete the real password
|
// that the keychain is unlocked before we try to delete the real password
|
||||||
|
|
||||||
|
#ifndef Q_OS_WINDOWS
|
||||||
QKeychain::WritePasswordJob *writeDummyJob = new QKeychain::WritePasswordJob(qAppName(), this);
|
QKeychain::WritePasswordJob *writeDummyJob = new QKeychain::WritePasswordJob(qAppName(), this);
|
||||||
writeDummyJob->setAutoDelete(false);
|
writeDummyJob->setAutoDelete(false);
|
||||||
writeDummyJob->setKey(QStringLiteral("dummy"));
|
writeDummyJob->setKey(QStringLiteral("dummy"));
|
||||||
|
@ -614,6 +617,7 @@ void Sync::deletePasswordFromKeychain(const QString &username)
|
||||||
writeDummyJob->deleteLater();
|
writeDummyJob->deleteLater();
|
||||||
});
|
});
|
||||||
writeDummyJob->start();
|
writeDummyJob->start();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sync::registerNewDevice(const QString &id, const QString &caption, const QString &type)
|
void Sync::registerNewDevice(const QString &id, const QString &caption, const QString &type)
|
||||||
|
|
Loading…
Reference in New Issue