Commit 6aa69092 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

do not allow to query for new devices when a device is opened

CCBUG: 438229
parent ce992725
...@@ -337,7 +337,12 @@ QString KSaneWidget::selectDevice(QWidget *parent) ...@@ -337,7 +337,12 @@ QString KSaneWidget::selectDevice(QWidget *parent)
void KSaneWidget::initGetDeviceList() const void KSaneWidget::initGetDeviceList() const
{ {
d->m_findDevThread->start(); /* On some SANE backends, the handle becomes invalid when
* querying for new devices. Hence, this is only allowed when
* no device is currently opened. */
if (d->m_saneHandle == nullptr) {
d->m_findDevThread->start();
}
} }
bool KSaneWidget::openDevice(const QString &deviceName) bool KSaneWidget::openDevice(const QString &deviceName)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment