forked from qt-creator/qt-creator
ExtensionSystem: Avoid using iterators from temporaries
Doing it can lead to unexpected results Change-Id: I602cf6a4692c9e0c0adb4564679478ea25bf8829 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -442,7 +442,7 @@ QString PluginManager::systemInformation() const
|
||||
if (response.result == SynchronousProcessResponse::Finished)
|
||||
result += response.allOutput() + "\n";
|
||||
result += "Plugin information:\n\n";
|
||||
auto longestSpec = std::max_element(plugins().cbegin(), plugins().cend(),
|
||||
auto longestSpec = std::max_element(d->pluginSpecs.cbegin(), d->pluginSpecs.cend(),
|
||||
[](const PluginSpec *left, const PluginSpec *right) {
|
||||
return left->name().size() < right->name().size();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user