Utils: Rename LabelPlacement::AtCheckBoxWithoutDummyLabel to Compact

In BoolAspect. Felt a bit too descriptive by now.

Change-Id: I0cf2eb88576da3d3741d146a8274cf8a85bc7c83
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-07-28 17:12:21 +02:00
parent 7946abce35
commit bf5296292a
6 changed files with 19 additions and 23 deletions

View File

@@ -1612,7 +1612,7 @@ void BoolAspect::addToLayout(Layouting::LayoutItem &parent)
d->m_button = createSubWidget<QCheckBox>(); d->m_button = createSubWidget<QCheckBox>();
} }
switch (d->m_labelPlacement) { switch (d->m_labelPlacement) {
case LabelPlacement::AtCheckBoxWithoutDummyLabel: case LabelPlacement::Compact:
d->m_button->setText(labelText()); d->m_button->setText(labelText());
parent.addItem(d->m_button.data()); parent.addItem(d->m_button.data());
break; break;

View File

@@ -419,7 +419,7 @@ public:
QAction *action() override; QAction *action() override;
enum class LabelPlacement { AtCheckBox, AtCheckBoxWithoutDummyLabel, InExtraLabel }; enum class LabelPlacement { AtCheckBox, Compact, InExtraLabel };
void setLabel(const QString &labelText, void setLabel(const QString &labelText,
LabelPlacement labelPlacement = LabelPlacement::InExtraLabel); LabelPlacement labelPlacement = LabelPlacement::InExtraLabel);
void setLabelPlacement(LabelPlacement labelPlacement); void setLabelPlacement(LabelPlacement labelPlacement);

View File

@@ -77,22 +77,22 @@ BoostTestFramework::BoostTestFramework()
seed.setEnabler(&randomize); seed.setEnabler(&randomize);
randomize.setSettingsKey("Randomize"); randomize.setSettingsKey("Randomize");
randomize.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); randomize.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
randomize.setLabelText(Tr::tr("Randomize")); randomize.setLabelText(Tr::tr("Randomize"));
randomize.setToolTip(Tr::tr("Randomize execution order.")); randomize.setToolTip(Tr::tr("Randomize execution order."));
systemErrors.setSettingsKey("SystemErrors"); systemErrors.setSettingsKey("SystemErrors");
systemErrors.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); systemErrors.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
systemErrors.setLabelText(Tr::tr("Catch system errors")); systemErrors.setLabelText(Tr::tr("Catch system errors"));
systemErrors.setToolTip(Tr::tr("Catch or ignore system errors.")); systemErrors.setToolTip(Tr::tr("Catch or ignore system errors."));
fpExceptions.setSettingsKey("FPExceptions"); fpExceptions.setSettingsKey("FPExceptions");
fpExceptions.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); fpExceptions.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
fpExceptions.setLabelText(Tr::tr("Floating point exceptions")); fpExceptions.setLabelText(Tr::tr("Floating point exceptions"));
fpExceptions.setToolTip(Tr::tr("Enable floating point exception traps.")); fpExceptions.setToolTip(Tr::tr("Enable floating point exception traps."));
memLeaks.setSettingsKey("MemoryLeaks"); memLeaks.setSettingsKey("MemoryLeaks");
memLeaks.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); memLeaks.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
memLeaks.setDefaultValue(true); memLeaks.setDefaultValue(true);
memLeaks.setLabelText(Tr::tr("Detect memory leaks")); memLeaks.setLabelText(Tr::tr("Detect memory leaks"));
memLeaks.setToolTip(Tr::tr("Enable memory leak detection.")); memLeaks.setToolTip(Tr::tr("Enable memory leak detection."));

View File

@@ -58,7 +58,7 @@ CTestTool::CTestTool()
outputOnFail.setSettingsKey("OutputOnFail"); outputOnFail.setSettingsKey("OutputOnFail");
outputOnFail.setLabelText(Tr::tr("Output on failure")); outputOnFail.setLabelText(Tr::tr("Output on failure"));
outputOnFail.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); outputOnFail.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
outputOnFail.setDefaultValue(true); outputOnFail.setDefaultValue(true);
outputMode.setSettingsKey("OutputMode"); outputMode.setSettingsKey("OutputMode");
@@ -85,11 +85,11 @@ CTestTool::CTestTool()
scheduleRandom.setSettingsKey("ScheduleRandom"); scheduleRandom.setSettingsKey("ScheduleRandom");
scheduleRandom.setLabelText(Tr::tr("Schedule random")); scheduleRandom.setLabelText(Tr::tr("Schedule random"));
scheduleRandom.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); scheduleRandom.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
stopOnFailure.setSettingsKey("StopOnFail"); stopOnFailure.setSettingsKey("StopOnFail");
stopOnFailure.setLabelText(Tr::tr("Stop on failure")); stopOnFailure.setLabelText(Tr::tr("Stop on failure"));
stopOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); stopOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
parallel.setSettingsKey("Parallel"); parallel.setSettingsKey("Parallel");
parallel.setToolTip(Tr::tr("Run tests in parallel mode using given number of jobs.")); parallel.setToolTip(Tr::tr("Run tests in parallel mode using given number of jobs."));

View File

@@ -64,29 +64,29 @@ GTestFramework::GTestFramework()
runDisabled.setSettingsKey("RunDisabled"); runDisabled.setSettingsKey("RunDisabled");
runDisabled.setLabelText(Tr::tr("Run disabled tests")); runDisabled.setLabelText(Tr::tr("Run disabled tests"));
runDisabled.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); runDisabled.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
runDisabled.setToolTip(Tr::tr("Executes disabled tests when performing a test run.")); runDisabled.setToolTip(Tr::tr("Executes disabled tests when performing a test run."));
shuffle.setSettingsKey("Shuffle"); shuffle.setSettingsKey("Shuffle");
shuffle.setLabelText(Tr::tr("Shuffle tests")); shuffle.setLabelText(Tr::tr("Shuffle tests"));
shuffle.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); shuffle.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
shuffle.setToolTip(Tr::tr("Shuffles tests automatically on every iteration by the given seed.")); shuffle.setToolTip(Tr::tr("Shuffles tests automatically on every iteration by the given seed."));
repeat.setSettingsKey("Repeat"); repeat.setSettingsKey("Repeat");
repeat.setLabelText(Tr::tr("Repeat tests")); repeat.setLabelText(Tr::tr("Repeat tests"));
repeat.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); repeat.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
repeat.setToolTip(Tr::tr("Repeats a test run (you might be required to increase the timeout to " repeat.setToolTip(Tr::tr("Repeats a test run (you might be required to increase the timeout to "
"avoid canceling the tests).")); "avoid canceling the tests)."));
throwOnFailure.setSettingsKey("ThrowOnFailure"); throwOnFailure.setSettingsKey("ThrowOnFailure");
throwOnFailure.setLabelText(Tr::tr("Throw on failure")); throwOnFailure.setLabelText(Tr::tr("Throw on failure"));
throwOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); throwOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
throwOnFailure.setToolTip(Tr::tr("Turns assertion failures into C++ exceptions.")); throwOnFailure.setToolTip(Tr::tr("Turns assertion failures into C++ exceptions."));
breakOnFailure.setSettingsKey("BreakOnFailure"); breakOnFailure.setSettingsKey("BreakOnFailure");
breakOnFailure.setDefaultValue(true); breakOnFailure.setDefaultValue(true);
breakOnFailure.setLabelText(Tr::tr("Break on failure while debugging")); breakOnFailure.setLabelText(Tr::tr("Break on failure while debugging"));
breakOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); breakOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
breakOnFailure.setToolTip(Tr::tr("Turns failures into debugger breakpoints.")); breakOnFailure.setToolTip(Tr::tr("Turns failures into debugger breakpoints."));
groupMode.setSettingsKey("GroupMode"); groupMode.setSettingsKey("GroupMode");

View File

