diff --git a/include/Plugin.h b/include/Plugin.h index af3783971..a07316c40 100644 --- a/include/Plugin.h +++ b/include/Plugin.h @@ -178,8 +178,6 @@ public: // create a view for the model PluginView * createView( QWidget* parent ); - QList * getErrorReport(); - protected: // create a view for the model @@ -188,8 +186,6 @@ protected: private: - QList * m_errorReport; - const Descriptor* m_descriptor; // pointer to instantiation-function in plugin diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 7162333df..6a15af552 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -262,15 +262,7 @@ void vestigeInstrument::loadFile( const QString & _file ) m_pluginMutex.unlock(); closePlugin(); delete tf; - QMessageBox::information( 0, - tr( "Failed loading VST-plugin" ), - tr( "The VST-plugin %1 could not " - "be loaded for some reason.\n" - "If it runs with other VST-" - "software under Linux, please " - "contact an LMMS-developer!" - ).arg( m_pluginDLL ), - QMessageBox::Ok ); + logError( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( m_pluginDLL ) ); return; } diff --git a/src/core/Plugin.cpp b/src/core/Plugin.cpp index 491526449..24c988e3c 100644 --- a/src/core/Plugin.cpp +++ b/src/core/Plugin.cpp @@ -34,6 +34,7 @@ #include "config_mgr.h" #include "DummyPlugin.h" #include "AutomatableModel.h" +#include "MainWindow.h" static PixmapLoader __dummy_loader; @@ -62,7 +63,6 @@ Plugin::Plugin( const Descriptor * _descriptor, Model * parent ) : { m_descriptor = &dummy_plugin_descriptor; } - m_errorReport = NULL; } @@ -125,17 +125,9 @@ Plugin * Plugin::instantiate( const QString & pluginName, Model * parent, return inst; } -QList* Plugin::getErrorReport() -{ - return m_errorReport; -} - void Plugin::logError( QString err_msg ) { - if ( m_errorReport == NULL ) { - m_errorReport = new QList(); - } - m_errorReport->append( err_msg ); + engine::mainWindow()->collectError( err_msg ); } diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 1d6b40927..5fed6da1c 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -1181,7 +1181,8 @@ void MainWindow::clearErrors() void MainWindow::showErrors( const QString message ) -{ if ( m_errors->length() != 0 ) +{ + if ( m_errors->length() != 0 ) { QString* errors = new QString(); for ( int i = 0 ; i < m_errors->length() ; i++ ) { diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index f8a6ed1f8..15ff0b143 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -820,11 +820,8 @@ Instrument * InstrumentTrack::loadInstrument( const QString & _plugin_name ) delete m_instrument; m_instrument = Instrument::instantiate( _plugin_name, this ); unlock(); - - if ( m_instrument->getErrorReport() != NULL ) - engine::mainWindow()->collectErrors( m_instrument->getErrorReport() ); - setName( m_instrument->displayName() ); + emit instrumentChanged(); return m_instrument;