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
Multimedia
Kdenlive
Commits
94770e55
Commit
94770e55
authored
Feb 17, 2021
by
Julius Künzel
Browse files
Fix downloaded template titles and lumas not found on Windows
(cherry picked from commit
a3226740
)
parent
04c4a1ce
Pipeline
#51356
passed with stage
in 10 minutes and 22 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dialogs/titletemplatedialog.cpp
View file @
94770e55
...
...
@@ -44,8 +44,12 @@ TitleTemplateDialog::TitleTemplateDialog(const QString &folder, QWidget *parent)
}
// System templates
const
QStringList
titleTemplates
=
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppDataLocation
,
QStringLiteral
(
"titles/"
),
QStandardPaths
::
LocateDirectory
);
QStringList
titleTemplates
=
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppDataLocation
,
QStringLiteral
(
"titles/"
),
QStandardPaths
::
LocateDirectory
);
#ifdef Q_OS_WIN
// Windows: downloaded templatates are saved in AppLocalDataLocation
titleTemplates
.
append
(
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppLocalDataLocation
,
QStringLiteral
(
"titles/"
),
QStandardPaths
::
LocateDirectory
));
#endif
titleTemplates
.
removeDuplicates
();
for
(
const
QString
&
folderpath
:
titleTemplates
)
{
QDir
sysdir
(
folderpath
);
const
QStringList
filesnames
=
sysdir
.
entryList
(
filter
,
QDir
::
Files
);
...
...
src/mltconnection.cpp
View file @
94770e55
...
...
@@ -221,7 +221,12 @@ void MltConnection::refreshLumas()
MainWindow
::
m_lumaFiles
.
clear
();
fileFilters
<<
QStringLiteral
(
"*.png"
)
<<
QStringLiteral
(
"*.pgm"
);
QStringList
customLumas
=
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppDataLocation
,
QStringLiteral
(
"lumas"
),
QStandardPaths
::
LocateDirectory
);
#ifdef Q_OS_WIN
// Windows: downloaded lumas are saved in AppLocalDataLocation
customLumas
.
append
(
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppLocalDataLocation
,
QStringLiteral
(
"lumas"
),
QStandardPaths
::
LocateDirectory
));
#endif
customLumas
.
append
(
QString
(
mlt_environment
(
"MLT_DATA"
))
+
QStringLiteral
(
"/lumas"
));
customLumas
.
removeDuplicates
();
QStringList
allImagefiles
;
for
(
const
QString
&
folder
:
qAsConst
(
customLumas
))
{
QDir
topDir
(
folder
);
...
...
src/titler/titlewidget.cpp
View file @
94770e55
...
...
@@ -701,6 +701,11 @@ void TitleWidget::refreshTitleTemplates(const QString &projectPath)
// system templates
QStringList
titleTemplates
=
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppDataLocation
,
QStringLiteral
(
"titles/"
),
QStandardPaths
::
LocateDirectory
);
#ifdef Q_OS_WIN
// Windows: downloaded templatates are saved in AppLocalDataLocation
titleTemplates
.
append
(
QStandardPaths
::
locateAll
(
QStandardPaths
::
AppLocalDataLocation
,
QStringLiteral
(
"titles/"
),
QStandardPaths
::
LocateDirectory
));
#endif
titleTemplates
.
removeDuplicates
();
for
(
const
QString
&
folderpath
:
qAsConst
(
titleTemplates
))
{
QDir
folder
(
folderpath
);
QStringList
filesnames
=
folder
.
entryList
(
filters
,
QDir
::
Files
);
...
...
Julius Künzel
@jlskuz
mentioned in issue
#930 (closed)
·
Feb 17, 2021
mentioned in issue
#930 (closed)
mentioned in issue #930
Toggle commit list
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