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