[vlmc-devel] Timeline: Don't use singleton

Yikai Lu git at videolan.org
Wed Jul 20 15:18:43 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed Jul 20 16:30:09 2016 +0900| [ac91125b046de3c568161d18a59d911de77996f5] | committer: Yikai Lu

Timeline: Don't use singleton

> https://code.videolan.org/videolan/vlmc/commit/ac91125b046de3c568161d18a59d911de77996f5
---

 src/Gui/MainWindow.cpp        | 1 +
 src/Gui/timeline/Timeline.cpp | 2 --
 src/Gui/timeline/Timeline.h   | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 3793ea4..e9dfb3c 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -129,6 +129,7 @@ MainWindow::~MainWindow()
     m_projectPreview->stop();
     m_clipPreview->stop();
     delete m_importController;
+    delete m_timeline;
 }
 
 void
diff --git a/src/Gui/timeline/Timeline.cpp b/src/Gui/timeline/Timeline.cpp
index 8a66370..1e34fef 100644
--- a/src/Gui/timeline/Timeline.cpp
+++ b/src/Gui/timeline/Timeline.cpp
@@ -29,8 +29,6 @@
 #include <QtQml/QQmlContext>
 #include <QUrl>
 
-Timeline*   Timeline::m_instance = nullptr;
-
 Timeline::Timeline( MainWindow* parent )
     : QObject( parent )
     , m_view( new QQuickView )
diff --git a/src/Gui/timeline/Timeline.h b/src/Gui/timeline/Timeline.h
index fdcee15..d884fe1 100644
--- a/src/Gui/timeline/Timeline.h
+++ b/src/Gui/timeline/Timeline.h
@@ -68,7 +68,6 @@ protected:
     virtual void changeEvent( QEvent *e ) { Q_UNUSED( e ) }
 
 private:
-    static Timeline*    m_instance;
     QQuickView*         m_view;
     QWidget*            m_container;
 };



More information about the Vlmc-devel mailing list