mirror of
https://invent.kde.org/network/krfb
synced 2024-07-01 07:24:29 +00:00
Adapt to KConfigGroup API change
This commit is contained in:
parent
549affa4c3
commit
08dbfaced4
|
@ -129,7 +129,7 @@ InvitationsRfbServer::InvitationsRfbServer()
|
|||
{
|
||||
m_desktopPassword = readableRandomString(4) + QLatin1Char('-') + readableRandomString(3);
|
||||
m_unattendedPassword = readableRandomString(4) + QLatin1Char('-') + readableRandomString(3);
|
||||
KConfigGroup krfbConfig(KSharedConfig::openConfig(),"Security");
|
||||
KConfigGroup krfbConfig(KSharedConfig::openConfig(),QStringLiteral("Security"));
|
||||
m_allowUnattendedAccess = krfbConfig.readEntry(
|
||||
"allowUnattendedAccess", QVariant(false)).toBool();
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void InvitationsRfbServer::walletOpened(bool opened)
|
|||
} else {
|
||||
|
||||
qCDebug(KRFB) << "Could not open KWallet, Falling back to config file";
|
||||
KConfigGroup krfbConfig(KSharedConfig::openConfig(),"Security");
|
||||
KConfigGroup krfbConfig(KSharedConfig::openConfig(),QStringLiteral("Security"));
|
||||
|
||||
desktopPassword = KStringHandler::obscure(krfbConfig.readEntry(
|
||||
"desktopPassword", QString()));
|
||||
|
@ -239,7 +239,7 @@ QString InvitationsRfbServer::readableRandomString(int length)
|
|||
// one place to deal with all security configuration
|
||||
void InvitationsRfbServer::saveSecuritySettings()
|
||||
{
|
||||
KConfigGroup secConfigGroup(KSharedConfig::openConfig(), "Security");
|
||||
KConfigGroup secConfigGroup(KSharedConfig::openConfig(), QStringLiteral("Security"));
|
||||
secConfigGroup.writeEntry("allowUnattendedAccess", m_allowUnattendedAccess);
|
||||
if (KrfbConfig::noWallet()) {
|
||||
// save passwords in config file only if not using kwallet integration
|
||||
|
|
|
@ -264,7 +264,7 @@ void MainWindow::showConfiguration()
|
|||
} else {
|
||||
InvitationsRfbServer::instance->openKWallet();
|
||||
// erase stored passwords from krfbconfig file
|
||||
KConfigGroup securityConfigGroup(KSharedConfig::openConfig(), "Security");
|
||||
KConfigGroup securityConfigGroup(KSharedConfig::openConfig(), QStringLiteral("Security"));
|
||||
securityConfigGroup.deleteEntry("desktopPassword");
|
||||
securityConfigGroup.deleteEntry("unattendedPassword");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user