LibreVNA-GUI: Update QVariant usage

This commit is contained in:
Alexander Voronov 2023-03-25 00:23:31 +03:00
parent 76448e64ee
commit 3f39a736e0
2 changed files with 2 additions and 2 deletions

View File

@ -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());
} }

View File

@ -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: