Commit c2cb1044 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

clazy fixes

parent 46eb8fd3
Pipeline #89421 passed with stage
in 37 seconds
......@@ -292,7 +292,6 @@ int KSaneCore::setOptionsMap(const QMap <QString, QString> &opts)
QMap <QString, QString> optionMapCopy = opts;
QString tmp;
int i;
int ret = 0;
......
......@@ -142,6 +142,8 @@ KSaneCore::KSaneOpenStatus KSaneCorePrivate::loadDeviceOptions()
option = new KSaneActionOption(m_saneHandle, i);
break;
}
option->readOption();
option->readValue();
if (option->name() == QStringLiteral(SANE_NAME_SCAN_TL_X)) {
optionTopLeftX = option;
......@@ -175,7 +177,7 @@ KSaneCore::KSaneOpenStatus KSaneCorePrivate::loadDeviceOptions()
if (option->needsPolling()) {
m_optionsPollList.append(option);
if (option->type() == KSaneOption::TypeBool) {
connect( option, &KSaneBaseOption::valueChanged,
connect(option, &KSaneBaseOption::valueChanged, this,
[=]( const QVariant &newValue ) { Q_EMIT q->buttonPressed(option->name(), option->title(), newValue.toBool()); } );
}
}
......
......@@ -20,7 +20,7 @@ KSaneInternalOption::KSaneInternalOption(KSaneBaseOption *option, QObject *paren
d->option = option;
connect(d->option, &KSaneBaseOption::optionReloaded, this, &KSaneOption::optionReloaded);
connect(d->option, &KSaneBaseOption::valueChanged, this, &KSaneOption::valueChanged);
connect(d->option, &KSaneBaseOption::destroyed, [=]() { d->option = nullptr; } );
connect(d->option, &KSaneBaseOption::destroyed, this, [=]() { d->option = nullptr; } );
}
} // NameSpace KSaneIface
......@@ -18,8 +18,6 @@ KSaneActionOption::KSaneActionOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeAction;
readOption();
readValue();
}
bool KSaneActionOption::setValue(const QVariant &)
......
......@@ -21,7 +21,6 @@ KSaneBaseOption::KSaneBaseOption() : QObject()
KSaneBaseOption::KSaneBaseOption(const SANE_Handle handle, const int index)
: QObject(), m_handle(handle), m_index(index)
{
readOption();
}
KSaneBaseOption::~KSaneBaseOption()
......
......@@ -20,8 +20,6 @@ KSaneBoolOption::KSaneBoolOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeBool;
readOption();
readValue();
}
bool KSaneBoolOption::setValue(const QVariant &value)
......
......@@ -25,8 +25,6 @@ KSaneDoubleOption::KSaneDoubleOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeDouble;
readOption();
readValue();
}
void KSaneDoubleOption::readOption()
......
......@@ -22,8 +22,6 @@ KSaneGammaOption::KSaneGammaOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeGamma;
readOption();
readValue();
}
bool KSaneGammaOption::setValue(const QVariant &value)
......
......@@ -21,8 +21,6 @@ KSaneIntegerOption::KSaneIntegerOption(const SANE_Handle handle, const int index
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeInteger;
readOption();
readValue();
}
void KSaneIntegerOption::readValue()
......
......@@ -20,8 +20,6 @@ KSaneListOption::KSaneListOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeValueList;
readOption();
readValue();
}
void KSaneListOption::readValue()
......
......@@ -20,8 +20,6 @@ KSaneStringOption::KSaneStringOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeString;
readOption();
readValue();
}
bool KSaneStringOption::setValue(const QVariant &val)
......
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