fixed crash when adding an effect although none is selected and improved overall usability

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@954 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-05-04 22:33:27 +00:00
parent 43638ae14f
commit 23e1a368bd
4 changed files with 43 additions and 28 deletions

View File

@@ -76,19 +76,14 @@ public:
signals:
void highlighted( const effectKey & _key );
void addPlugin( const effectKey & _key );
void doubleClicked( const effectKey & _key );
protected:
virtual void resizeEvent( QResizeEvent * );
protected slots:
void rowChanged( const QModelIndex &, const QModelIndex & );
void onAddButtonReleased( void );
void onDoubleClicked( const QModelIndex & );
void updateSelection( void );
private:
QVector<plugin::descriptor> m_pluginDescriptors;

View File

@@ -108,18 +108,28 @@ public:
user = l[1];
}
}
inline QString dumpBase64( void ) const
{
return( base64::encode(
QList<QVariant>()
<< name << user ) );
}
inline bool isValid( void ) const
{
return( desc != NULL &&
name != QString::null );
}
plugin::descriptor * desc;
QString name;
QVariant user;
};
typedef QList<key> keyList;
subPluginFeatures( plugin::PluginTypes _type ) :
m_type( _type )
{