Commit 833ac8d8 authored by luyikei's avatar luyikei

Project: Change the category of project name to general

Since there are only three categories that can be changed in SettingsDialog:

general, audio and video.

Obviously, project name should be categorized as general
parent 0029b754
...@@ -135,7 +135,7 @@ Project::load( const QString& path ) ...@@ -135,7 +135,7 @@ Project::load( const QString& path )
} }
m_settings->load(); m_settings->load();
auto projectName = m_settings->value( "vlmc/ProjectName" )->get().toString(); auto projectName = m_settings->value( "general/ProjectName" )->get().toString();
emit projectLoading( projectName ); emit projectLoading( projectName );
m_isClean = autoBackupFound == false; m_isClean = autoBackupFound == false;
emit cleanStateChanged( m_isClean ); emit cleanStateChanged( m_isClean );
...@@ -168,7 +168,7 @@ void ...@@ -168,7 +168,7 @@ void
Project::newProject( const QString& projectName, const QString& projectFilePath ) Project::newProject( const QString& projectName, const QString& projectFilePath )
{ {
closeProject(); closeProject();
m_settings->setValue( "vlmc/ProjectName", projectName ); m_settings->setValue( "general/ProjectName", projectName );
m_projectFile = new QFile( projectFilePath ); m_projectFile = new QFile( projectFilePath );
save(); save();
} }
...@@ -215,7 +215,7 @@ Project::initSettings() ...@@ -215,7 +215,7 @@ Project::initSettings()
QT_TRANSLATE_NOOP("PreferenceWidget", "Number of audio channels" ), QT_TRANSLATE_NOOP("PreferenceWidget", "Number of audio channels" ),
SettingValue::Clamped ); SettingValue::Clamped );
audioChannel->setLimits( 2, 2 ); audioChannel->setLimits( 2, 2 );
SettingValue *pName = m_settings->createVar( SettingValue::String, "vlmc/ProjectName", unNamedProject, SettingValue *pName = m_settings->createVar( SettingValue::String, "general/ProjectName", unNamedProject,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Project name" ), QT_TRANSLATE_NOOP( "PreferenceWidget", "Project name" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "The project name" ), QT_TRANSLATE_NOOP( "PreferenceWidget", "The project name" ),
SettingValue::NotEmpty ); SettingValue::NotEmpty );
...@@ -234,7 +234,7 @@ Project::saveProject( const QString& fileName ) ...@@ -234,7 +234,7 @@ Project::saveProject( const QString& fileName )
m_settings->setSettingsFile( fileName ); m_settings->setSettingsFile( fileName );
bool ret = m_settings->save(); bool ret = m_settings->save();
if ( ret == true ) if ( ret == true )
emit projectSaved( m_settings->value( "vlmc/ProjectName" )->get().toString(), fileName ); emit projectSaved( m_settings->value( "general/ProjectName" )->get().toString(), fileName );
} }
void void
...@@ -280,7 +280,7 @@ Project::removeBackupFile() ...@@ -280,7 +280,7 @@ Project::removeBackupFile()
QString QString
Project::name() const Project::name() const
{ {
return m_settings->value( "vlmc/ProjectName" )->get().toString(); return m_settings->value( "general/ProjectName" )->get().toString();
} }
double double
......
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