Commit a4205b4e authored by Laurent Montel's avatar Laurent Montel 😁

Reserve size in container

Test Plan: compile/test

Reviewers: hein, broulik

Reviewed By: broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8474
parent 3c30283a
......@@ -485,6 +485,7 @@ void FolderModel::setFilterPattern(const QString &pattern)
const QStringList patterns = pattern.split(' ');
m_regExps.clear();
m_regExps.reserve(patterns.count());
foreach (const QString &pattern, patterns) {
QRegExp rx(pattern);
......@@ -851,7 +852,7 @@ void FolderModel::dragSelectedInternal(int x, int y)
emit dataChanged(m_dragIndexes.first(), m_dragIndexes.last(), QVector<int>() << BlankRole);
QModelIndexList sourceDragIndexes;
sourceDragIndexes.reserve(m_dragIndexes.count());
foreach (const QModelIndex &index, m_dragIndexes) {
sourceDragIndexes.append(mapToSource(index));
}
......
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