Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
4c03c972
Commit
4c03c972
authored
Jan 13, 2021
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect arguments parsing on app restart.
Should fix
#913
parent
888ba7bc
Pipeline
#47526
passed with stage
in 10 minutes and 34 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
src/doc/kdenlivedoc.cpp
src/doc/kdenlivedoc.cpp
+1
-1
src/main.cpp
src/main.cpp
+7
-7
No files found.
src/doc/kdenlivedoc.cpp
View file @
4c03c972
...
@@ -134,7 +134,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, QString projectFolder, QUndoGroup *und
...
@@ -134,7 +134,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, QString projectFolder, QUndoGroup *und
QFile
file
(
url
.
toLocalFile
());
QFile
file
(
url
.
toLocalFile
());
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
// The file cannot be opened
// The file cannot be opened
if
(
KMessageBox
::
warningContinueCancel
(
parent
,
i18n
(
"Cannot open the project file,
\n
Do you want to open a backup file?"
),
if
(
KMessageBox
::
warningContinueCancel
(
parent
,
i18n
(
"Cannot open the project file
%1
,
\n
Do you want to open a backup file?"
,
file
.
fileName
()
),
i18n
(
"Error opening file"
),
KGuiItem
(
i18n
(
"Open Backup"
)))
==
KMessageBox
::
Continue
)
{
i18n
(
"Error opening file"
),
KGuiItem
(
i18n
(
"Open Backup"
)))
==
KMessageBox
::
Continue
)
{
*
openBackup
=
true
;
*
openBackup
=
true
;
}
}
...
...
src/main.cpp
View file @
4c03c972
...
@@ -293,13 +293,13 @@ int main(int argc, char *argv[])
...
@@ -293,13 +293,13 @@ int main(int argc, char *argv[])
}
}
}
}
}
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
progArgs
;
QStringList
progArgs
=
QString
(
*
argv
).
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
if
(
argc
>
1
)
{
#els
e
// Start at 1 to remove app nam
e
QStringList
progArgs
=
QString
(
*
argv
).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
#endif
progArgs
<<
QString
(
argv
[
i
]);
// Remove app name
}
progArgs
.
takeFirst
();
}
auto
*
restart
=
new
QProcess
;
auto
*
restart
=
new
QProcess
;
restart
->
start
(
app
.
applicationFilePath
(),
progArgs
);
restart
->
start
(
app
.
applicationFilePath
(),
progArgs
);
restart
->
waitForReadyRead
();
restart
->
waitForReadyRead
();
...
...
Write
Preview
Markdown
is supported
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