Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KIO Extras
Commits
09b438c1
Commit
09b438c1
authored
Jul 30, 2022
by
Méven Car
Committed by
Méven Car
Jul 30, 2022
Browse files
RecentlyUsed: Allow to return more than 50 entries
parent
b8dda4b3
Pipeline
#210537
passed with stage
in 3 minutes and 8 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
recentlyused/recentlyused.cpp
View file @
09b438c1
...
...
@@ -226,14 +226,21 @@ KIO::WorkerResult RecentlyUsed::listDir(const QUrl &url)
const
auto
model
=
runQuery
(
url
);
KIO
::
UDSEntryList
udslist
;
udslist
.
reserve
(
model
->
rowCount
());
bool
canFetchMore
=
true
;
int
row
=
0
;
for
(
int
row
=
0
;
row
<
model
->
rowCount
();
++
row
)
{
const
QModelIndex
index
=
model
->
index
(
row
,
0
);
const
QString
resource
=
model
->
data
(
index
,
ResultModel
::
ResourceRole
).
toString
();
const
QString
mimeType
=
model
->
data
(
index
,
ResultModel
::
MimeType
).
toString
();
while
(
canFetchMore
)
{
for
(;
row
<
model
->
rowCount
();
++
row
)
{
const
QModelIndex
index
=
model
->
index
(
row
,
0
);
const
QString
resource
=
model
->
data
(
index
,
ResultModel
::
ResourceRole
).
toString
();
const
QString
mimeType
=
model
->
data
(
index
,
ResultModel
::
MimeType
).
toString
();
udslist
<<
udsEntryFromResource
(
resource
,
mimeType
,
row
);
udslist
<<
udsEntryFromResource
(
resource
,
mimeType
,
row
);
}
canFetchMore
=
model
->
canFetchMore
(
QModelIndex
());
if
(
canFetchMore
)
{
model
->
fetchMore
(
QModelIndex
());
}
}
listEntries
(
udslist
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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