mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Replace occurrences of CVariant::toCVariant() with CVariant::from()
This commit is contained in:
@@ -11,8 +11,10 @@
|
||||
#include "ui_settingshotkeycomponent.h"
|
||||
#include "blackcore/context_settings.h"
|
||||
#include "blackmisc/settingutilities.h"
|
||||
#include "blackmisc/variant.h"
|
||||
|
||||
using namespace BlackCore;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Settings;
|
||||
|
||||
namespace BlackGui
|
||||
@@ -56,7 +58,7 @@ namespace BlackGui
|
||||
void CSettingsHotkeyComponent::ps_saveHotkeys()
|
||||
{
|
||||
const QString path = CSettingUtilities::appendPaths(IContextSettings::PathRoot(), IContextSettings::PathHotkeys());
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), this->ui->tvp_SettingsMiscHotkeys->derivedModel()->getContainer().toCVariant());
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), CVariant::from(this->ui->tvp_SettingsMiscHotkeys->derivedModel()->getContainer()));
|
||||
}
|
||||
|
||||
void CSettingsHotkeyComponent::ps_clearHotkey()
|
||||
|
||||
@@ -79,11 +79,11 @@ namespace BlackGui
|
||||
QObject *sender = QObject::sender();
|
||||
if (sender == this->ui->pb_SettingsTnServersRemoveServer)
|
||||
{
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdRemove(), server.toCVariant());
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdRemove(), CVariant::from(server));
|
||||
}
|
||||
else if (sender == this->ui->pb_SettingsTnServersSaveServer)
|
||||
{
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), server.toCVariant());
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), CVariant::from(server));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace BlackGui
|
||||
// update
|
||||
CSimulatorPluginInfo currentDriver = simDrivers[index];
|
||||
const QString path = CSettingUtilities::appendPaths(IContextSettings::PathSimulatorSettings(), CSettingsSimulator::ValueSelectedDriver());
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), currentDriver.toCVariant());
|
||||
this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), CVariant::from(currentDriver));
|
||||
}
|
||||
|
||||
void CSettingsSimulatorComponent::ps_settingsHaveChanged(uint settingsType)
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace BlackGui
|
||||
// if the channel is selected, do nothing
|
||||
if (!this->isCorrespondingTextMessageTabSelected(message))
|
||||
{
|
||||
emit this->displayInInfoWindow(message.toCVariant(), 5 * 1000);
|
||||
emit this->displayInInfoWindow(CVariant::from(message), 5 * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user