mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Avoid allocating temporary containers
This commit is contained in:
parent
49b82ea6a2
commit
b39522f874
@ -983,7 +983,7 @@ QStringList Group::locate(const QString& locateTerm, const QString& currentPath)
|
|||||||
|
|
||||||
for (const Entry* entry : asConst(m_entries)) {
|
for (const Entry* entry : asConst(m_entries)) {
|
||||||
QString entryPath = currentPath + entry->title();
|
QString entryPath = currentPath + entry->title();
|
||||||
if (entryPath.toLower().contains(locateTerm.toLower())) {
|
if (entryPath.contains(locateTerm, Qt::CaseInsensitive)) {
|
||||||
response << entryPath;
|
response << entryPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -480,7 +480,7 @@ bool Merger::mergeHistory(const Entry* sourceEntry, Entry* targetEntry, Group::M
|
|||||||
bool updateTimeInfo = targetEntry->canUpdateTimeinfo();
|
bool updateTimeInfo = targetEntry->canUpdateTimeinfo();
|
||||||
targetEntry->setUpdateTimeinfo(false);
|
targetEntry->setUpdateTimeinfo(false);
|
||||||
targetEntry->removeHistoryItems(targetHistoryItems);
|
targetEntry->removeHistoryItems(targetHistoryItems);
|
||||||
for (Entry* historyItem : merged.values()) {
|
for (Entry* historyItem : merged) {
|
||||||
Q_ASSERT(!historyItem->parent());
|
Q_ASSERT(!historyItem->parent());
|
||||||
targetEntry->addHistoryItem(historyItem);
|
targetEntry->addHistoryItem(historyItem);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user