mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #437 Removed toQVariant and convertFromQVariant.
This commit is contained in:
@@ -46,10 +46,10 @@ namespace BlackGui
|
||||
Q_ASSERT_X(this->getIContextSettings(), Q_FUNC_INFO, "missing settings");
|
||||
|
||||
// set values
|
||||
ui->cb_Plugins->addItem(tr("Auto"), CSimulatorPluginInfo().toQVariant());
|
||||
ui->cb_Plugins->addItem(tr("Auto"), QVariant::fromValue(CSimulatorPluginInfo()));
|
||||
for (const auto &p : getIContextSimulator()->getAvailableSimulatorPlugins())
|
||||
{
|
||||
ui->cb_Plugins->addItem(p.toQString(), p.toQVariant());
|
||||
ui->cb_Plugins->addItem(p.toQString(), QVariant::fromValue(p));
|
||||
}
|
||||
|
||||
// connects
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace BlackGui
|
||||
// otherwise (comboboxes) standard handling via QItemDelegate
|
||||
CKeyboardLineEdit *lineEdit = qobject_cast<CKeyboardLineEdit *>(editor);
|
||||
if (lineEdit)
|
||||
model->setData(index, lineEdit->getKey().toQVariant() , Qt::EditRole);
|
||||
model->setData(index, QVariant::fromValue(lineEdit->getKey()) , Qt::EditRole);
|
||||
else
|
||||
QItemDelegate::setModelData(editor, model, index);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace BlackGui
|
||||
//! Formatted data
|
||||
ObjectType obj = this->getContainerOrFilteredContainer()[index.row()];
|
||||
BlackMisc::CPropertyIndex propertyIndex = this->columnToPropertyIndex(index.column());
|
||||
return formatter->data(role, obj.propertyByIndex(propertyIndex)).toQVariant();
|
||||
return formatter->data(role, obj.propertyByIndex(propertyIndex)).getQVariant();
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType>
|
||||
|
||||
Reference in New Issue
Block a user