mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-13 03:27:06 -04:00
Use QString for SubPluginFeatures' virtuals
The former virtuals returned `const char*`, which lead to invalid reads when `LadspaSubPluginFeatures` returned pointers to temporary `QByteArray::data`.
This commit is contained in:
@@ -194,12 +194,12 @@ void PluginFactory::discoverPlugins()
|
||||
pluginInfos << info;
|
||||
|
||||
auto addSupportedFileTypes =
|
||||
[this](const char* supportedFileTypes,
|
||||
[this](QString supportedFileTypes,
|
||||
const PluginInfo& info,
|
||||
const Plugin::Descriptor::SubPluginFeatures::Key* key = nullptr)
|
||||
{
|
||||
if(supportedFileTypes)
|
||||
for (const QString& ext : QString(supportedFileTypes).split(','))
|
||||
if(!supportedFileTypes.isNull())
|
||||
for (const QString& ext : supportedFileTypes.split(','))
|
||||
{
|
||||
//qDebug() << "Plugin " << info.name() << "supports" << ext;
|
||||
PluginInfoAndKey infoAndKey;
|
||||
@@ -212,7 +212,7 @@ void PluginFactory::discoverPlugins()
|
||||
};
|
||||
|
||||
if (info.descriptor->supportedFileTypes)
|
||||
addSupportedFileTypes(info.descriptor->supportedFileTypes, info);
|
||||
addSupportedFileTypes(QString(info.descriptor->supportedFileTypes), info);
|
||||
|
||||
if (info.descriptor->subPluginFeatures)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user