implemented proper behaviour for VST plugins
This commit is contained in:
@@ -178,8 +178,6 @@ public:
|
||||
// create a view for the model
|
||||
PluginView * createView( QWidget* parent );
|
||||
|
||||
QList<QString> * getErrorReport();
|
||||
|
||||
|
||||
protected:
|
||||
// create a view for the model
|
||||
@@ -188,8 +186,6 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
QList<QString> * m_errorReport;
|
||||
|
||||
const Descriptor* m_descriptor;
|
||||
|
||||
// pointer to instantiation-function in plugin
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<QString>* Plugin::getErrorReport()
|
||||
{
|
||||
return m_errorReport;
|
||||
}
|
||||
|
||||
void Plugin::logError( QString err_msg )
|
||||
{
|
||||
if ( m_errorReport == NULL ) {
|
||||
m_errorReport = new QList<QString>();
|
||||
}
|
||||
m_errorReport->append( err_msg );
|
||||
engine::mainWindow()->collectError( err_msg );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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++ )
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user