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
2563dd6d
Commit
2563dd6d
authored
Apr 01, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project: Do not depend on the workspace location to create a project
parent
e44c2ff2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/Project/Project.cpp
src/Project/Project.cpp
+4
-4
src/Project/Project.h
src/Project/Project.h
+1
-1
No files found.
src/Project/Project.cpp
View file @
2563dd6d
...
@@ -176,11 +176,11 @@ Project::loadProject( const QString &fileName )
...
@@ -176,11 +176,11 @@ Project::loadProject( const QString &fileName )
}
}
void
void
Project
::
newProject
(
const
QString
&
projectName
,
const
QString
&
workspace
Path
)
Project
::
newProject
(
const
QString
&
projectName
,
const
QString
&
project
Path
)
{
{
m_projectName
=
projectName
;
m_projectName
=
projectName
;
//Current project file has already been delete/nulled by closeProject()
//Current project file has already been delete/nulled by closeProject()
m_projectFile
=
new
QFile
(
workspacePath
+
'/'
+
"
project.vlmc"
);
m_projectFile
=
new
QFile
(
projectPath
+
"/
project.vlmc"
);
save
();
save
();
emit
projectLoaded
(
projectName
,
m_projectFile
->
fileName
()
);
emit
projectLoaded
(
projectName
,
m_projectFile
->
fileName
()
);
}
}
...
@@ -234,8 +234,8 @@ Project::saveAs()
...
@@ -234,8 +234,8 @@ Project::saveAs()
{
{
if
(
m_projectManagerUi
==
NULL
)
if
(
m_projectManagerUi
==
NULL
)
return
;
return
;
const
QString
&
fileName
=
m_projectManagerUi
->
getProjectFileDestination
(
QFileInfo
fInfo
(
*
m_projectFile
);
m_settings
->
value
(
"vlmc/Workspace"
)
->
get
().
toString
()
);
const
QString
&
fileName
=
m_projectManagerUi
->
getProjectFileDestination
(
fInfo
.
absolutePath
()
);
if
(
fileName
.
isEmpty
()
)
if
(
fileName
.
isEmpty
()
)
return
;
return
;
saveProject
(
fileName
);
saveProject
(
fileName
);
...
...
src/Project/Project.h
View file @
2563dd6d
...
@@ -90,7 +90,7 @@ class Project : public QObject, public Singleton<Project>
...
@@ -90,7 +90,7 @@ class Project : public QObject, public Singleton<Project>
QString
name
();
QString
name
();
bool
closeProject
();
bool
closeProject
();
void
saveProject
(
const
QString
&
filename
);
void
saveProject
(
const
QString
&
filename
);
void
newProject
(
const
QString
&
projectName
,
const
QString
&
workspace
Path
);
void
newProject
(
const
QString
&
projectName
,
const
QString
&
project
Path
);
private
slots
:
private
slots
:
...
...
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