Skip to content
  • Mavroudis Chatzilazaridis's avatar
    urlhandler: Fix devicePicker selection with --device · 67021908
    Mavroudis Chatzilazaridis authored and Albert Vaca Cintora's avatar Albert Vaca Cintora committed
    When using 'Send a file/URL' in the indicator with multiple devices, the
    device the user selects for file sharing is not automatically selected in
    the URL handler dialog that follows.
    
    This happens because `model.rowForDevice(deviceId)` is called without
    waiting for the model to be populated, always returning -1.
    
    Resolving this exposed another bug, where the selected device was still
    not the one picked. This happens because `proxyModel` is used to fill the
    `QComboBox` but `model` is used to find the correct index. Since
    `DevicesPluginFilterProxyModel` sorts and filters the data from `model`
    the indices do not match.
    
    This commit addresses these issues by deferring the device selection until
    data is available and implementing `rowForDevice` for filtered/sorted data
    in `DevicesPluginFilterProxyModel`.
    67021908