[vlmc-devel] Workspace: Pass the project Settings instance when constructing the class
Hugo Beauzée-Luyssen
git at videolan.org
Sat Mar 29 01:03:39 CET 2014
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Mar 11 20:43:03 2014 +0200| [7c1225c9c19a41561d1133719df27c12d3b64bc6] | committer: Hugo Beauzée-Luyssen
Workspace: Pass the project Settings instance when constructing the class
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=7c1225c9c19a41561d1133719df27c12d3b64bc6
---
src/Main/Project.cpp | 2 +-
src/Project/Workspace.cpp | 3 ++-
src/Project/Workspace.h | 13 +++++++------
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/Main/Project.cpp b/src/Main/Project.cpp
index bc20a23..fa482b7 100644
--- a/src/Main/Project.cpp
+++ b/src/Main/Project.cpp
@@ -35,7 +35,7 @@ Project::Project()
m_settings = new Settings( QString() );
m_undoStack = new QUndoStack;
m_workflow = new MainWorkflow;
- m_workspace = new Workspace;
+ m_workspace = new Workspace( m_settings );
}
Project::~Project()
diff --git a/src/Project/Workspace.cpp b/src/Project/Workspace.cpp
index 97e011d..d073fc1 100644
--- a/src/Project/Workspace.cpp
+++ b/src/Project/Workspace.cpp
@@ -40,7 +40,8 @@
const QString Workspace::workspacePrefix = "workspace://";
-Workspace::Workspace() : m_copyInProgress( false )
+Workspace::Workspace(Settings *settings)
+ : m_copyInProgress( false )
{
m_mediasToCopyMutex = new QMutex;
#ifdef WITH_GUI
diff --git a/src/Project/Workspace.h b/src/Project/Workspace.h
index 6c72960..114af1c 100644
--- a/src/Project/Workspace.h
+++ b/src/Project/Workspace.h
@@ -23,16 +23,17 @@
#ifndef WORKSPACE_H
#define WORKSPACE_H
-#include "Tools/ErrorHandler.h"
-
#include <QObject>
#include <QQueue>
-class Clip;
-class Media;
+#include "Tools/ErrorHandler.h"
-class QFileInfo;
class QMutex;
+class QFileInfo;
+
+class Clip;
+class Media;
+class Settings;
class Workspace : public QObject, public ErrorHandler
{
@@ -41,7 +42,7 @@ class Workspace : public QObject, public ErrorHandler
public:
static const QString workspacePrefix;
- Workspace();
+ Workspace( Settings* settings );
~Workspace();
static bool isInProjectDir( const QString &path );
static bool isInProjectDir( const QFileInfo &fInfo );
More information about the Vlmc-devel
mailing list