mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Rename Group::includeInSearch() to resolveSearchingEnabled().
Make it public and drop the resolveInherit parameter.
This commit is contained in:
parent
ad26d962dc
commit
7893a2e84d
@ -616,7 +616,17 @@ QList<Entry*> Group::search(const QString& searchTerm, Qt::CaseSensitivity caseS
|
||||
bool resolveInherit)
|
||||
{
|
||||
QList<Entry*> searchResult;
|
||||
if (includeInSearch(resolveInherit)) {
|
||||
bool search;
|
||||
if (resolveInherit) {
|
||||
search = resolveSearchingEnabled();
|
||||
}
|
||||
else if (searchingEnabled() == Disable) {
|
||||
search = false;
|
||||
}
|
||||
else {
|
||||
search = true;
|
||||
}
|
||||
if (search) {
|
||||
Q_FOREACH (Entry* entry, m_entries) {
|
||||
if (entry->match(searchTerm, caseSensitivity)) {
|
||||
searchResult.append(entry);
|
||||
@ -629,7 +639,7 @@ QList<Entry*> Group::search(const QString& searchTerm, Qt::CaseSensitivity caseS
|
||||
return searchResult;
|
||||
}
|
||||
|
||||
bool Group::includeInSearch(bool resolveInherit)
|
||||
bool Group::resolveSearchingEnabled() const
|
||||
{
|
||||
switch (m_data.searchingEnabled) {
|
||||
case Inherit:
|
||||
@ -637,12 +647,7 @@ bool Group::includeInSearch(bool resolveInherit)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if (resolveInherit) {
|
||||
return m_parent->includeInSearch(true);
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
return m_parent->resolveSearchingEnabled();
|
||||
}
|
||||
case Enable:
|
||||
return true;
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
QString defaultAutoTypeSequence() const;
|
||||
Group::TriState autoTypeEnabled() const;
|
||||
Group::TriState searchingEnabled() const;
|
||||
bool resolveSearchingEnabled() const;
|
||||
Entry* lastTopVisibleEntry() const;
|
||||
bool isExpired() const;
|
||||
|
||||
@ -147,7 +148,6 @@ private:
|
||||
void cleanupParent();
|
||||
void recCreateDelObjects();
|
||||
void updateTimeinfo();
|
||||
bool includeInSearch(bool resolveInherit);
|
||||
|
||||
QPointer<Database> m_db;
|
||||
Uuid m_uuid;
|
||||
|
Loading…
Reference in New Issue
Block a user