Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
adc0ea5a
Commit
adc0ea5a
authored
Jun 20, 2010
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Library: Handle the workspace when loading a project.
parent
a566982f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/Library/Library.cpp
src/Library/Library.cpp
+10
-1
No files found.
src/Library/Library.cpp
View file @
adc0ea5a
...
...
@@ -31,6 +31,8 @@
#include "Library.h"
#include "Media.h"
#include "MetaDataManager.h"
#include "SettingsManager.h"
#include "Workspace.h"
#include <QtDebug>
#include <QDomElement>
...
...
@@ -54,6 +56,13 @@ Library::loadProject( const QDomElement& doc )
if
(
media
.
hasAttribute
(
"mrl"
)
==
true
)
{
QString
mrl
=
media
.
attribute
(
"mrl"
);
//If in workspace: compute the path in workspace
if
(
mrl
.
startsWith
(
Workspace
::
workspacePrefix
)
==
true
)
{
QString
projectPath
=
VLMC_PROJECT_GET_STRING
(
"general/ProjectDir"
);
mrl
=
projectPath
+
'/'
+
mrl
.
mid
(
Workspace
::
workspacePrefix
.
length
()
);
}
Media
*
m
=
addMedia
(
mrl
);
connect
(
m
,
SIGNAL
(
metaDataComputed
(
const
Media
*
)
),
this
,
SLOT
(
mediaLoaded
(
const
Media
*
)
),
Qt
::
QueuedConnection
);
...
...
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