Commit 7c96c656 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Pass parent widgets to scan dialogs

parent a15bb8be
Pipeline #217975 passed with stage
in 4 minutes and 29 seconds
......@@ -63,14 +63,14 @@ bool SaneDialog::setup()
return true;
// need to select a scanner
m_openDev = m_ksanew->selectDevice(nullptr);
m_openDev = m_ksanew->selectDevice(parentWidget());
if (m_openDev.isEmpty()) {
// either no scanner was found or then cancel was pressed.
return false;
if (!m_ksanew->openDevice(m_openDev)) {
// could not open the scanner
KMessageBox::error(nullptr, i18n("Opening the selected scanner failed."));
KMessageBox::error(parentWidget(), i18n("Opening the selected scanner failed."));
m_openDev = QString();
return false;
Supports Markdown
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