InstrumentTrack: do not try to load "libconnection.so" in compat code
In compat code of InstrumentTrack::loadTrackSpecificSettings() also
check for nodeName being equal to ControllerConnection::classNodeName().
This avoids trying to load the non-existing instrument "connection".
In master branch this has been fixed ugly in commit 22c877d4 before,
however implement a cleaner solution which is also suitable for
backporting.
Closes #3021259.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* loading project
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <pgllama/at/gmail.com>
|
||||
* Copyright (c) 2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -80,7 +81,17 @@ public:
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual QString nodeName() const;
|
||||
|
||||
static inline const QString classNodeName()
|
||||
{
|
||||
return "connection";
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
return classNodeName();
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
void deleteConnection();
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* which handles the link between AutomatableModels and controllers
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
* Copyright (c) 2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -207,12 +208,6 @@ void ControllerConnection::deleteConnection()
|
||||
delete this;
|
||||
}
|
||||
|
||||
QString ControllerConnection::nodeName() const
|
||||
{
|
||||
return( "connection" );
|
||||
}
|
||||
|
||||
|
||||
#include "moc_ControllerConnection.cxx"
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "automation_pattern.h"
|
||||
#include "bb_track.h"
|
||||
#include "config_mgr.h"
|
||||
#include "ControllerConnection.h"
|
||||
#include "debug.h"
|
||||
#include "EffectChain.h"
|
||||
#include "EffectRackView.h"
|
||||
@@ -828,9 +829,8 @@ void InstrumentTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
// compat code - if node-name doesn't match any known
|
||||
// one, we assume that it is an instrument-plugin
|
||||
// which we'll try to load
|
||||
else if( node.nodeName() != "connection" &&
|
||||
automationPattern::classNodeName() !=
|
||||
node.nodeName() &&
|
||||
else if( automationPattern::classNodeName() != node.nodeName() &&
|
||||
ControllerConnection::classNodeName() != node.nodeName() &&
|
||||
!node.toElement().hasAttribute( "id" ) )
|
||||
{
|
||||
delete m_instrument;
|
||||
|
||||
Reference in New Issue
Block a user