From eccfc0c6881ef02bb266db12fc01c2dba7a7064a Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 6 Feb 2014 20:48:40 +0100 Subject: [PATCH] SongEditor: remove unused messing with engine's pointer to SongEditor Back in time we obviously didn't manage to get construction dependencies sorted so we needed to mess with the pointer to the SongEditor instance in the engine class. Thanks to Alexandre Almeida for pointing out this issue. Closes #261. --- include/song_editor.h | 2 +- src/core/engine.cpp | 7 +------ src/gui/song_editor.cpp | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/include/song_editor.h b/include/song_editor.h index af10cd51c..ef53d7d00 100644 --- a/include/song_editor.h +++ b/include/song_editor.h @@ -56,7 +56,7 @@ class songEditor : public TrackContainerView { Q_OBJECT public: - songEditor( song * _song, songEditor * & _engine_ptr ); + songEditor( song * _song ); virtual ~songEditor(); diff --git a/src/core/engine.cpp b/src/core/engine.cpp index 575f0b474..e39fdede4 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -1,5 +1,3 @@ -#ifndef SINGLE_SOURCE_COMPILE - /* * engine.cpp - implementation of LMMS' engine-system * @@ -91,7 +89,7 @@ void engine::init( const bool _has_gui ) if( s_hasGUI ) { s_mainWindow = new MainWindow; - s_songEditor = new songEditor( s_song, s_songEditor ); + s_songEditor = new songEditor( s_song ); s_fxMixerView = new FxMixerView; s_controllerRackView = new ControllerRackView; s_projectNotes = new projectNotes; @@ -190,6 +188,3 @@ void engine::initPluginFileHandling() } - - -#endif diff --git a/src/gui/song_editor.cpp b/src/gui/song_editor.cpp index 822ef8bc4..ee4d05daf 100644 --- a/src/gui/song_editor.cpp +++ b/src/gui/song_editor.cpp @@ -75,14 +75,12 @@ void positionLine::paintEvent( QPaintEvent * _pe ) -songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) : +songEditor::songEditor( song * _song ) : TrackContainerView( _song ), m_s( _song ), m_scrollBack( false ), m_smoothScroll( configManager::inst()->value( "ui", "smoothscroll" ).toInt() ) { - _engine_ptr = this; - setWindowTitle( tr( "Song-Editor" ) ); setWindowIcon( embed::getIconPixmap( "songeditor" ) );