[vlmc-devel] Remove all unneeded code

Yikai Lu git at videolan.org
Sat Apr 9 22:18:15 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Apr  9 11:44:13 2016 +0900| [2e13c9583592a1508e61390f349bfcfae2e1d586] | committer: Hugo Beauzée-Luyssen

Remove all unneeded code

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/2e13c9583592a1508e61390f349bfcfae2e1d586
---

 src/EffectsEngine/EffectUser.h    |  1 -
 src/Gui/timeline/Timeline.cpp     |  1 -
 src/Gui/timeline/Timeline.h       |  3 ---
 src/Library/Library.h             |  4 ----
 src/Library/MediaContainer.cpp    |  1 -
 src/Project/Project.cpp           | 13 ++-----------
 src/Project/Project.h             |  5 -----
 src/Renderer/WorkflowRenderer.cpp |  1 -
 src/Workflow/MainWorkflow.cpp     |  1 -
 src/Workflow/TrackWorkflow.cpp    |  3 +--
 10 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/src/EffectsEngine/EffectUser.h b/src/EffectsEngine/EffectUser.h
index 7bdb95a..f797e61 100644
--- a/src/EffectsEngine/EffectUser.h
+++ b/src/EffectsEngine/EffectUser.h
@@ -27,7 +27,6 @@
 
 #include "EffectsEngine/EffectsEngine.h"
 
-class   QDomElement;
 class   QReadWriteLock;
 
 class EffectUser : public QObject
diff --git a/src/Gui/timeline/Timeline.cpp b/src/Gui/timeline/Timeline.cpp
index 28837b5..0053e5e 100644
--- a/src/Gui/timeline/Timeline.cpp
+++ b/src/Gui/timeline/Timeline.cpp
@@ -34,7 +34,6 @@
 #include "Renderer/WorkflowRenderer.h"
 
 #include <QHBoxLayout>
-#include <QDomElement>
 #include <QScrollBar>
 
 Timeline*   Timeline::m_instance = nullptr;
diff --git a/src/Gui/timeline/Timeline.h b/src/Gui/timeline/Timeline.h
index b5db9c9..6365725 100644
--- a/src/Gui/timeline/Timeline.h
+++ b/src/Gui/timeline/Timeline.h
@@ -28,9 +28,6 @@
 #include "ui_Timeline.h"
 #include "Workflow/Types.h"
 
-#include <QDomElement>
-#include <QXmlStreamWriter>
-
 class   MainWorkflow;
 class   Project;
 class   TracksScene;
diff --git a/src/Library/Library.h b/src/Library/Library.h
index 7412ff1..9bd3a91 100644
--- a/src/Library/Library.h
+++ b/src/Library/Library.h
@@ -31,11 +31,7 @@
 #define LIBRARY_H
 
 #include "MediaContainer.h"
-
 #include <QObject>
-#include <QXmlStreamWriter>
-
-class   QDomElement;
 
 class Clip;
 class Media;
diff --git a/src/Library/MediaContainer.cpp b/src/Library/MediaContainer.cpp
index 5473abc..bfcde64 100644
--- a/src/Library/MediaContainer.cpp
+++ b/src/Library/MediaContainer.cpp
@@ -21,7 +21,6 @@
  *****************************************************************************/
 
 #include <QHash>
-#include <QDomElement>
 #include <QUuid>
 
 #include "Library.h"
diff --git a/src/Project/Project.cpp b/src/Project/Project.cpp
index bbf71db..85ceed4 100644
--- a/src/Project/Project.cpp
+++ b/src/Project/Project.cpp
@@ -24,7 +24,6 @@
 
 #include <QFile>
 #include <QFileInfo>
-#include <QDomDocument>
 #include <QTimer>
 
 
@@ -34,12 +33,6 @@
 #include "Settings/Settings.h"
 #include "Tools/VlmcDebug.h"
 
-//FIXME: This is required to save for now, but it feels wrong
-#include "Workflow/MainWorkflow.h"
-#include "Library/Library.h"
-#include "Renderer/WorkflowRenderer.h"
-#include "timeline/Timeline.h"
-
 const QString   Project::unNamedProject = Project::tr( "Untitled Project" );
 const QString   Project::backupSuffix = "~";
 
@@ -94,7 +87,6 @@ Project::load( const QString& path )
 
     QString         backupFilename = path + Project::backupSuffix;
     QFile           autoBackup( backupFilename );
-    QDomDocument    doc;
     bool            autoBackupFound = false;
     bool            outdatedBackupFound = false;
 
@@ -123,7 +115,7 @@ Project::load( const QString& path )
                 return false;
             }
             autoBackupFound = true;
-            doc.setContent( &autoBackup );
+            m_settings->setSettingsFile( backupFilename );
         }
     }
     else
@@ -134,10 +126,9 @@ Project::load( const QString& path )
             m_projectFile = nullptr;
             return false;
         }
-        doc.setContent( m_projectFile );
+        m_settings->setSettingsFile( path );
     }
 
-    m_settings->setSettingsFile( path );
     m_settings->load();
     auto projectName = m_settings->value( "vlmc/ProjectName" )->get().toString();
     emit projectLoading( projectName );
diff --git a/src/Project/Project.h b/src/Project/Project.h
index a50af29..c4959f4 100644
--- a/src/Project/Project.h
+++ b/src/Project/Project.h
@@ -27,10 +27,8 @@
 
 #include <QObject>
 
-class QDomDocument;
 class QFile;
 class QString;
-class QXmlStreamWriter;
 class QTimer;
 
 class AutomaticBackup;
@@ -127,9 +125,6 @@ class Project : public QObject
         void                backupProjectLoaded();
         void                outdatedBackupFileFound();
 
-private:
-        bool                loadWorkflow( const QDomDocument& root );
-
     private:
         QFile*              m_projectFile;
         bool                m_isClean;
diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index bc19f45..fe810c3 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -23,7 +23,6 @@
 //Allow PRId64 to be defined:
 #define __STDC_FORMAT_MACROS
 
-#include <QDomElement>
 #include <QThread>
 #include <QWaitCondition>
 #include <inttypes.h>
diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index 895fd38..264982b 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -35,7 +35,6 @@
 #include "Tools/VlmcDebug.h"
 #include "Workflow/Types.h"
 
-#include <QDomElement>
 #include <QMutex>
 
 MainWorkflow::MainWorkflow( Settings* projectSettings, int trackCount ) :
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index 1f265ec..bc77e20 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -40,8 +40,7 @@
 #include "vlmc.h"
 #include "Tools/VlmcDebug.h"
 
-#include <QDomDocument>
-#include <QDomElement>
+
 #include <QReadLocker>
 #include <QMutex>
 



More information about the Vlmc-devel mailing list