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
Multimedia
Kdenlive
Commits
0e56e381
Commit
0e56e381
authored
Oct 07, 2022
by
Jean-Baptiste Mardelle
Browse files
Ensure resource providers are not listed twice.
BUG: 460060
parent
1d5824b0
Pipeline
#243501
passed with stage
in 5 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/onlineresources/providersrepository.cpp
View file @
0e56e381
...
...
@@ -45,13 +45,18 @@ void ProvidersRepository::refresh(bool fullRefresh)
};
QStringList
profilesFiles
;
QStringList
addedProviders
;
// list providers
QStringList
customProfilesDir
=
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppDataLocation
,
QStringLiteral
(
"resourceproviders"
),
QStandardPaths
::
LocateDirectory
);
for
(
const
auto
&
dir
:
qAsConst
(
customProfilesDir
))
{
QStringList
files
=
QDir
(
dir
).
entryList
(
QDir
::
Files
);
for
(
const
auto
&
file
:
qAsConst
(
files
))
{
profilesFiles
<<
QDir
(
dir
).
absoluteFilePath
(
file
);
// Ensure we don't add the same file from different locations (for example Appimage reads its own and the system's resourceproviders folder
if
(
!
addedProviders
.
contains
(
QFileInfo
(
file
).
fileName
()))
{
profilesFiles
<<
QDir
(
dir
).
absoluteFilePath
(
file
);
addedProviders
<<
QFileInfo
(
file
).
fileName
();
}
}
}
...
...
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