Add Group::resolveAutoTypeEnabled().

This commit is contained in:
Felix Geyer 2014-04-26 18:30:22 +02:00
parent 7893a2e84d
commit 5de62a5ef4
2 changed files with 21 additions and 0 deletions

View File

@ -658,3 +658,23 @@ bool Group::resolveSearchingEnabled() const
return false;
}
}
bool Group::resolveAutoTypeEnabled() const
{
switch (m_data.autoTypeEnabled) {
case Inherit:
if (!m_parent) {
return true;
}
else {
return m_parent->resolveAutoTypeEnabled();
}
case Enable:
return true;
case Disable:
return false;
default:
Q_ASSERT(false);
return false;
}
}

View File

@ -66,6 +66,7 @@ public:
Group::TriState autoTypeEnabled() const;
Group::TriState searchingEnabled() const;
bool resolveSearchingEnabled() const;
bool resolveAutoTypeEnabled() const;
Entry* lastTopVisibleEntry() const;
bool isExpired() const;