diff --git a/src/comm/LinkConfiguration.cc b/src/comm/LinkConfiguration.cc index 6168ccf6ea3c4dc7085aca7abab8bb7b21dc432f..dc2cbd56736c6f958375801eab7cfb4985e4fee6 100644 --- a/src/comm/LinkConfiguration.cc +++ b/src/comm/LinkConfiguration.cc @@ -118,26 +118,26 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc switch(source->type()) { #ifndef NO_SERIAL_LINK case TypeSerial: - dupe = new SerialConfiguration(dynamic_cast(source)); + dupe = new SerialConfiguration(qobject_cast(source)); break; #endif case TypeUdp: - dupe = new UDPConfiguration(dynamic_cast(source)); + dupe = new UDPConfiguration(qobject_cast(source)); break; case TypeTcp: - dupe = new TCPConfiguration(dynamic_cast(source)); + dupe = new TCPConfiguration(qobject_cast(source)); break; #ifdef QGC_ENABLE_BLUETOOTH case TypeBluetooth: - dupe = new BluetoothConfiguration(dynamic_cast(source)); + dupe = new BluetoothConfiguration(qobject_cast(source)); break; #endif case TypeLogReplay: - dupe = new LogReplayLinkConfiguration(dynamic_cast(source)); + dupe = new LogReplayLinkConfiguration(qobject_cast(source)); break; #ifdef QT_DEBUG case TypeMock: - dupe = new MockConfiguration(dynamic_cast(source)); + dupe = new MockConfiguration(qobject_cast(source)); break; #endif case TypeLast: