Commit 2563dd6d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Project: Do not depend on the workspace location to create a project

parent e44c2ff2
......@@ -176,11 +176,11 @@ Project::loadProject( const QString &fileName )
}
void
Project::newProject( const QString &projectName, const QString &workspacePath )
Project::newProject( const QString &projectName, const QString& projectPath )
{
m_projectName = projectName;
//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();
emit projectLoaded( projectName, m_projectFile->fileName() );
}
......@@ -234,8 +234,8 @@ Project::saveAs()
{
if ( m_projectManagerUi == NULL )
return ;
const QString& fileName = m_projectManagerUi->getProjectFileDestination(
m_settings->value( "vlmc/Workspace" )->get().toString() );
QFileInfo fInfo( *m_projectFile );
const QString& fileName = m_projectManagerUi->getProjectFileDestination( fInfo.absolutePath() );
if ( fileName.isEmpty() )
return ;
saveProject( fileName );
......
......@@ -90,7 +90,7 @@ class Project : public QObject, public Singleton<Project>
QString name();
bool closeProject();
void saveProject( const QString& filename );
void newProject( const QString& projectName, const QString &workspacePath );
void newProject( const QString& projectName, const QString& projectPath );
private slots:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment