mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace BlackGui
|
||||
{
|
||||
ContainerType sortedContainer = this->sortContainerByColumn(container, sortColumn, sortOrder);
|
||||
QMetaObject::invokeMethod(this, "ps_updateContainer",
|
||||
Q_ARG(BlackMisc::CVariant, sortedContainer.toCVariant()), Q_ARG(bool, false));
|
||||
Q_ARG(BlackMisc::CVariant, CVariant::from(sortedContainer)), Q_ARG(bool, false));
|
||||
});
|
||||
worker->then(this, &CListModelBase::asyncUpdateFinished);
|
||||
return worker;
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace BlackGui
|
||||
if (rowIndex < 0) { return false; }
|
||||
QModelIndex i = this->index(rowIndex, 0);
|
||||
const CNameVariantPair cv = this->at(i);
|
||||
return value == cv.toCVariant();
|
||||
return value == CVariant::from(cv);
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace BlackGui
|
||||
{
|
||||
ContainerType sortedContainer = model->sortContainerByColumn(container, sortColumn, sortOrder);
|
||||
QMetaObject::invokeMethod(this, "ps_updateContainer",
|
||||
Q_ARG(BlackMisc::CVariant, sortedContainer.toCVariant()), Q_ARG(bool, false), Q_ARG(bool, resize));
|
||||
Q_ARG(BlackMisc::CVariant, CVariant::from(sortedContainer)), Q_ARG(bool, false), Q_ARG(bool, resize));
|
||||
});
|
||||
worker->then(this, &CViewBase::asyncUpdateFinished);
|
||||
return worker;
|
||||
|
||||
Reference in New Issue
Block a user