LibreVNA-GUI: Update QVariant usage
This commit is contained in:
parent
76448e64ee
commit
3f39a736e0
@ -124,7 +124,7 @@ QWidget *CalibrationMeasurement::Base::createStandardWidget()
|
|||||||
{
|
{
|
||||||
auto cbStandard = new QComboBox();
|
auto cbStandard = new QComboBox();
|
||||||
for(auto s : supportedStandards()) {
|
for(auto s : supportedStandards()) {
|
||||||
cbStandard->addItem(s->getDescription(), qVariantFromValue((void*) s));
|
cbStandard->addItem(s->getDescription(), QVariant::fromValue((void*) s));
|
||||||
if(standard == s) {
|
if(standard == s) {
|
||||||
cbStandard->setCurrentText(s->getDescription());
|
cbStandard->setCurrentText(s->getDescription());
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public:
|
|||||||
mt.construct(ptr, variant.constData());
|
mt.construct(ptr, variant.constData());
|
||||||
}
|
}
|
||||||
QVariant value() {
|
QVariant value() {
|
||||||
return QVariant(variant.type(), ptr);
|
return QVariant(variant.metaType(), ptr);
|
||||||
}
|
}
|
||||||
void* getPtr(){return ptr;}
|
void* getPtr(){return ptr;}
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user