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

ProjectManager: Drop dependency on application settings

parent e78e61f9
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
Project::Project() Project::Project()
{ {
m_settings = new Settings( QString() ); m_settings = new Settings( QString() );
m_projectManager = new ProjectManager( m_settings, Core::getInstance()->settings() ); m_projectManager = new ProjectManager( m_settings );
m_undoStack = new QUndoStack; m_undoStack = new QUndoStack;
m_workflow = new MainWorkflow(); m_workflow = new MainWorkflow();
m_workspace = new Workspace( m_settings ); m_workspace = new Workspace( m_settings );
......
...@@ -46,12 +46,11 @@ ...@@ -46,12 +46,11 @@
const QString ProjectManager::unNamedProject = ProjectManager::tr( "Untitled Project" ); const QString ProjectManager::unNamedProject = ProjectManager::tr( "Untitled Project" );
const QString ProjectManager::backupSuffix = "~"; const QString ProjectManager::backupSuffix = "~";
ProjectManager::ProjectManager( Settings* projectSettings, Settings* vlmcSettings ) ProjectManager::ProjectManager( Settings* projectSettings )
: m_projectFile( NULL ) : m_projectFile( NULL )
, m_isClean( true ) , m_isClean( true )
, m_libraryCleanState( true ) , m_libraryCleanState( true )
, m_projectSettings( projectSettings ) , m_projectSettings( projectSettings )
, m_vlmcSettings( vlmcSettings )
{ {
SettingValue *fps = projectSettings->createVar( SettingValue::Double, "video/VLMCOutputFPS", 29.97, SettingValue *fps = projectSettings->createVar( SettingValue::Double, "video/VLMCOutputFPS", 29.97,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Output video FPS" ), QT_TRANSLATE_NOOP( "PreferenceWidget", "Output video FPS" ),
...@@ -217,7 +216,7 @@ ProjectManager::saveAs() ...@@ -217,7 +216,7 @@ ProjectManager::saveAs()
bool bool
ProjectManager::loadEmergencyBackup() ProjectManager::loadEmergencyBackup()
{ {
const QString lastProject = m_vlmcSettings->value( SETTINGS_BACKUP )->get().toString(); const QString lastProject = Core::getInstance()->settings()->value( SETTINGS_BACKUP )->get().toString();
if ( QFile::exists( lastProject ) == true ) if ( QFile::exists( lastProject ) == true )
{ {
loadProject( lastProject ); loadProject( lastProject );
......
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
ProjectManager( Settings *projectSettings , Settings *vlmcSettings ); ProjectManager( Settings *projectSettings );
~ProjectManager(); ~ProjectManager();
void setProjectManagerUi( IProjectManagerUiCb* projectManagerUi ); void setProjectManagerUi( IProjectManagerUiCb* projectManagerUi );
...@@ -144,7 +144,6 @@ protected: ...@@ -144,7 +144,6 @@ protected:
bool m_libraryCleanState; bool m_libraryCleanState;
IProjectManagerUiCb* m_projectManagerUi; IProjectManagerUiCb* m_projectManagerUi;
Settings* m_projectSettings; Settings* m_projectSettings;
Settings* m_vlmcSettings;
public slots: public slots:
void cleanChanged( bool val ); void cleanChanged( bool val );
......
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