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>();
}
switch (d->m_labelPlacement) {
case LabelPlacement::AtCheckBoxWithoutDummyLabel:
case LabelPlacement::Compact:
d->m_button->setText(labelText());
parent.addItem(d->m_button.data());
break;

View File

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

View File

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

View File

@@ -58,7 +58,7 @@ CTestTool::CTestTool()
outputOnFail.setSettingsKey("OutputOnFail");
outputOnFail.setLabelText(Tr::tr("Output on failure"));
outputOnFail.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
outputOnFail.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
outputOnFail.setDefaultValue(true);
outputMode.setSettingsKey("OutputMode");
@@ -85,11 +85,11 @@ CTestTool::CTestTool()
scheduleRandom.setSettingsKey("ScheduleRandom");
scheduleRandom.setLabelText(Tr::tr("Schedule random"));
scheduleRandom.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
scheduleRandom.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
stopOnFailure.setSettingsKey("StopOnFail");
stopOnFailure.setLabelText(Tr::tr("Stop on failure"));
stopOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
stopOnFailure.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
parallel.setSettingsKey("Parallel");
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.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."));
shuffle.setSettingsKey("Shuffle");
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."));
repeat.setSettingsKey("Repeat");
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 "
"avoid canceling the tests)."));
throwOnFailure.setSettingsKey("ThrowOnFailure");
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."));
breakOnFailure.setSettingsKey("BreakOnFailure");
breakOnFailure.setDefaultValue(true);
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."));
groupMode.setSettingsKey("GroupMode");

View File

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