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
cdddc4b8
Commit
cdddc4b8
authored
Jan 20, 2020
by
Jean-Baptiste Mardelle
Browse files
Restore opening of clips from command line.
CCBUG: 416404
parent
b86e9224
Pipeline
#13545
passed with stage
in 14 minutes and 24 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core.cpp
View file @
cdddc4b8
...
...
@@ -118,7 +118,7 @@ void Core::build(bool isAppImage, const QString &MltPath)
m_self
->
m_jobManager
.
reset
(
new
JobManager
(
m_self
.
get
()));
}
void
Core
::
initGUI
(
const
QUrl
&
Url
)
void
Core
::
initGUI
(
const
QUrl
&
Url
,
const
QString
&
clipsToLoad
)
{
m_guiConstructed
=
true
;
m_profile
=
KdenliveSettings
::
default_profile
();
...
...
@@ -192,7 +192,7 @@ void Core::initGUI(const QUrl &Url)
connect(m_producerQueue, SIGNAL(removeInvalidProxy(QString,bool)), m_binWidget, SLOT(slotRemoveInvalidProxy(QString,bool)));*/
m_mainWindow
->
init
();
projectManager
()
->
init
(
Url
,
QString
()
);
projectManager
()
->
init
(
Url
,
clipsToLoad
);
if
(
qApp
->
isSessionRestored
())
{
// NOTE: we are restoring only one window, because Kdenlive only uses one MainWindow
m_mainWindow
->
restore
(
1
,
false
);
...
...
src/core.h
View file @
cdddc4b8
...
...
@@ -78,7 +78,7 @@ public:
* If Url is present, it will be opened, otherwise, if openlastproject is
* set, latest project will be opened. If no file is open after trying this,
* a default new file will be created. */
void
initGUI
(
const
QUrl
&
Url
);
void
initGUI
(
const
QUrl
&
Url
,
const
QString
&
clipsToLoad
=
QString
()
);
/** @brief Returns a pointer to the singleton object. */
static
std
::
unique_ptr
<
Core
>
&
self
();
...
...
src/main.cpp
View file @
cdddc4b8
...
...
@@ -225,6 +225,7 @@ int main(int argc, char *argv[])
}
else
if
(
parser
.
value
(
QStringLiteral
(
"mlt-log"
))
==
QStringLiteral
(
"debug"
))
{
mlt_log_set_level
(
MLT_LOG_DEBUG
);
}
const
QString
clipsToLoad
=
parser
.
value
(
QStringLiteral
(
"i"
));
QUrl
url
;
if
(
parser
.
positionalArguments
().
count
()
!=
0
)
{
url
=
QUrl
::
fromLocalFile
(
parser
.
positionalArguments
().
at
(
0
));
...
...
@@ -234,7 +235,7 @@ int main(int argc, char *argv[])
url
=
startup
.
resolved
(
url
);
}
Core
::
build
(
!
parser
.
value
(
QStringLiteral
(
"config"
)).
isEmpty
(),
parser
.
value
(
QStringLiteral
(
"mlt-path"
)));
pCore
->
initGUI
(
url
);
pCore
->
initGUI
(
url
,
clipsToLoad
);
//delete splash;
//splash->endSplash();
//qApp->processEvents();
...
...
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