TextEditor: adjust default coco colors and controls

Change-Id: I6fa4d5a65067d58e07be974e6ccc349030a03a53
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2022-06-13 09:04:09 +02:00
parent cc4c12b281
commit f81afa4556

View File

@@ -373,46 +373,57 @@ FormatDescriptions TextEditorSettingsPrivate::initialFormats()
tr("Names of static fields or member functions."), tr("Names of static fields or member functions."),
FormatDescription::ShowAllControls); FormatDescription::ShowAllControls);
const auto cocoControls = FormatDescription::ShowControls(
FormatDescription::ShowAllAbsoluteControls | FormatDescription::ShowRelativeControls);
formatDescr.emplace_back(C_COCO_CODE_ADDED, formatDescr.emplace_back(C_COCO_CODE_ADDED,
tr("Code Coverage Added Code"), tr("Code Coverage Added Code"),
tr("New code that was not checked for tests."), tr("New code that was not checked for tests."),
FormatDescription::ShowAllControls); cocoControls);
formatDescr.emplace_back(C_COCO_PARTIALLY_COVERED, formatDescr.emplace_back(C_COCO_PARTIALLY_COVERED,
tr("Partially Covered Code"), tr("Partially Covered Code"),
tr("Partial branch/condition coverage."), tr("Partial branch/condition coverage."),
FormatDescription::ShowAllControls); Qt::darkYellow,
cocoControls);
formatDescr.emplace_back(C_COCO_NOT_COVERED, formatDescr.emplace_back(C_COCO_NOT_COVERED,
tr("Uncovered Code"), tr("Uncovered Code"),
tr("Not covered at all."), tr("Not covered at all."),
FormatDescription::ShowAllControls); Qt::red,
cocoControls);
formatDescr.emplace_back(C_COCO_FULLY_COVERED, formatDescr.emplace_back(C_COCO_FULLY_COVERED,
tr("Fully Covered Code"), tr("Fully Covered Code"),
tr("Fully covered code."), tr("Fully covered code."),
FormatDescription::ShowAllControls); Qt::green,
cocoControls);
formatDescr.emplace_back(C_COCO_MANUALLY_VALIDATED, formatDescr.emplace_back(C_COCO_MANUALLY_VALIDATED,
tr("Manually Validated Code"), tr("Manually Validated Code"),
tr("User added validation."), tr("User added validation."),
FormatDescription::ShowAllControls); Qt::blue,
cocoControls);
formatDescr.emplace_back(C_COCO_DEAD_CODE, formatDescr.emplace_back(C_COCO_DEAD_CODE,
tr("Code Coverage Dead Code"), tr("Code Coverage Dead Code"),
tr("Unreachable code."), tr("Unreachable code."),
FormatDescription::ShowAllControls); Qt::magenta,
cocoControls);
formatDescr.emplace_back(C_COCO_EXECUTION_COUNT_TOO_LOW, formatDescr.emplace_back(C_COCO_EXECUTION_COUNT_TOO_LOW,
tr("Code Coverage Execution Count Too Low"), tr("Code Coverage Execution Count Too Low"),
tr("Minimum count not reached."), tr("Minimum count not reached."),
FormatDescription::ShowAllControls); Qt::red,
cocoControls);
formatDescr.emplace_back(C_COCO_NOT_COVERED_INFO, formatDescr.emplace_back(C_COCO_NOT_COVERED_INFO,
tr("Implicitly Not Covered Code"), tr("Implicitly Not Covered Code"),
tr("PLACEHOLDER"), tr("PLACEHOLDER"),
FormatDescription::ShowAllControls); Qt::red,
cocoControls);
formatDescr.emplace_back(C_COCO_COVERED_INFO, formatDescr.emplace_back(C_COCO_COVERED_INFO,
tr("Implicitly Covered Code"), tr("Implicitly Covered Code"),
tr("PLACEHOLDER"), tr("PLACEHOLDER"),
FormatDescription::ShowAllControls); Qt::green,
cocoControls);
formatDescr.emplace_back(C_COCO_MANUALLY_VALIDATED_INFO, formatDescr.emplace_back(C_COCO_MANUALLY_VALIDATED_INFO,
tr("Implicit Manual Coverage Validation"), tr("Implicit Manual Coverage Validation"),
tr("PLACEHOLDER"), tr("PLACEHOLDER"),
FormatDescription::ShowAllControls); Qt::blue,
cocoControls);
return formatDescr; return formatDescr;
} }