Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
93d32af3
Commit
93d32af3
authored
Nov 16, 2021
by
Laurent Montel
😁
Browse files
Limit the number of history
parent
3980b488
Pipeline
#98061
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/historyswitchfolder/collectionswitchermodel.cpp
View file @
93d32af3
...
...
@@ -42,6 +42,9 @@ QVariant CollectionSwitcherModel::data(const QModelIndex &index, int role) const
void
CollectionSwitcherModel
::
addHistory
(
const
Akonadi
::
Collection
&
currentCol
,
const
QString
&
fullPath
)
{
if
(
mCollectionsInfo
.
count
()
>
10
)
{
mCollectionsInfo
.
takeFirst
();
}
mCollectionsInfo
.
append
({
currentCol
,
fullPath
});
Q_EMIT
dataChanged
(
createIndex
(
0
,
0
),
createIndex
(
mCollectionsInfo
.
size
()
-
1
,
1
),
{});
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment