Commit 8be771a5 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Changed project default name

parent 4e571068
......@@ -22,6 +22,7 @@
#include "SettingsManager.h"
#include "ProjectSettingsDefault.h"
#include "ProjectManager.h"
void ProjectSettingsDefault::load( const QString& part )
{
......@@ -66,9 +67,7 @@ void ProjectSettingsDefault::loadVideoDefaults( const QString& part )
void ProjectSettingsDefault::loadProjectDefaults( const QString& part )
{
SettingsManager* setMan = SettingsManager::getInstance();
QVariant defaultName = "project";
setMan->setValue( part, "ProjectName", defaultName );
setMan->setValue( part, "ProjectName", ProjectManager::unNamedProject );
return ;
}
......
......@@ -30,6 +30,8 @@
#include "MainWorkflow.h"
#include "SettingsManager.h"
const QString ProjectManager::unNamedProject = tr( "<Unnamed project>" );
ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
{
QSettings s;
......@@ -83,7 +85,7 @@ void ProjectManager::loadTimeline()
void ProjectManager::parseProjectNode( const QDomElement &node )
{
QDomElement projectNameNode = node.firstChildElement( "ProjectName" );
m_projectName = projectNameNode.attribute( "value", tr( "<Unnamed project>" ) );
m_projectName = projectNameNode.attribute( "value", ProjectManager::unNamedProject );
}
void ProjectManager::loadProject( const QString& fileName )
......
......@@ -35,6 +35,8 @@ class ProjectManager : public QObject, public Singleton<ProjectManager>
Q_OBJECT
Q_DISABLE_COPY( ProjectManager );
public:
static const QString unNamedProject;
void loadProject( const QString& fileName );
void newProject( const QString& projectName );
QString loadProjectFile();
......
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