Commit 7695b538 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

correctly load option values during construction

parent 486414c6
......@@ -18,6 +18,8 @@ KSaneActionOption::KSaneActionOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeAction;
readOption();
readValue();
}
bool KSaneActionOption::setValue(const QVariant &)
......
......@@ -22,7 +22,6 @@ KSaneBaseOption::KSaneBaseOption(const SANE_Handle handle, const int index)
: QObject(), m_handle(handle), m_index(index)
{
readOption();
readValue();
}
KSaneBaseOption::~KSaneBaseOption()
......
......@@ -20,6 +20,8 @@ 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,6 +25,8 @@ KSaneDoubleOption::KSaneDoubleOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeDouble;
readOption();
readValue();
}
void KSaneDoubleOption::readOption()
......
......@@ -22,6 +22,8 @@ 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,6 +21,8 @@ KSaneIntegerOption::KSaneIntegerOption(const SANE_Handle handle, const int index
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeInteger;
readOption();
readValue();
}
void KSaneIntegerOption::readValue()
......
......@@ -21,6 +21,8 @@ KSaneListOption::KSaneListOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeValueList;
readOption();
readValue();
}
void KSaneListOption::readValue()
......
......@@ -20,6 +20,8 @@ KSaneStringOption::KSaneStringOption(const SANE_Handle handle, const int index)
: KSaneBaseOption(handle, index)
{
m_optionType = KSaneOption::TypeString;
readOption();
readValue();
}
bool KSaneStringOption::setValue(const QVariant &val)
......
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