Refactor loading song errors notification

This commit is contained in:
Amadeus Folego
2014-12-29 03:56:46 -02:00
parent 3dd1da4e25
commit edebf5d7da
9 changed files with 60 additions and 75 deletions

View File

@@ -39,7 +39,7 @@
#include "ControllerConnection.h"
#include "MemoryManager.h"
#include "ValueBuffer.h"
#include "MainWindow.h"
#include "Song.h"
#include "embed.cpp"
@@ -75,12 +75,8 @@ LadspaEffect::LadspaEffect( Model * _parent,
Ladspa2LMMS * manager = Engine::getLADSPAManager();
if( manager->getDescription( m_key ) == NULL )
{
if ( Engine::hasGUI() )
{
Engine::mainWindow()->collectError(
tr( "Unknown LADSPA plugin %1 requested." ).arg(
m_key.second ) );
}
Engine::getSong()->collectError(tr( "Unknown LADSPA plugin %1 requested." ).arg(
m_key.second ) );
setOkay( false );
return;
}

View File

@@ -34,8 +34,6 @@
#include "audio_file_processor.h"
#include "Engine.h"
#include "Song.h"
#include "MainWindow.h"
#include "GuiApplication.h"
#include "InstrumentTrack.h"
#include "NotePlayHandle.h"
#include "interpolation.h"
@@ -242,7 +240,7 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
{
QString message = tr( "Sample not found: %1" ).arg( m_sampleBuffer.audioFile() );
gui->mainWindow()->collectError( message );
Engine::getSong()->collectError( message );
}
}
else if( _this.attribute( "sampledata" ) != "" )