Update to new configuration API.
[pulseview.git] / pv / dialogs / connect.cpp
index bf92998b9b9e65fd7cd1ecf0d1d1c1564914f347..4d33cc9f3b6d1d2e1ebbc798147f53e307d80744 100644 (file)
@@ -106,10 +106,10 @@ void Connect::populate_drivers()
                 * @todo Add support for non-monotonic devices i.e. DMMs
                 * and sensors.
                 */
-               bool supported_device = driver->config_check(
-                       ConfigKey::LOGIC_ANALYZER, ConfigKey::DEVICE_OPTIONS) |
-                                       driver->config_check(
-                       ConfigKey::OSCILLOSCOPE, ConfigKey::DEVICE_OPTIONS);
+               const auto keys = driver->config_keys();
+
+               bool supported_device = keys.count(ConfigKey::LOGIC_ANALYZER) |
+                       keys.count(ConfigKey::OSCILLOSCOPE);
 
                if (supported_device)
                        drivers_.addItem(QString("%1 (%2)").arg(
@@ -197,7 +197,7 @@ void Connect::device_selected(int index)
 
        unset_connection();
 
-       if (driver->config_check(ConfigKey::SERIALCOMM, ConfigKey::SCAN_OPTIONS))
+       if (driver->scan_options().count(ConfigKey::SERIALCOMM))
                set_serial_connection(driver);
 }