refactor: Remove unneeded QVariant() when setting a setting empty to be removed
This commit is contained in:
parent
b25f083433
commit
7a2ceeedf4
4 changed files with 7 additions and 7 deletions
|
|
@ -96,10 +96,10 @@ void DaemonApp::clearWatchdogCommand()
|
||||||
void DaemonApp::clearSettings() const
|
void DaemonApp::clearSettings() const
|
||||||
{
|
{
|
||||||
LOG_INFO("clearing daemon settings");
|
LOG_INFO("clearing daemon settings");
|
||||||
Settings::setValue(Settings::Daemon::Command, QVariant());
|
Settings::setValue(Settings::Daemon::Command);
|
||||||
Settings::setValue(Settings::Daemon::Elevate, QVariant());
|
Settings::setValue(Settings::Daemon::Elevate);
|
||||||
Settings::setValue(Settings::Daemon::LogFile, QVariant());
|
Settings::setValue(Settings::Daemon::LogFile);
|
||||||
Settings::setValue(Settings::Daemon::LogLevel, QVariant());
|
Settings::setValue(Settings::Daemon::LogLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonApp::connectIpcServer(const ipc::DaemonIpcServer *ipcServer) const
|
void DaemonApp::connectIpcServer(const ipc::DaemonIpcServer *ipcServer) const
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ void clearSettings(bool enableRestart)
|
||||||
Settings::proxy().clear();
|
Settings::proxy().clear();
|
||||||
|
|
||||||
// Reset the windowGeometry
|
// Reset the windowGeometry
|
||||||
Settings::setValue(Settings::Gui::WindowGeometry, QVariant());
|
Settings::setValue(Settings::Gui::WindowGeometry);
|
||||||
|
|
||||||
// save but do not emit saving signal which will prevent the current state of
|
// save but do not emit saving signal which will prevent the current state of
|
||||||
// the app config and server configs from being applied.
|
// the app config and server configs from being applied.
|
||||||
|
|
|
||||||
|
|
@ -1223,7 +1223,7 @@ void MainWindow::remoteHostChanged(const QString &newRemoteHost)
|
||||||
m_coreProcess.setAddress(newRemoteHost);
|
m_coreProcess.setAddress(newRemoteHost);
|
||||||
toggleCanRunCore(!newRemoteHost.isEmpty() && ui->rbModeClient->isChecked());
|
toggleCanRunCore(!newRemoteHost.isEmpty() && ui->rbModeClient->isChecked());
|
||||||
if (newRemoteHost.isEmpty()) {
|
if (newRemoteHost.isEmpty()) {
|
||||||
Settings::setValue(Settings::Client::RemoteHost, QVariant());
|
Settings::setValue(Settings::Client::RemoteHost);
|
||||||
} else {
|
} else {
|
||||||
Settings::setValue(Settings::Client::RemoteHost, newRemoteHost);
|
Settings::setValue(Settings::Client::RemoteHost, newRemoteHost);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ void SettingsTests::checkValidSettings()
|
||||||
QCOMPARE(qvariant_cast<QString>(spy.first().at(0)), setting);
|
QCOMPARE(qvariant_cast<QString>(spy.first().at(0)), setting);
|
||||||
QCOMPARE(Settings::value(setting).toString(), "NEW_VALUE");
|
QCOMPARE(Settings::value(setting).toString(), "NEW_VALUE");
|
||||||
|
|
||||||
Settings::setValue(setting, QVariant());
|
Settings::setValue(setting);
|
||||||
QCOMPARE(spy.count(), 2);
|
QCOMPARE(spy.count(), 2);
|
||||||
QCOMPARE(Settings::value(setting).toString(), value);
|
QCOMPARE(Settings::value(setting).toString(), value);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue