forked from qt-creator/qt-creator
ClangFormat: Fix that formatting was wrongly disabled
After starting Qt Creator with the Beautifier plugin, turning its automatic format on save option on, and restarting Qt Creator _without_ the Beautifier plugin, clang format was no longer formatting on save. The clang format based formatting is supposed to be disabled if - the Beautifier plugin is enabled, and - its automatic format on save option is enabled. Fix the check for the first condition, the plugin can be present but disabled, explicitly check if it is enabled. Change-Id: I5c9c270dd47ceec665aebca5b613f0c4a5357d72 Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -32,7 +32,7 @@ static bool isBeautifierPluginActivated()
|
|||||||
return std::find_if(specs.begin(),
|
return std::find_if(specs.begin(),
|
||||||
specs.end(),
|
specs.end(),
|
||||||
[](ExtensionSystem::PluginSpec *spec) {
|
[](ExtensionSystem::PluginSpec *spec) {
|
||||||
return spec->name() == "Beautifier";
|
return spec->name() == "Beautifier" && spec->isEffectivelyEnabled();
|
||||||
})
|
})
|
||||||
!= specs.end();
|
!= specs.end();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user