--- a/src/lib/simulator/src/electronics/components/resistor.cpp
+++ b/src/lib/simulator/src/electronics/components/resistor.cpp
@@ -44,9 +44,9 @@
 void Resistor::propertyChanged(Property& theProperty, QVariant newValue, QVariant oldValue)
 {
     Q_ASSERT(theProperty.name() == "resistance");
-    Q_ASSERT(newValue.asDouble() > 0);
+    Q_ASSERT(newValue.toDouble() > 0);
 
     Q_UNUSED(oldValue);
 
-    m_resistance->setResistance(newValue.asDouble());
+    m_resistance->setResistance(newValue.toDouble());
 }