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 commit22c877d4before, however implement a cleaner solution which is also suitable for backporting. Closes #3021259. (cherry picked from commit65311ef2b4)
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
|
||||
*
|
||||
@@ -208,12 +209,6 @@ void ControllerConnection::deleteConnection()
|
||||
delete this;
|
||||
}
|
||||
|
||||
QString ControllerConnection::nodeName() const
|
||||
{
|
||||
return( "connection" );
|
||||
}
|
||||
|
||||
|
||||
#include "moc_ControllerConnection.cxx"
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* InstrumentTrack.cpp - implementation of instrument-track-class
|
||||
* (window + data-structures)
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -43,6 +43,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"
|
||||
@@ -812,8 +813,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( 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