Fix for the CD not being recognised if it is not in the first drive
In KCompactDisc::cdromDeviceUrl(), if the device name is not in the description-to-URL map it is assumed to be a device name in the form "/dev/srN" and is converted to 'passedUrl' for checking against the same map. Unfortunately in Qt5 QUrl("/dev/srN") does not return a full URL including the "file" scheme, so it will not compare equal to any of the map URLs. The effect is that defaultCdromDeviceUrl() is used, which is taken to be the first map entry. Therefore, if the disc is not in the first drive, an incorrect device URL will be used and the disc reading fails. Use QUrl::fromLocalFile() to generate a correct URL for the device name. Allow WMlib debugging to be enabled without recompiling KCompactDisc, by setting the environment variable KCOMPACTDISC_WMLIB_DEBUG.
Showing with 5 additions and 5 deletions