forked from qt-creator/qt-creator
Utils: Remove LabelPlacement::AtCheckBoxWithoutDummyLabel
This is identical in remaining functionality to AtCheckBox after the recent layout builder changes (or rather, can be adjusted on the layouting side by having appropriate empty cells) Task-number: QTCREATORBUG-29167 Change-Id: Ic357de6fb756acb5926afe1fd361ee4b18b17afd Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -1455,18 +1455,10 @@ void BoolAspect::addToLayout(Layouting::LayoutItem &parent)
|
||||
d->m_button = createSubWidget<QCheckBox>();
|
||||
}
|
||||
switch (d->m_labelPlacement) {
|
||||
case LabelPlacement::AtCheckBoxWithoutDummyLabel:
|
||||
case LabelPlacement::AtCheckBox:
|
||||
d->m_button->setText(labelText());
|
||||
parent.addItem(d->m_button.data());
|
||||
break;
|
||||
case LabelPlacement::AtCheckBox: {
|
||||
d->m_button->setText(labelText());
|
||||
// FIXME:
|
||||
//if (parent.isForm())
|
||||
// parent.addItem(createSubWidget<QLabel>());
|
||||
parent.addItem(d->m_button.data());
|
||||
break;
|
||||
}
|
||||
case LabelPlacement::InExtraLabel:
|
||||
addLabeledItem(parent, d->m_button);
|
||||
break;
|
||||
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
bool defaultValue() const;
|
||||
void setDefaultValue(bool val);
|
||||
|
||||
enum class LabelPlacement { AtCheckBox, AtCheckBoxWithoutDummyLabel, InExtraLabel };
|
||||
enum class LabelPlacement { AtCheckBox, InExtraLabel };
|
||||
void setLabel(const QString &labelText,
|
||||
LabelPlacement labelPlacement = LabelPlacement::InExtraLabel);
|
||||
void setLabelPlacement(LabelPlacement labelPlacement);
|
||||
|
||||
@@ -70,25 +70,25 @@ BoostTestSettings::BoostTestSettings(Id settingsId)
|
||||
|
||||
registerAspect(&randomize);
|
||||
randomize.setSettingsKey("Randomize");
|
||||
randomize.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
randomize.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
randomize.setLabelText(Tr::tr("Randomize"));
|
||||
randomize.setToolTip(Tr::tr("Randomize execution order."));
|
||||
|
||||
registerAspect(&systemErrors);
|
||||
systemErrors.setSettingsKey("SystemErrors");
|
||||
systemErrors.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
systemErrors.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
systemErrors.setLabelText(Tr::tr("Catch system errors"));
|
||||
systemErrors.setToolTip(Tr::tr("Catch or ignore system errors."));
|
||||
|
||||
registerAspect(&fpExceptions);
|
||||
fpExceptions.setSettingsKey("FPExceptions");
|
||||
fpExceptions.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
fpExceptions.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
fpExceptions.setLabelText(Tr::tr("Floating point exceptions"));
|
||||
fpExceptions.setToolTip(Tr::tr("Enable floating point exception traps."));
|
||||
|
||||
registerAspect(&memLeaks);
|
||||
memLeaks.setSettingsKey("MemoryLeaks");
|
||||
memLeaks.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
memLeaks.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
memLeaks.setDefaultValue(true);
|
||||
memLeaks.setLabelText(Tr::tr("Detect memory leaks"));
|
||||
memLeaks.setToolTip(Tr::tr("Enable memory leak detection."));
|
||||
|
||||
@@ -194,7 +194,7 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) :
|
||||
|
||||
m_useStaging = addAspect<BoolAspect>();
|
||||
m_useStaging->setSettingsKey(USE_STAGING_KEY);
|
||||
m_useStaging->setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
m_useStaging->setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
m_useStaging->setDefaultValue(!buildAndRunOnSameDevice(kit()));
|
||||
|
||||
m_stagingDir = addAspect<FilePathAspect>();
|
||||
|
||||
@@ -660,7 +660,7 @@ DebuggerSettings::DebuggerSettings()
|
||||
aspect->setAutoApply(false);
|
||||
// FIXME: Make the positioning part of the LayoutBuilder later
|
||||
if (auto boolAspect = dynamic_cast<BoolAspect *>(aspect))
|
||||
boolAspect->setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
boolAspect->setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ void FakeVimSettings::setup(FvBaseAspect *aspect,
|
||||
registerAspect(aspect);
|
||||
|
||||
if (auto boolAspect = dynamic_cast<FvBoolAspect *>(aspect))
|
||||
boolAspect->setLabelPlacement(FvBoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
boolAspect->setLabelPlacement(FvBoolAspect::LabelPlacement::AtCheckBox);
|
||||
#else
|
||||
Q_UNUSED(labelText)
|
||||
#endif
|
||||
|
||||
@@ -224,7 +224,7 @@ QbsBuildStep::QbsBuildStep(BuildStepList *bsl, Utils::Id id) :
|
||||
m_keepGoing->setToolTip(
|
||||
QbsProjectManager::Tr::tr("Keep going when errors occur (if at all possible)."));
|
||||
m_keepGoing->setLabel(QbsProjectManager::Tr::tr("Keep going"),
|
||||
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
BoolAspect::LabelPlacement::AtCheckBox);
|
||||
|
||||
m_maxJobCount = addAspect<IntegerAspect>();
|
||||
m_maxJobCount->setSettingsKey(QBS_MAXJOBCOUNT);
|
||||
@@ -235,22 +235,22 @@ QbsBuildStep::QbsBuildStep(BuildStepList *bsl, Utils::Id id) :
|
||||
m_showCommandLines = addAspect<BoolAspect>();
|
||||
m_showCommandLines->setSettingsKey(QBS_SHOWCOMMANDLINES);
|
||||
m_showCommandLines->setLabel(QbsProjectManager::Tr::tr("Show command lines"),
|
||||
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
BoolAspect::LabelPlacement::AtCheckBox);
|
||||
|
||||
m_install = addAspect<BoolAspect>();
|
||||
m_install->setSettingsKey(QBS_INSTALL);
|
||||
m_install->setValue(true);
|
||||
m_install->setLabel(QbsProjectManager::Tr::tr("Install"), BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
m_install->setLabel(QbsProjectManager::Tr::tr("Install"), BoolAspect::LabelPlacement::AtCheckBox);
|
||||
|
||||
m_cleanInstallDir = addAspect<BoolAspect>();
|
||||
m_cleanInstallDir->setSettingsKey(QBS_CLEAN_INSTALL_ROOT);
|
||||
m_cleanInstallDir->setLabel(QbsProjectManager::Tr::tr("Clean install root"),
|
||||
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
BoolAspect::LabelPlacement::AtCheckBox);
|
||||
|
||||
m_forceProbes = addAspect<BoolAspect>();
|
||||
m_forceProbes->setSettingsKey("Qbs.forceProbesKey");
|
||||
m_forceProbes->setLabel(QbsProjectManager::Tr::tr("Force probes"),
|
||||
BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
BoolAspect::LabelPlacement::AtCheckBox);
|
||||
|
||||
m_commandLine = addAspect<StringAspect>();
|
||||
m_commandLine->setDisplayStyle(StringAspect::TextEditDisplay);
|
||||
|
||||
@@ -48,7 +48,7 @@ QbsInstallStep::QbsInstallStep(BuildStepList *bsl, Utils::Id id)
|
||||
setDisplayName(Tr::tr("Qbs Install"));
|
||||
setSummaryText(Tr::tr("<b>Qbs:</b> %1").arg("install"));
|
||||
|
||||
const auto labelPlacement = BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel;
|
||||
const auto labelPlacement = BoolAspect::LabelPlacement::AtCheckBox;
|
||||
m_dryRun = addAspect<BoolAspect>();
|
||||
m_dryRun->setSettingsKey(QBS_DRY_RUN);
|
||||
m_dryRun->setLabel(Tr::tr("Dry run"), labelPlacement);
|
||||
|
||||
@@ -41,7 +41,7 @@ SubversionSettings::SubversionSettings()
|
||||
|
||||
registerAspect(&useAuthentication);
|
||||
useAuthentication.setSettingsKey("Authentication");
|
||||
useAuthentication.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
useAuthentication.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
|
||||
registerAspect(&userName);
|
||||
userName.setSettingsKey("User");
|
||||
|
||||
@@ -244,19 +244,19 @@ ValgrindBaseSettings::ValgrindBaseSettings(bool global)
|
||||
filterExternalIssues.setSettingsKey(base + "FilterExternalIssues");
|
||||
filterExternalIssues.setDefaultValue(true);
|
||||
filterExternalIssues.setIcon(Icons::FILTER.icon());
|
||||
filterExternalIssues.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
filterExternalIssues.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
filterExternalIssues.setLabelText(Tr::tr("Show Project Costs Only"));
|
||||
filterExternalIssues.setToolTip(Tr::tr("Show only profiling info that originated from this project source."));
|
||||
|
||||
registerAspect(&trackOrigins);
|
||||
trackOrigins.setSettingsKey(base + "TrackOrigins");
|
||||
trackOrigins.setDefaultValue(true);
|
||||
trackOrigins.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
trackOrigins.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
trackOrigins.setLabelText(Tr::tr("Track origins of uninitialized memory"));
|
||||
|
||||
registerAspect(&showReachable);
|
||||
showReachable.setSettingsKey(base + "ShowReachable");
|
||||
showReachable.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
showReachable.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
showReachable.setLabelText(Tr::tr("Show reachable and indirectly lost blocks"));
|
||||
|
||||
registerAspect(&leakCheckOnFinish);
|
||||
@@ -291,12 +291,12 @@ ValgrindBaseSettings::ValgrindBaseSettings(bool global)
|
||||
registerAspect(&enableEventToolTips);
|
||||
enableEventToolTips.setDefaultValue(true);
|
||||
enableEventToolTips.setSettingsKey(base + "Callgrind.EnableEventToolTips");
|
||||
enableEventToolTips.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
enableEventToolTips.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
enableEventToolTips.setLabelText(Tr::tr("Show additional information for events in tooltips"));
|
||||
|
||||
registerAspect(&enableCacheSim);
|
||||
enableCacheSim.setSettingsKey(base + "Callgrind.EnableCacheSim");
|
||||
enableCacheSim.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
enableCacheSim.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
enableCacheSim.setLabelText(Tr::tr("Enable cache simulation"));
|
||||
enableCacheSim.setToolTip("<html><head/><body>" + Tr::tr(
|
||||
"<p>Does full cache simulation.</p>\n"
|
||||
@@ -310,7 +310,7 @@ ValgrindBaseSettings::ValgrindBaseSettings(bool global)
|
||||
|
||||
registerAspect(&enableBranchSim);
|
||||
enableBranchSim.setSettingsKey(base + "Callgrind.EnableBranchSim");
|
||||
enableBranchSim.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
enableBranchSim.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
enableBranchSim.setLabelText(Tr::tr("Enable branch prediction simulation"));
|
||||
enableBranchSim.setToolTip("<html><head/><body>\n" + Tr::tr(
|
||||
"<p>Does branch prediction simulation.</p>\n"
|
||||
@@ -322,12 +322,12 @@ ValgrindBaseSettings::ValgrindBaseSettings(bool global)
|
||||
|
||||
registerAspect(&collectSystime);
|
||||
collectSystime.setSettingsKey(base + "Callgrind.CollectSystime");
|
||||
collectSystime.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
collectSystime.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
collectSystime.setLabelText(Tr::tr("Collect system call time"));
|
||||
collectSystime.setToolTip(Tr::tr("Collects information for system call times."));
|
||||
|
||||
registerAspect(&collectBusEvents);
|
||||
collectBusEvents.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBoxWithoutDummyLabel);
|
||||
collectBusEvents.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
||||
collectBusEvents.setSettingsKey(base + "Callgrind.CollectBusEvents");
|
||||
collectBusEvents.setLabelText(Tr::tr("Collect global bus events"));
|
||||
collectBusEvents.setToolTip(Tr::tr("Collect the number of global bus events that are executed. "
|
||||
|
||||
Reference in New Issue
Block a user