@@ -73,8 +73,7 @@ SystemSettings::SystemSettings()
autoSaveModifiedFiles.setSettingsKey("EditorManager/AutoSaveEnabled"); autoSaveModifiedFiles.setSettingsKey("EditorManager/AutoSaveEnabled");
autoSaveModifiedFiles.setDefaultValue(true); autoSaveModifiedFiles.setDefaultValue(true);
autoSaveModifiedFiles.setLabelText(Tr::tr("Auto-save modified files")); autoSaveModifiedFiles.setLabelText(Tr::tr("Auto-save modified files"));
autoSaveModifiedFiles.setLabelPlacement( autoSaveModifiedFiles.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
autoSaveModifiedFiles.setToolTip( autoSaveModifiedFiles.setToolTip(
Tr::tr("Automatically creates temporary copies of modified files. " Tr::tr("Automatically creates temporary copies of modified files. "
"If %1 is restarted after a crash or power failure, it asks whether to " "If %1 is restarted after a crash or power failure, it asks whether to "
@@ -90,8 +89,7 @@ SystemSettings::SystemSettings()
autoSaveAfterRefactoring.setSettingsKey("EditorManager/AutoSaveAfterRefactoring"); autoSaveAfterRefactoring.setSettingsKey("EditorManager/AutoSaveAfterRefactoring");
autoSaveAfterRefactoring.setDefaultValue(true); autoSaveAfterRefactoring.setDefaultValue(true);
autoSaveAfterRefactoring.setLabelPlacement( autoSaveAfterRefactoring.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
autoSaveAfterRefactoring.setLabelText(Tr::tr("Auto-save files after refactoring")); autoSaveAfterRefactoring.setLabelText(Tr::tr("Auto-save files after refactoring"));
autoSaveAfterRefactoring.setToolTip( autoSaveAfterRefactoring.setToolTip(
Tr::tr("Automatically saves all open files affected by a refactoring operation,\n" Tr::tr("Automatically saves all open files affected by a refactoring operation,\n"
@@ -100,8 +98,7 @@ SystemSettings::SystemSettings()
autoSuspendEnabled.setSettingsKey("EditorManager/AutoSuspendEnabled"); autoSuspendEnabled.setSettingsKey("EditorManager/AutoSuspendEnabled");
autoSuspendEnabled.setDefaultValue(true); autoSuspendEnabled.setDefaultValue(true);
autoSuspendEnabled.setLabelText(Tr::tr("Auto-suspend unmodified files")); autoSuspendEnabled.setLabelText(Tr::tr("Auto-suspend unmodified files"));
autoSuspendEnabled.setLabelPlacement( autoSuspendEnabled.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
autoSuspendEnabled.setToolTip( autoSuspendEnabled.setToolTip(
Tr::tr("Automatically free resources of old documents that are not visible and not " Tr::tr("Automatically free resources of old documents that are not visible and not "
"modified. They stay visible in the list of open documents.")); "modified. They stay visible in the list of open documents."));
@@ -117,8 +114,7 @@ SystemSettings::SystemSettings()
warnBeforeOpeningBigFiles.setSettingsKey("EditorManager/WarnBeforeOpeningBigTextFiles"); warnBeforeOpeningBigFiles.setSettingsKey("EditorManager/WarnBeforeOpeningBigTextFiles");
warnBeforeOpeningBigFiles.setDefaultValue(true); warnBeforeOpeningBigFiles.setDefaultValue(true);
warnBeforeOpeningBigFiles.setLabelPlacement( warnBeforeOpeningBigFiles.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
warnBeforeOpeningBigFiles.setLabelText(Tr::tr("Warn before opening text files greater than")); warnBeforeOpeningBigFiles.setLabelText(Tr::tr("Warn before opening text files greater than"));
bigFileSizeLimitInMB.setSettingsKey("EditorManager/BigTextFileSizeLimitInMB"); bigFileSizeLimitInMB.setSettingsKey("EditorManager/BigTextFileSizeLimitInMB");
@@ -141,7 +137,7 @@ SystemSettings::SystemSettings()
askBeforeExit.setSettingsKey("AskBeforeExit"); askBeforeExit.setSettingsKey("AskBeforeExit");
askBeforeExit.setLabelText(Tr::tr("Ask for confirmation before exiting")); askBeforeExit.setLabelText(Tr::tr("Ask for confirmation before exiting"));
askBeforeExit.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel); askBeforeExit.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHPAD
enableCrashReporting.setSettingsKey("CrashReportingEnabled"); enableCrashReporting.setSettingsKey("CrashReportingEnabled");