New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Rescan option to the PluginRegistrationDialog. #3359
Added Rescan option to the PluginRegistrationDialog. #3359
Conversation
0c8c66d
to
404ddb0
Compare
404ddb0
to
4db8173
Compare
if (desc.GetPluginType() == PluginTypeEffect) | ||
{ | ||
mLoadedInterfaces.erase(desc.GetID()); | ||
it = mRegisteredPlugins.erase(it); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect loop. Increment the iterator or erase it, not both. Or else you skip some elements. May crash if you erase the last element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Moved iterator increment to the body of the for loop, and when not erasing.
for (auto it = mRegisteredPlugins.cbegin(); it != mRegisteredPlugins.cend(); ++it) | ||
{ | ||
auto& desc = it->second; | ||
if (desc.GetPluginType() == PluginTypeEffect) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you need to erase plugins with type PluginTypeStub
as well
auto& desc = it->second; | ||
if (desc.GetPluginType() == PluginTypeEffect) | ||
{ | ||
mLoadedInterfaces.erase(desc.GetID()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably I was wrong when I said that effect should be erased from the mLoadedInterfaces
. It may cause problems with effects being used in the project since they are unique ptrs. Removing description of the loaded plugin isn't good thing as well because there are code pathes that request plugin information from the PluginManager
. Placing PluginDescription
of the loaded plugins into special container in PluginManager::ClearEffectPlugins
so that later calls to PluginManager::GetPlugin
... could work
0d50047
to
bd99a62
Compare
bd99a62
to
c4d60a6
Compare
c4d60a6
to
8f21ec2
Compare
8f21ec2
to
0f17967
Compare
Resolves: #3279
(short description of the changes and the motivation to make the changes)
Recommended: