Utils: Introduce Layouting::{br,st}

... as "standard" ways to define line breaks and simple stretch.

There have already been too many patterns to do it.

Break() and Stretch() still work for the patches in flight, but
they are planned to be removed.

Change-Id: I9b70dcdc11244a904a496b0c55938dfb0b265fc8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-07-22 18:54:04 +02:00
parent 80aef9c0ef
commit 14257a24f9
71 changed files with 211 additions and 254 deletions

View File

@@ -73,7 +73,6 @@ FileWizardPage::FileWizardPage(QWidget *parent) :
d->m_pathChooser = new PathChooser; d->m_pathChooser = new PathChooser;
using namespace Layouting; using namespace Layouting;
const Break br;
Form { Form {
Space(), d->m_defaultSuffixLabel, br, Space(), d->m_defaultSuffixLabel, br,

View File

@@ -509,5 +509,8 @@ LayoutBuilder::Setter title(const QString &title, BoolAspect *checker)
}; };
} }
LayoutBuilder::Break br;
LayoutBuilder::Stretch st;
} // Layouting } // Layouting
} // Utils } // Utils

View File

@@ -65,6 +65,8 @@ public:
Break, Break,
}; };
using Modifier = std::function<void(QLayout *)>;
class QTCREATOR_UTILS_EXPORT LayoutItem class QTCREATOR_UTILS_EXPORT LayoutItem
{ {
public: public:
@@ -215,11 +217,15 @@ public:
Form(std::initializer_list<LayoutItem> items) : LayoutBuilder(FormLayout, items) {} Form(std::initializer_list<LayoutItem> items) : LayoutBuilder(FormLayout, items) {}
}; };
using Stretch = LayoutBuilder::Stretch;
using Space = LayoutBuilder::Space; using Space = LayoutBuilder::Space;
using Span = LayoutBuilder::Span; using Span = LayoutBuilder::Span;
using AlignAsFormLabel = LayoutBuilder::AlignAsFormLabel; using AlignAsFormLabel = LayoutBuilder::AlignAsFormLabel;
using Break = LayoutBuilder::Break;
} using Stretch = LayoutBuilder::Stretch; // FIXME: Remove
} // namespace Utils using Break = LayoutBuilder::Break; // FIXME: Remove
QTCREATOR_UTILS_EXPORT extern LayoutBuilder::Break br;
QTCREATOR_UTILS_EXPORT extern LayoutBuilder::Stretch st;
} // Layouting
} // Utils

View File

@@ -124,7 +124,6 @@ ProjectIntroPage::ProjectIntroPage(QWidget *parent) :
d->m_projectLabel->setVisible(d->m_forceSubProject); d->m_projectLabel->setVisible(d->m_forceSubProject);
using namespace Layouting; using namespace Layouting;
const Break br;
Form { Form {
tr("Name:"), d->m_nameLineEdit, br, tr("Name:"), d->m_nameLineEdit, br,
@@ -136,7 +135,7 @@ ProjectIntroPage::ProjectIntroPage(QWidget *parent) :
Column { Column {
d->m_descriptionLabel, d->m_descriptionLabel,
Stretch(), st,
frame, frame,
d->m_stateLabel d->m_stateLabel
}.attachTo(this); }.attachTo(this);

View File

@@ -99,7 +99,6 @@ AndroidCreateKeystoreCertificate::AndroidCreateKeystoreCertificate(QWidget *pare
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Close|QDialogButtonBox::Save); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Close|QDialogButtonBox::Save);
using namespace Layouting; using namespace Layouting;
const Break br;
Column { Column {
Group { Group {

View File

@@ -150,9 +150,6 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
packagesView->header()->setStretchLastSection(false); packagesView->header()->setStretchLastSection(false);
using namespace Layouting; using namespace Layouting;
const Break br;
const Stretch st;
Grid { Grid {
searchField, expandCheck, br, searchField, expandCheck, br,

View File

@@ -353,7 +353,6 @@ AndroidSettingsWidget::AndroidSettingsWidget()
downloadNdkToolButton->setIcon(downloadIcon); downloadNdkToolButton->setIcon(downloadIcon);
using namespace Layouting; using namespace Layouting;
const Break br;
const Space empty; const Space empty;
Column { Column {
@@ -374,7 +373,7 @@ AndroidSettingsWidget::AndroidSettingsWidget()
empty, empty, sdkManagerToolButton, br, empty, empty, sdkManagerToolButton, br,
Column { tr("Android NDK list:"), Stretch() }, Column { tr("Android NDK list:"), st },
m_ndkListWidget, m_ndkListWidget,
Column { Column {
addCustomNdkButton, addCustomNdkButton,
@@ -400,7 +399,7 @@ AndroidSettingsWidget::AndroidSettingsWidget()
Span(4, openSslDetailsWidget) Span(4, openSslDetailsWidget)
} }
}, },
Stretch(), st
}.attachTo(this); }.attachTo(this);
connect(m_sdkLocationPathChooser, &PathChooser::rawPathChanged, connect(m_sdkLocationPathChooser, &PathChooser::rawPathChanged,

View File

@@ -103,20 +103,19 @@ AvdDialog::AvdDialog(const AndroidConfig &config, QWidget *parent)
m_hideTipTimer.setSingleShot(true); m_hideTipTimer.setSingleShot(true);
using namespace Layouting; using namespace Layouting;
const Break nl;
Column { Column {
Form { Form {
tr("Name:"), m_nameLineEdit, nl, tr("Name:"), m_nameLineEdit, br,
tr("Device definition:"), tr("Device definition:"),
Row { m_deviceDefinitionTypeComboBox, m_deviceDefinitionComboBox }, nl, Row { m_deviceDefinitionTypeComboBox, m_deviceDefinitionComboBox }, br,
tr("Architecture (ABI):"), m_abiComboBox, nl, tr("Architecture (ABI):"), m_abiComboBox, br,
tr("Target API:"), m_targetApiComboBox, nl, tr("Target API:"), m_targetApiComboBox, br,
QString(), m_warningText, nl, QString(), m_warningText, br,
tr("SD card size:"), m_sdcardSizeSpinBox, nl, tr("SD card size:"), m_sdcardSizeSpinBox, br,
QString(), m_overwriteCheckBox, QString(), m_overwriteCheckBox,
}, },
Stretch(), st,
m_buttonBox m_buttonBox
}.attachTo(this); }.attachTo(this);

View File

@@ -113,18 +113,17 @@ BoostTestSettingsPage::BoostTestSettingsPage(BoostTestSettings *settings, Utils:
setLayouter([settings](QWidget *widget) { setLayouter([settings](QWidget *widget) {
BoostTestSettings &s = *settings; BoostTestSettings &s = *settings;
using namespace Layouting; using namespace Layouting;
const Break nl;
Grid grid { Grid grid {
s.logLevel, nl, s.logLevel, br,
s.reportLevel, nl, s.reportLevel, br,
s.randomize, Row { s.seed }, nl, s.randomize, Row { s.seed }, br,
s.systemErrors, nl, s.systemErrors, br,
s.fpExceptions, nl, s.fpExceptions, br,
s.memLeaks, s.memLeaks,
}; };
Column { Row { Column { grid, Stretch() }, Stretch() } }.attachTo(widget); Column { Row { Column { grid, st }, st } }.attachTo(widget);
}); });
} }

View File

@@ -145,22 +145,21 @@ CatchTestSettingsPage::CatchTestSettingsPage(CatchTestSettings *settings, Utils:
setLayouter([settings](QWidget *widget) { setLayouter([settings](QWidget *widget) {
CatchTestSettings &s = *settings; CatchTestSettings &s = *settings;
using namespace Layouting; using namespace Layouting;
const Break nl;
Grid col { Grid col {
s.showSuccess, nl, s.showSuccess, br,
s.breakOnFailure, nl, s.breakOnFailure, br,
s.noThrow, nl, s.noThrow, br,
s.visibleWhitespace, nl, s.visibleWhitespace, br,
s.abortAfterChecked, s.abortAfter, nl, s.abortAfterChecked, s.abortAfter, br,
s.samplesChecked, s.benchmarkSamples, nl, s.samplesChecked, s.benchmarkSamples, br,
s.resamplesChecked, s.benchmarkResamples, nl, s.resamplesChecked, s.benchmarkResamples, br,
s.confidenceIntervalChecked, s.confidenceInterval, nl, s.confidenceIntervalChecked, s.confidenceInterval, br,
s.warmupChecked, s.benchmarkWarmupTime, nl, s.warmupChecked, s.benchmarkWarmupTime, br,
s.noAnalysis s.noAnalysis
}; };
Column { Row { col, Stretch() }, Stretch() }.attachTo(widget); Column { Row { col, st }, st }.attachTo(widget);
}); });
} }

View File

@@ -147,27 +147,26 @@ CTestSettingsPage::CTestSettingsPage(CTestSettings *settings, Utils::Id settings
setLayouter([settings](QWidget *widget) { setLayouter([settings](QWidget *widget) {
CTestSettings &s = *settings; CTestSettings &s = *settings;
using namespace Utils::Layouting; using namespace Utils::Layouting;
const Break nl;
Form form { Form form {
Row {s.outputOnFail}, nl, Row {s.outputOnFail}, br,
Row {s.scheduleRandom}, nl, Row {s.scheduleRandom}, br,
Row {s.stopOnFailure}, nl, Row {s.stopOnFailure}, br,
Row {s.outputMode}, nl, Row {s.outputMode}, br,
Group { Group {
Title(tr("Repeat tests"), &s.repeat), Title(tr("Repeat tests"), &s.repeat),
Row {s.repetitionMode, s.repetitionCount}, Row {s.repetitionMode, s.repetitionCount},
}, nl, }, br,
Group { Group {
Title(tr("Run in parallel"), &s.parallel), Title(tr("Run in parallel"), &s.parallel),
Column { Column {
Row {s.jobs}, nl, Row {s.jobs}, br,
Row {s.testLoad, s.threshold} Row {s.testLoad, s.threshold}
} }
} }
}; };
Column {Row {Column { form , Stretch() }, Stretch() } }.attachTo(widget); Column { Row { Column { form , st }, st } }.attachTo(widget);
}); });
} }

View File

@@ -143,12 +143,11 @@ GTestSettingsPage::GTestSettingsPage(GTestSettings *settings, Utils::Id settings
setLayouter([settings](QWidget *widget) { setLayouter([settings](QWidget *widget) {
GTestSettings &s = *settings; GTestSettings &s = *settings;
using namespace Layouting; using namespace Layouting;
const Break nl;
Grid grid { Grid grid {
s.runDisabled, nl, s.runDisabled, br,
s.breakOnFailure, nl, s.breakOnFailure, br,
s.repeat, s.iterations, nl, s.repeat, s.iterations, br,
s.shuffle, s.seed s.shuffle, s.seed
}; };
@@ -157,7 +156,7 @@ GTestSettingsPage::GTestSettingsPage(GTestSettings *settings, Utils::Id settings
s.gtestFilter s.gtestFilter
}; };
Column { Row { Column { grid, form, Stretch() }, Stretch() } }.attachTo(widget); Column { Row { Column { grid, form, st }, st } }.attachTo(widget);
}); });
} }

View File

@@ -138,7 +138,7 @@ QtTestSettingsPage::QtTestSettingsPage(QtTestSettings *settings, Id settingsId)
}, },
}; };
Column { Row { col, Stretch() }, Stretch() }.attachTo(widget); Column { Row { col, st }, st }.attachTo(widget);
}); });
} }

View File

@@ -188,16 +188,16 @@ TestSettingsWidget::TestSettingsWidget(QWidget *parent)
m_omitInternalMsgCB, m_omitInternalMsgCB,
m_omitRunConfigWarnCB, m_omitRunConfigWarnCB,
m_limitResultOutputCB, m_limitResultOutputCB,
Row { m_limitResultDescriptionCb, m_limitResultDescriptionSpinBox, Stretch()}, Row { m_limitResultDescriptionCb, m_limitResultDescriptionSpinBox, st },
m_openResultsOnStartCB, m_openResultsOnStartCB,
m_openResultsOnFinishCB, m_openResultsOnFinishCB,
Row { Space(20), m_openResultsOnFailCB }, Row { Space(20), m_openResultsOnFailCB },
m_autoScrollCB, m_autoScrollCB,
m_displayAppCB, m_displayAppCB,
m_processArgsCB, m_processArgsCB,
Row { new QLabel(tr("Automatically run")), m_runAfterBuildCB, Stretch() }, Row { new QLabel(tr("Automatically run")), m_runAfterBuildCB, st },
Row { timeoutLabel, m_timeoutSpin, Stretch() }, Row { timeoutLabel, m_timeoutSpin, st },
Row { resetChoicesButton, Stretch() } Row { resetChoicesButton, st }
} }
}; };
@@ -211,10 +211,10 @@ TestSettingsWidget::TestSettingsWidget(QWidget *parent)
Column { Column {
Row { Row {
Column { generalGroup, Stretch() }, Column { generalGroup, st },
Column { activeFrameworks, Stretch() } Column { activeFrameworks, st }
}, },
Stretch() st
}.attachTo(this); }.attachTo(this);
connect(m_frameworkTreeWidget, &QTreeWidget::itemChanged, connect(m_frameworkTreeWidget, &QTreeWidget::itemChanged,

View File

@@ -123,11 +123,10 @@ BazaarSettingsPage::BazaarSettingsPage(BazaarSettings *settings)
Row { Row {
s.logCount, s.logCount,
s.timeout, s.timeout,
Stretch() st
} }
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -109,7 +109,6 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett
m_command->setFilePath(m_settings->command()); m_command->setFilePath(m_settings->command());
using namespace Utils::Layouting; using namespace Utils::Layouting;
const Break br;
Column { Column {
m_useOtherFiles, m_useOtherFiles,
@@ -127,7 +126,7 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett
} }
}, },
options, options,
Stretch() st
}.attachTo(this); }.attachTo(this);
connect(m_command, &Utils::PathChooser::validChanged, options, &QWidget::setEnabled); connect(m_command, &Utils::PathChooser::validChanged, options, &QWidget::setEnabled);

View File

@@ -109,7 +109,6 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
useCustomizedStyle->setChecked(true); useCustomizedStyle->setChecked(true);
using namespace Utils::Layouting; using namespace Utils::Layouting;
const Break br;
const Space empty; const Space empty;
Form { Form {
@@ -127,7 +126,7 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
} }
}, },
options, options,
Stretch() st
}.attachTo(this); }.attachTo(this);
connect(m_command, &Utils::PathChooser::validChanged, options, &QWidget::setEnabled); connect(m_command, &Utils::PathChooser::validChanged, options, &QWidget::setEnabled);

View File

@@ -84,7 +84,6 @@ GeneralOptionsPageWidget::GeneralOptionsPageWidget(const QStringList &toolIds)
m_autoFormatTool->setCurrentIndex(qMax(index, 0)); m_autoFormatTool->setCurrentIndex(qMax(index, 0));
using namespace Utils::Layouting; using namespace Utils::Layouting;
const Break br;
Column { Column {
Group { Group {
@@ -96,7 +95,7 @@ GeneralOptionsPageWidget::GeneralOptionsPageWidget(const QStringList &toolIds)
Span(2, m_autoFormatOnlyCurrentProject) Span(2, m_autoFormatOnlyCurrentProject)
} }
}, },
Stretch() st
}.attachTo(this); }.attachTo(this);
connect(m_autoFormat, &QCheckBox::toggled, m_autoFormatTool, &QComboBox::setEnabled); connect(m_autoFormat, &QCheckBox::toggled, m_autoFormatTool, &QComboBox::setEnabled);

View File

@@ -112,7 +112,6 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set
auto options = new QGroupBox(tr("Options")); auto options = new QGroupBox(tr("Options"));
using namespace Utils::Layouting; using namespace Utils::Layouting;
const Break br;
Column { Column {
m_useOtherFiles, m_useOtherFiles,
@@ -131,7 +130,7 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set
} }
}, },
options, options,
Stretch() st
}.attachTo(this); }.attachTo(this);
connect(m_command, &Utils::PathChooser::validChanged, options, &QWidget::setEnabled); connect(m_command, &Utils::PathChooser::validChanged, options, &QWidget::setEnabled);

View File

@@ -89,13 +89,8 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
m_removeAllButton = new QPushButton(tr("Remove All")); m_removeAllButton = new QPushButton(tr("Remove All"));
using namespace Utils::Layouting; using namespace Utils::Layouting;
Column { Column {
Row { Row { m_restoreGlobal, st, gotoAnalyzerModeLabel },
m_restoreGlobal,
Stretch(),
gotoAnalyzerModeLabel
},
m_runSettingsWidget, m_runSettingsWidget,
@@ -106,7 +101,7 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
Column { Column {
m_removeSelectedButton, m_removeSelectedButton,
m_removeAllButton, m_removeAllButton,
Stretch() st
} }
} }
} }

View File

@@ -327,7 +327,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) :
using namespace Layouting; using namespace Layouting;
Grid cmakeConfiguration { Grid cmakeConfiguration {
m_filterEdit, Break(), m_filterEdit, br,
findWrapper, findWrapper,
Column { Column {
m_addButton, m_addButton,
@@ -338,7 +338,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) :
m_batchEditButton, m_batchEditButton,
Space(10), Space(10),
m_showAdvancedCheckBox, m_showAdvancedCheckBox,
Stretch() st
} }
}; };

View File

@@ -102,7 +102,7 @@ CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *sett
s.packageManagerAutoSetup, s.packageManagerAutoSetup,
s.askBeforeReConfigureInitialParams, s.askBeforeReConfigureInitialParams,
s.showSourceSubFolders, s.showSourceSubFolders,
Stretch(), st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -219,7 +219,7 @@ NewDialogWidget::NewDialogWidget(QWidget *parent)
Column { Column {
Row { QCoreApplication::translate("Core::Internal::NewDialog", "Choose a template:"), Row { QCoreApplication::translate("Core::Internal::NewDialog", "Choose a template:"),
Stretch(), m_comboBox }, st, m_comboBox },
Row { m_templateCategoryView, m_templatesView, frame }, Row { m_templateCategoryView, m_templatesView, frame },
buttonBox buttonBox
}.attachTo(this); }.attachTo(this);

View File

@@ -118,9 +118,9 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q)
resetColorButton->setToolTip(tr("Reset to default.", "Color")); resetColorButton->setToolTip(tr("Reset to default.", "Color"));
Form form; Form form;
form.addRow({tr("Color:"), m_colorButton, resetColorButton, Stretch()}); form.addRow({tr("Color:"), m_colorButton, resetColorButton, st});
form.addRow({tr("Theme:"), m_themeChooser}); form.addRow({tr("Theme:"), m_themeChooser});
form.addRow({tr("Language:"), m_languageBox, Stretch()}); form.addRow({tr("Language:"), m_languageBox, st});
if (!Utils::HostOsInfo::isMacHost()) { if (!Utils::HostOsInfo::isMacHost()) {
auto dpiCheckbox = new QCheckBox(tr("Enable high DPI scaling")); auto dpiCheckbox = new QCheckBox(tr("Enable high DPI scaling"));
@@ -136,8 +136,8 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q)
} }
form.addRow({Space(), m_showShortcutsInContextMenus}); form.addRow({Space(), m_showShortcutsInContextMenus});
form.addRow(Row{m_resetWarningsButton, Stretch()}); form.addRow(Row{m_resetWarningsButton, st});
form.addRow({tr("Text codec for tools:"), m_codecBox, Stretch()}); form.addRow({tr("Text codec for tools:"), m_codecBox, st});
Column{Group{Title(tr("User Interface")), form}}.attachTo(this); Column{Group{Title(tr("User Interface")), form}}.attachTo(this);
fillLanguageBox(); fillLanguageBox();

View File

@@ -227,8 +227,6 @@ public:
m_editButton->setEnabled(false); m_editButton->setEnabled(false);
using namespace Layouting; using namespace Layouting;
static const Break br;
static const Stretch st;
Column buttons{addButton, m_removeButton, m_editButton, st}; Column buttons{addButton, m_removeButton, m_editButton, st};

View File

@@ -93,8 +93,6 @@ UrlFilterOptions::UrlFilterOptions(UrlLocatorFilter *filter, QWidget *parent)
buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
using namespace Layouting; using namespace Layouting;
static const Break br;
static const Stretch st;
Column buttons { add, remove, moveUp, moveDown, st }; Column buttons { add, remove, moveUp, moveDown, st };

View File

@@ -186,31 +186,31 @@ public:
form.addRow({patchCommandLabel, Span(2, m_patchChooser)}); form.addRow({patchCommandLabel, Span(2, m_patchChooser)});
if (HostOsInfo::isMacHost()) { if (HostOsInfo::isMacHost()) {
form.addRow({fileSystemCaseSensitivityLabel, form.addRow({fileSystemCaseSensitivityLabel,
Span(2, Row{m_fileSystemCaseSensitivityChooser, Stretch()})}); Span(2, Row{m_fileSystemCaseSensitivityChooser, st})});
} }
form.addRow( form.addRow(
{tr("When files are externally modified:"), Span(2, Row{m_reloadBehavior, Stretch()})}); {tr("When files are externally modified:"), Span(2, Row{m_reloadBehavior, st})});
form.addRow( form.addRow(
{m_autoSaveCheckBox, Span(2, Row{tr("Interval:"), m_autoSaveInterval, Stretch()})}); {m_autoSaveCheckBox, Span(2, Row{tr("Interval:"), m_autoSaveInterval, st})});
form.addRow(Span(3, m_autoSaveRefactoringCheckBox)); form.addRow(Span(3, m_autoSaveRefactoringCheckBox));
form.addRow({m_autoSuspendCheckBox, form.addRow({m_autoSuspendCheckBox,
Span(2, Row{autoSuspendLabel, m_autoSuspendMinDocumentCount, Stretch()})}); Span(2, Row{autoSuspendLabel, m_autoSuspendMinDocumentCount, st})});
form.addRow(Span(3, Row{m_warnBeforeOpeningBigFiles, m_bigFilesLimitSpinBox, Stretch()})); form.addRow(Span(3, Row{m_warnBeforeOpeningBigFiles, m_bigFilesLimitSpinBox, st}));
form.addRow(Span(3, form.addRow(Span(3,
Row{tr("Maximum number of entries in \"Recent Files\":"), Row{tr("Maximum number of entries in \"Recent Files\":"),
m_maxRecentFilesSpinBox, m_maxRecentFilesSpinBox,
Stretch()})); st}));
form.addRow(m_askBeforeExitCheckBox); form.addRow(m_askBeforeExitCheckBox);
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHPAD
form.addRow( form.addRow(
Span(3, Row{m_enableCrashReportingCheckBox, helpCrashReportingButton, Stretch()})); Span(3, Row{m_enableCrashReportingCheckBox, helpCrashReportingButton, st}));
form.addRow(Span(3, Row{m_clearCrashReportsButton, m_crashReportsSizeText, Stretch()})); form.addRow(Span(3, Row{m_clearCrashReportsButton, m_crashReportsSizeText, st}));
#endif #endif
Column { Column {
Group { Group {
Title(tr("System")), Title(tr("System")),
Column { form, Stretch() } Column { form, st }
} }
}.attachTo(this); }.attachTo(this);

View File

@@ -71,11 +71,11 @@ FileShareProtocolSettingsPage::FileShareProtocolSettingsPage(FileShareProtocolSe
Column { Column {
Form { Form {
label, Break(), label, br,
s.path, s.path,
s.displayCount s.displayCount
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -94,7 +94,7 @@ SettingsPage::SettingsPage(Settings *settings)
}, },
s.copyToClipboard, s.copyToClipboard,
s.displayOutput, s.displayOutput,
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -109,10 +109,10 @@ CppCodeModelSettingsWidget::CppCodeModelSettingsWidget(CppCodeModelSettings *s)
Column { Column {
m_interpretAmbiguousHeadersAsCHeaders, m_interpretAmbiguousHeadersAsCHeaders,
m_ignorePchCheckBox, m_ignorePchCheckBox,
Row { m_skipIndexingBigFilesCheckBox, m_bigFilesLimitSpinBox, Stretch() }, Row { m_skipIndexingBigFilesCheckBox, m_bigFilesLimitSpinBox, st },
} }
}, },
Stretch() st
}.attachTo(this); }.attachTo(this);
} }

View File

@@ -121,7 +121,7 @@ CvsSettingsPage::CvsSettingsPage(CvsSettings *settings)
s.describeByCommitId, s.describeByCommitId,
} }
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -56,7 +56,7 @@ AnalyzerRunConfigWidget::AnalyzerRunConfigWidget(ProjectExplorer::GlobalOrProjec
details->setWidget(innerPane); details->setWidget(innerPane);
Column { Column {
Row { settingsCombo, restoreButton, Stretch() }, Row { settingsCombo, restoreButton, st },
configWidget configWidget
}.attachTo(innerPane); }.attachTo(innerPane);

View File

@@ -202,7 +202,7 @@ CdbOptionsPageWidget::CdbOptionsPageWidget()
Column { Column {
s.cdbAdditionalArguments, s.cdbAdditionalArguments,
s.useCdbConsole, s.useCdbConsole,
Stretch() st
} }
}, },
@@ -230,7 +230,7 @@ CdbOptionsPageWidget::CdbOptionsPageWidget()
} }
}, },
Stretch() st
}.attachTo(this); }.attachTo(this);
} }
@@ -283,7 +283,7 @@ CdbPathsPageWidget::CdbPathsPageWidget()
Column { Column {
Group { Title(Tr::tr("Symbol Paths")), Column { m_symbolPaths } }, Group { Title(Tr::tr("Symbol Paths")), Column { m_symbolPaths } },
Group { Title(Tr::tr("Source Paths")), Column { m_sourcePaths } }, Group { Title(Tr::tr("Source Paths")), Column { m_sourcePaths } },
Stretch() st
}.attachTo(this); }.attachTo(this);
} }

View File

@@ -63,7 +63,7 @@ public:
s.raiseOnInterrupt, s.raiseOnInterrupt,
s.breakpointsFullPathByDefault, s.breakpointsFullPathByDefault,
s.warnOnReleaseBuilds, s.warnOnReleaseBuilds,
Row { s.maximalStackDepth, Stretch() } Row { s.maximalStackDepth, st }
}; };
Column col2 { Column col2 {
@@ -73,13 +73,13 @@ public:
s.stationaryEditorWhileStepping, s.stationaryEditorWhileStepping,
s.forceLoggingToConsole, s.forceLoggingToConsole,
s.registerForPostMortem, s.registerForPostMortem,
Stretch() st
}; };
Column { Column {
Group { Title("Behavior"), Row { col1, col2, Stretch() } }, Group { Title("Behavior"), Row { col1, col2, st } },
s.sourcePathMap, s.sourcePathMap,
Stretch() st
}.attachTo(this); }.attachTo(this);
} }
@@ -174,8 +174,7 @@ public:
}; };
Grid limits { Grid limits {
s.maximalStringLength, s.maximalStringLength, br,
Break(),
s.displayStringLimit s.displayStringLimit
}; };
@@ -187,8 +186,8 @@ public:
s.showQtNamespace, s.showQtNamespace,
s.showQObjectNames, s.showQObjectNames,
Space(10), Space(10),
Row { limits, Stretch() }, Row { limits, st },
Stretch() st
}.attachTo(this); }.attachTo(this);
} }

View File

@@ -61,7 +61,7 @@ public:
Group general { Group general {
title(Tr::tr("General")), title(Tr::tr("General")),
Column { Column {
Row { s.gdbWatchdogTimeout, Stretch() }, Row { s.gdbWatchdogTimeout, st },
s.skipKnownFrames, s.skipKnownFrames,
s.useMessageBoxForSignals, s.useMessageBoxForSignals,
s.adjustBreakpointLocations, s.adjustBreakpointLocations,
@@ -71,7 +71,7 @@ public:
s.intelFlavor, s.intelFlavor,
s.usePseudoTracepoints, s.usePseudoTracepoints,
s.useIndexCache, s.useIndexCache,
Stretch() st
} }
}; };
@@ -84,7 +84,7 @@ public:
title(Tr::tr("Additional Attach Commands")), title(Tr::tr("Additional Attach Commands")),
Column { s.gdbPostAttachCommands }, Column { s.gdbPostAttachCommands },
}, },
Stretch() st
}; };
Row { general, commands }.attachTo(w); Row { general, commands }.attachTo(w);
@@ -132,7 +132,7 @@ public:
} }
}; };
Column { extended, Stretch() }.attachTo(w); Column { extended, st }.attachTo(w);
}); });
} }
}; };

View File

@@ -177,15 +177,15 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device)
using namespace Layouting; using namespace Layouting;
Form { Form {
repoLabel, m_repoLineEdit, Break(), repoLabel, m_repoLineEdit, br,
tagLabel, m_tagLineEdit, Break(), tagLabel, m_tagLineEdit, br,
idLabel, m_idLineEdit, Break(), idLabel, m_idLineEdit, br,
daemonStateLabel, m_daemonReset, m_daemonState, Break(), daemonStateLabel, m_daemonReset, m_daemonState, br,
m_runAsOutsideUser, Break(), m_runAsOutsideUser, br,
Column { Column {
pathListLabel, pathListLabel,
m_pathsListEdit, m_pathsListEdit,
}, Break(), }, br,
Column { Column {
Space(20), Space(20),
Row { Row {
@@ -196,9 +196,9 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device)
autoDetectButton, autoDetectButton,
undoAutoDetectButton, undoAutoDetectButton,
listAutoDetectedButton, listAutoDetectedButton,
Stretch(), st,
}, },
new QLabel(Tr::tr("Detection log:")), Tr::tr("Detection log:"),
logView logView
} }
}.attachTo(this); }.attachTo(this);

View File

@@ -75,7 +75,7 @@ DockerSettingsPage::DockerSettingsPage(DockerSettings *settings)
Title(Tr::tr("Configuration")), Title(Tr::tr("Configuration")),
Row { s.dockerBinaryPath } Row { s.dockerBinaryPath }
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
// clang-format on // clang-format on
}); });

View File

@@ -416,7 +416,7 @@ void FakeVimOptionPage::layoutPage(QWidget *widget)
} }
}; };
Row ints { s.shiftWidth, s.tabStop, s.scrollOff, Stretch() }; Row ints { s.shiftWidth, s.tabStop, s.scrollOff, st };
Column strings { Column strings {
s.backspace, s.backspace,
@@ -447,8 +447,8 @@ void FakeVimOptionPage::layoutPage(QWidget *widget)
} }
}, },
Row { copyTextEditorSettings, setQtStyle, setPlainStyle, Stretch() }, Row { copyTextEditorSettings, setQtStyle, setPlainStyle, st },
Stretch() st
}.attachTo(widget, true); }.attachTo(widget, true);

View File

@@ -179,7 +179,7 @@ GitSettingsPage::GitSettingsPage(GitSettings *settings)
Group { Group {
Title(GitSettings::tr("Miscellaneous")), Title(GitSettings::tr("Miscellaneous")),
Column { Column {
Row { s.logCount, s.timeout, Stretch() }, Row { s.logCount, s.timeout, st },
s.pullRebase s.pullRebase
} }
}, },
@@ -194,7 +194,7 @@ GitSettingsPage::GitSettingsPage(GitSettings *settings)
Row { s.repositoryBrowserCmd } Row { s.repositoryBrowserCmd }
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -118,7 +118,6 @@ GitLabDialog::GitLabDialog(QWidget *parent)
buttonBox->addButton(m_clonePB, QDialogButtonBox::ActionRole); buttonBox->addButton(m_clonePB, QDialogButtonBox::ActionRole);
using namespace Layouting; using namespace Layouting;
const Stretch st;
Column { Column {
Row { Row {

View File

@@ -146,14 +146,13 @@ GitLabOptionsWidget::GitLabOptionsWidget(QWidget *parent)
m_add->setToolTip(tr("Add new GitLab server configuration.")); m_add->setToolTip(tr("Add new GitLab server configuration."));
using namespace Utils::Layouting; using namespace Utils::Layouting;
const Break nl;
Grid { Grid {
Form { Form {
defaultLabel, m_defaultGitLabServer, nl, defaultLabel, m_defaultGitLabServer, br,
Row { Group { Column { m_gitLabServerWidget, Space(1) } } }, nl, Row { Group { Column { m_gitLabServerWidget, Space(1) } } }, br,
m_curl, nl, m_curl, br,
}, Column { m_add, m_edit, m_remove, Stretch() }, }, Column { m_add, m_edit, m_remove, st },
}.attachTo(this); }.attachTo(this);
connect(m_edit, &QPushButton::clicked, this, &GitLabOptionsWidget::showEditServerDialog); connect(m_edit, &QPushButton::clicked, this, &GitLabOptionsWidget::showEditServerDialog);

View File

@@ -81,7 +81,7 @@ MacroOptionsWidget::MacroOptionsWidget()
Title(tr("Preferences")), Title(tr("Preferences")),
Row { Row {
m_treeWidget, m_treeWidget,
Column { m_removeButton, Stretch() }, Column { m_removeButton, st },
} }
}, },
m_macroGroup m_macroGroup

View File

@@ -53,8 +53,8 @@ SaveDialog::SaveDialog(QWidget *parent) :
using namespace Layouting; using namespace Layouting;
Form { Form {
tr("Name:"), m_name, Break(), tr("Name:"), m_name, br,
tr("Description:"), m_description, Break(), tr("Description:"), m_description, br,
buttonBox buttonBox
}.attachTo(this); }.attachTo(this);

View File

@@ -98,11 +98,11 @@ MercurialSettingsPage::MercurialSettingsPage(MercurialSettings *settings)
Row { Row {
s.logCount, s.logCount,
s.timeout, s.timeout,
Stretch() st
} }
}, },
Stretch()
st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -71,7 +71,7 @@ GeneralSettingsPage::GeneralSettingsPage()
Column { Column {
s.autorunMeson, s.autorunMeson,
s.verboseNinja, s.verboseNinja,
Stretch(), st,
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -145,7 +145,7 @@ NimToolsSettingsPage::NimToolsSettingsPage(NimSettings *settings)
Title("Nimsuggest"), Title("Nimsuggest"),
Column { settings->nimSuggestPath } Column { settings->nimSuggestPath }
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -278,7 +278,7 @@ PerforceSettingsPage::PerforceSettingsPage(PerforceSettings *settings)
Group misc { Group misc {
Title(PerforceSettings::tr("Miscellaneous")), Title(PerforceSettings::tr("Miscellaneous")),
Column { Column {
Row { s.logCount, s.timeOutS, Stretch() }, Row { s.logCount, s.timeOutS, st },
s.promptToSubmit, s.promptToSubmit,
s.autoOpen s.autoOpen
} }
@@ -288,8 +288,8 @@ PerforceSettingsPage::PerforceSettingsPage(PerforceSettings *settings)
config, config,
environment, environment,
misc, misc,
Row { errorLabel, Stretch(), testButton }, Row { errorLabel, st, testButton },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -109,20 +109,18 @@ PerfConfigWidget::PerfConfigWidget(PerfSettings *settings, QWidget *parent)
connect(resetButton, &QPushButton::pressed, m_settings, &PerfSettings::resetToDefault); connect(resetButton, &QPushButton::pressed, m_settings, &PerfSettings::resetToDefault);
using namespace Layouting; using namespace Layouting;
const Break nl;
Column { Column {
Row { Stretch(), useTracePointsButton, addEventButton, removeEventButton, resetButton }, Row { st, useTracePointsButton, addEventButton, removeEventButton, resetButton },
eventsView, eventsView,
Grid { Grid {
m_settings->callgraphMode, m_settings->stackSize, nl, m_settings->callgraphMode, m_settings->stackSize, br,
m_settings->sampleMode, m_settings->period, nl, m_settings->sampleMode, m_settings->period, br,
m_settings->extraArguments, m_settings->extraArguments,
}, },
Stretch() st
}.attachTo(this); }.attachTo(this);
} }

View File

@@ -79,11 +79,11 @@ PerfLoadDialog::PerfLoadDialog(QWidget *parent)
Column { Column {
Grid { Grid {
label1, m_traceFileLineEdit, browseTraceFileButton, Break(), label1, m_traceFileLineEdit, browseTraceFileButton, br,
label2, m_executableDirLineEdit, browseExecutableDirButton, Break(), label2, m_executableDirLineEdit, browseExecutableDirButton, br,
label3, Span(2, m_kitChooser) label3, Span(2, m_kitChooser)
}, },
Stretch(), st,
line, line,
buttonBox buttonBox
}.attachTo(this); }.attachTo(this);

View File

@@ -119,7 +119,7 @@ BuildPropertiesSettingsPage::BuildPropertiesSettingsPage(BuildPropertiesSettings
s.qmlDebugging, s.qmlDebugging,
s.qtQuickCompiler s.qtQuickCompiler
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -70,7 +70,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project)
using namespace Utils::Layouting; using namespace Utils::Layouting;
Column { Column {
Row { new QLabel(tr("Language:")), languageComboBox, Stretch() }, Row { new QLabel(tr("Language:")), languageComboBox, st },
stackedWidget stackedWidget
}.attachTo(this, false); }.attachTo(this, false);
} }

View File

@@ -72,14 +72,14 @@ EditorSettingsWidget::EditorSettingsWidget(Project *project) : m_project(project
m_showWrapColumn, m_showWrapColumn,
m_wrapColumn, m_wrapColumn,
m_useIndenter, m_useIndenter,
Stretch() st
}.attachTo(m_displaySettings); }.attachTo(m_displaySettings);
Column { Column {
Row { m_restoreButton, Stretch() }, Row { m_restoreButton, st },
m_displaySettings, m_displaySettings,
m_behaviorSettings, m_behaviorSettings,
Stretch(), st,
}.attachTo(this, false); }.attachTo(this, false);
const EditorConfiguration *config = m_project->editorConfiguration(); const EditorConfiguration *config = m_project->editorConfiguration();

View File

@@ -88,7 +88,7 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
using namespace Layouting; using namespace Layouting;
Grid { Grid {
AlignAsFormLabel(label), m_nameEdit, m_iconButton, Break(), AlignAsFormLabel(label), m_nameEdit, m_iconButton, br,
AlignAsFormLabel(label), m_fileSystemFriendlyNameLineEdit AlignAsFormLabel(label), m_fileSystemFriendlyNameLineEdit
}.attachTo(this); }.attachTo(this);

View File

@@ -112,7 +112,7 @@ public:
connect(m_executable, &PathChooser::filePathChanged, this, &InterpreterDetailsWidget::changed); connect(m_executable, &PathChooser::filePathChanged, this, &InterpreterDetailsWidget::changed);
Form { Form {
Tr::tr("Name:"), m_name, Break(), Tr::tr("Name:"), m_name, br,
Tr::tr("Executable"), m_executable Tr::tr("Executable"), m_executable
}.attachTo(this, false); }.attachTo(this, false);
} }
@@ -221,7 +221,7 @@ InterpreterOptionsWidget::InterpreterOptionsWidget(const QList<Interpreter> &int
m_deleteButton, m_deleteButton,
m_makeDefaultButton, m_makeDefaultButton,
m_cleanButton, m_cleanButton,
Stretch() st
}; };
Column { Column {

View File

@@ -105,7 +105,7 @@ public:
s.m_warnAgainstUnalignedBuildDir, s.m_warnAgainstUnalignedBuildDir,
s.m_alwaysRunQmake, s.m_alwaysRunQmake,
s.m_ignoreSystemFunction, s.m_ignoreSystemFunction,
Stretch() st
}.attachTo(this); }.attachTo(this);
} }

View File

@@ -103,22 +103,22 @@ QnxSettingsWidget::QnxSettingsWidget()
Row { Row {
Column { Column {
m_configsCombo, m_configsCombo,
Row { m_generateKitsCheckBox, Stretch() }, Row { m_generateKitsCheckBox, st },
Group { Group {
Title(Tr::tr("Configuration Information:")), Title(Tr::tr("Configuration Information:")),
Form { Form {
Tr::tr("Name:"), m_configName, Break(), Tr::tr("Name:"), m_configName, br,
Tr::tr("Version:"), m_configVersion, Break(), Tr::tr("Version:"), m_configVersion, br,
Tr::tr("Host:"), m_configHost, Break(), Tr::tr("Host:"), m_configHost, br,
Tr::tr("Target:"), m_configTarget Tr::tr("Target:"), m_configTarget
} }
}, },
Stretch() st
}, },
Column { Column {
addButton, addButton,
removeButton, removeButton,
Stretch() st
} }
}.attachTo(this); }.attachTo(this);

View File

@@ -108,7 +108,7 @@ CodeGenSettingsPageWidget::CodeGenSettingsPageWidget()
m_addQtVersionCheckBox m_addQtVersionCheckBox
} }
}, },
Stretch() st
}.attachTo(this); }.attachTo(this);
connect(m_includeQtModuleCheckBox, &QAbstractButton::toggled, connect(m_includeQtModuleCheckBox, &QAbstractButton::toggled,

View File

@@ -290,15 +290,9 @@ QtOptionsPageWidget::QtOptionsPageWidget()
auto versionInfoWidget = new QWidget; auto versionInfoWidget = new QWidget;
Form { Form {
new QLabel(tr("Name:")), m_nameEdit, Break(), tr("Name:"), m_nameEdit, br,
new QLabel(tr("qmake path:")), tr("qmake path:"), Row { m_qmakePath, m_editPathPushButton }, br,
Row {
m_qmakePath,
m_editPathPushButton,
},
Break(),
Span(2, m_errorLabel) Span(2, m_errorLabel)
}.attachTo(versionInfoWidget, false); }.attachTo(versionInfoWidget, false);
m_formLayout = qobject_cast<QFormLayout*>(versionInfoWidget->layout()); m_formLayout = qobject_cast<QFormLayout*>(versionInfoWidget->layout());
@@ -308,11 +302,7 @@ QtOptionsPageWidget::QtOptionsPageWidget()
m_qtdirList, m_qtdirList,
m_versionInfoWidget, m_versionInfoWidget,
m_infoWidget, m_infoWidget,
Row { Row { tr("Register documentation:"), m_documentationSetting, st }
new QLabel(tr("Register documentation:")),
m_documentationSetting,
Stretch()
}
}, },
Column { Column {
@@ -321,7 +311,7 @@ QtOptionsPageWidget::QtOptionsPageWidget()
Space(20), Space(20),
m_linkWithQtButton, m_linkWithQtButton,
m_cleanUpButton, m_cleanUpButton,
Stretch() st,
} }
}.attachTo(this); }.attachTo(this);

View File

@@ -98,17 +98,15 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
sshPortLabel->setBuddy(m_sshPortSpinBox); sshPortLabel->setBuddy(m_sshPortSpinBox);
using namespace Layouting; using namespace Layouting;
const Break nl;
const Stretch st;
Form { Form {
Tr::tr("Machine type:"), m_machineTypeValueLabel, st, nl, Tr::tr("Machine type:"), m_machineTypeValueLabel, st, br,
Tr::tr("Authentication type:"), m_defaultAuthButton, m_keyButton, st, nl, Tr::tr("Authentication type:"), m_defaultAuthButton, m_keyButton, st, br,
Tr::tr("&Host name:"), m_hostLineEdit, sshPortLabel, m_sshPortSpinBox, m_hostKeyCheckBox, st, nl, Tr::tr("&Host name:"), m_hostLineEdit, sshPortLabel, m_sshPortSpinBox, m_hostKeyCheckBox, st, br,
Tr::tr("Free ports:"), m_portsLineEdit, m_portsWarningLabel, Tr::tr("Timeout:"), m_timeoutSpinBox, st, nl, Tr::tr("Free ports:"), m_portsLineEdit, m_portsWarningLabel, Tr::tr("Timeout:"), m_timeoutSpinBox, st, br,
Tr::tr("&Username:"), m_userLineEdit, st, nl, Tr::tr("&Username:"), m_userLineEdit, st, br,
m_keyLabel, m_keyFileLineEdit, createKeyButton, st, nl, m_keyLabel, m_keyFileLineEdit, createKeyButton, st, br,
Tr::tr("GDB server executable:"), m_gdbServerLineEdit, st, nl Tr::tr("GDB server executable:"), m_gdbServerLineEdit, st, br
}.attachTo(this); }.attachTo(this);
connect(m_hostLineEdit, &QLineEdit::editingFinished, connect(m_hostLineEdit, &QLineEdit::editingFinished,

View File

@@ -77,13 +77,10 @@ GenericLinuxDeviceConfigurationWizardSetupPage::GenericLinuxDeviceConfigurationW
d->userNameLineEdit = new QLineEdit(this); d->userNameLineEdit = new QLineEdit(this);
using namespace Layouting; using namespace Layouting;
const Break nl;
const Stretch st;
Form { Form {
Tr::tr("The name to identify this configuration:"), d->nameLineEdit, nl, Tr::tr("The name to identify this configuration:"), d->nameLineEdit, br,
Tr::tr("The device's host name or IP address:"), d->hostNameLineEdit, st, nl, Tr::tr("The device's host name or IP address:"), d->hostNameLineEdit, st, br,
Tr::tr("The username to log into the device:"), d->userNameLineEdit, st, nl Tr::tr("The username to log into the device:"), d->userNameLineEdit, st, br
}.attachTo(this); }.attachTo(this);
setSubTitle(QLatin1String(" ")); // For Qt bug (background color) setSubTitle(QLatin1String(" ")); // For Qt bug (background color)

View File

@@ -71,20 +71,17 @@ SshKeyCreationDialog::SshKeyCreationDialog(QWidget *parent)
auto closeButton = new QPushButton(Tr::tr("&Cancel")); auto closeButton = new QPushButton(Tr::tr("&Cancel"));
using namespace Layouting; using namespace Layouting;
const Break nl;
const Stretch st;
Column { Column {
Group { Group {
Title(Tr::tr("Options")), Title(Tr::tr("Options")),
Form { Form {
Tr::tr("Key algorithm:"), m_rsa, m_ecdsa, st, nl, Tr::tr("Key algorithm:"), m_rsa, m_ecdsa, st, br,
Tr::tr("Key &size:"), m_comboBox, st, nl, Tr::tr("Key &size:"), m_comboBox, st, br,
Tr::tr("Private key file:"), m_privateKeyFileValueLabel, privateKeyFileButton, st, nl, Tr::tr("Private key file:"), m_privateKeyFileValueLabel, privateKeyFileButton, st, br,
Tr::tr("Public key file:"), m_publicKeyFileLabel Tr::tr("Public key file:"), m_publicKeyFileLabel
} }
}, },
Stretch(), st,
Row { m_generateButton, closeButton, st } Row { m_generateButton, closeButton, st }
}.attachTo(this); }.attachTo(this);

View File

@@ -118,13 +118,13 @@ void ObjectsMapEditorWidget::initUi()
m_newProperty, m_newProperty,
m_removeProperty, m_removeProperty,
m_jumpToSymbolicName, m_jumpToSymbolicName,
Stretch() st
} }
}.attachTo(validPropertiesWidget); }.attachTo(validPropertiesWidget);
Column { Column {
m_propertiesLineEdit, m_propertiesLineEdit,
Stretch() st
}.attachTo(invalidPropertiesWidget); }.attachTo(invalidPropertiesWidget);
Column { Column {
@@ -135,7 +135,7 @@ void ObjectsMapEditorWidget::initUi()
Column { Column {
m_newSymbolicName, m_newSymbolicName,
m_removeSymbolicName, m_removeSymbolicName,
Stretch(), st,
} }
}, },
m_propertiesLabel, m_propertiesLabel,

View File

@@ -76,7 +76,7 @@ OpenSquishSuitesDialog::OpenSquishSuitesDialog(QWidget *parent)
Column { Column {
selectAllPushButton, selectAllPushButton,
deselectAllPushButton, deselectAllPushButton,
Stretch() st
} }
}, },
m_buttonBox m_buttonBox

View File

@@ -113,15 +113,13 @@ SquishSettingsPage::SquishSettingsPage(SquishSettings *settings)
SquishSettings &s = *settings; SquishSettings &s = *settings;
using namespace Layouting; using namespace Layouting;
const Break nl;
Grid grid { Grid grid {
s.squishPath, nl, s.squishPath, br,
s.licensePath, nl, s.licensePath, br,
Span {2, Row { s.local, s.serverHost, s.serverPort } }, nl, Span {2, Row { s.local, s.serverHost, s.serverPort } }, br,
s.verbose, nl, s.verbose, br,
}; };
Column { Row { grid }, Stretch() }.attachTo(widget); Column { Row { grid }, st }.attachTo(widget);
}); });
} }
@@ -311,14 +309,14 @@ SquishServerSettingsWidget::SquishServerSettingsWidget(QWidget *parent)
using namespace Layouting; using namespace Layouting;
Form grid { Form grid {
&m_applicationsView, Break(), &m_applicationsView, br,
&m_serverSettings.autTimeout, &m_serverSettings.autTimeout,
&m_serverSettings.responseTimeout, &m_serverSettings.responseTimeout,
&m_serverSettings.postMortemWaitTime, &m_serverSettings.postMortemWaitTime,
&m_serverSettings.animatedCursor, &m_serverSettings.animatedCursor,
}; };
// TODO buttons for add, edit, remove // TODO buttons for add, edit, remove
Column { Row { grid }, Stretch() }.attachTo(this); Column { Row { grid }, st }.attachTo(this);
repopulateApplicationView(); // initial repopulateApplicationView(); // initial

View File

@@ -136,13 +136,13 @@ SubversionSettingsPage::SubversionSettingsPage(SubversionSettings *settings)
Group { Group {
Title(SubversionSettings::tr("Miscellaneous")), Title(SubversionSettings::tr("Miscellaneous")),
Column { Column {
Row { s.logCount, s.timeout, Stretch() }, Row { s.logCount, s.timeout, st },
s.promptOnSubmit, s.promptOnSubmit,
s.spaceIgnorantAnnotation, s.spaceIgnorantAnnotation,
} }
}, },
Stretch() st
}.attachTo(widget); }.attachTo(widget);
}); });
} }

View File

@@ -107,7 +107,7 @@ OptionsDialog::OptionsDialog(Settings *settings, const std::function<void ()> &o
m_editKeywordButton, m_editKeywordButton,
m_removeKeywordButton, m_removeKeywordButton,
resetKeywordsButton, resetKeywordsButton,
Stretch() st
} }
} }
}, },

View File

@@ -64,7 +64,7 @@ TodoProjectSettingsWidget::TodoProjectSettingsWidget(ProjectExplorer::Project *p
Column { Column {
addExcludedPatternButton, addExcludedPatternButton,
m_removeExcludedPatternButton, m_removeExcludedPatternButton,
Stretch() st
} }
} }
} }

View File

@@ -76,10 +76,10 @@ public:
m_infoLabel, m_infoLabel,
Row { Row {
Form { Form {
new QLabel(tr("Check interval basis:")), m_checkIntervalComboBox, Break(), new QLabel(tr("Check interval basis:")), m_checkIntervalComboBox, br,
new QLabel(tr("Next check date:")), m_nextCheckDateLabel new QLabel(tr("Next check date:")), m_nextCheckDateLabel
}, },
Stretch() st
}, },
m_checkForNewQtVersions m_checkForNewQtVersions
}.attachTo(m_updatesGroupBox); }.attachTo(m_updatesGroupBox);
@@ -95,14 +95,14 @@ public:
Row { Row {
new QLabel(tr("Last check date:")), new QLabel(tr("Last check date:")),
m_lastCheckDateLabel, m_lastCheckDateLabel,
Stretch(), st,
Row { Row {
m_messageLabel, m_messageLabel,
Stretch(), st,
m_checkNowButton m_checkNowButton
} }
}, },
Stretch() st
}.attachTo(this); }.attachTo(this);
m_checkIntervalComboBox->setCurrentIndex(-1); m_checkIntervalComboBox->setCurrentIndex(-1);

View File

@@ -61,31 +61,30 @@ public:
ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings) ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings)
{ {
using namespace Layouting; using namespace Layouting;
const Break nl;
ValgrindBaseSettings &s = *settings; ValgrindBaseSettings &s = *settings;
Grid generic { Grid generic {
s.valgrindExecutable, nl, s.valgrindExecutable, br,
s.valgrindArguments, nl, s.valgrindArguments, br,
s.selfModifyingCodeDetection, nl s.selfModifyingCodeDetection, br
}; };
Grid memcheck { Grid memcheck {
s.memcheckArguments, nl, s.memcheckArguments, br,
s.trackOrigins, nl, s.trackOrigins, br,
s.showReachable, nl, s.showReachable, br,
s.leakCheckOnFinish, nl, s.leakCheckOnFinish, br,
s.numCallers, nl, s.numCallers, br,
s.filterExternalIssues, nl, s.filterExternalIssues, br,
s.suppressions s.suppressions
}; };
Grid callgrind { Grid callgrind {
s.callgrindArguments, nl, s.callgrindArguments, br,
s.kcachegrindExecutable, nl, s.kcachegrindExecutable, br,
s.minimumInclusiveCostRatio, nl, s.minimumInclusiveCostRatio, br,
s.visualizationMinimumInclusiveCostRatio, nl, s.visualizationMinimumInclusiveCostRatio, br,
s.enableEventToolTips, nl, s.enableEventToolTips, br,
Span { Span {
2, 2,
Group { Group {
@@ -103,7 +102,7 @@ ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings)
Group { Title(Tr::tr("Valgrind Generic Settings")), generic }, Group { Title(Tr::tr("Valgrind Generic Settings")), generic },
Group { Title(Tr::tr("MemCheck Memory Analysis Options")), memcheck }, Group { Title(Tr::tr("MemCheck Memory Analysis Options")), memcheck },
Group { Title(Tr::tr("CallGrind Profiling Options")), callgrind }, Group { Title(Tr::tr("CallGrind Profiling Options")), callgrind },
Stretch(), st,
}.attachTo(this); }.attachTo(this);
} }

View File

@@ -173,10 +173,10 @@ void SuppressionAspect::addToLayout(LayoutBuilder &builder)
connect(d->entryList->selectionModel(), &QItemSelectionModel::selectionChanged, connect(d->entryList->selectionModel(), &QItemSelectionModel::selectionChanged,
d, &SuppressionAspectPrivate::slotSuppressionSelectionChanged); d, &SuppressionAspectPrivate::slotSuppressionSelectionChanged);
builder.addItem(Column { new QLabel(Tr::tr("Suppression files:")), Stretch() }); builder.addItem(Column { Tr::tr("Suppression files:"), st });
Row group { Row group {
d->entryList.data(), d->entryList.data(),
Column { d->addEntry.data(), d->removeEntry.data(), Stretch() } Column { d->addEntry.data(), d->removeEntry.data(), st }
}; };
builder.addItem(Span { 2, group }); builder.addItem(Span { 2, group });

View File

@@ -138,7 +138,7 @@ CommonSettingsWidget::CommonSettingsWidget(CommonOptionsPage *page)
using namespace Layouting; using namespace Layouting;
Column { Column {
Row { s.lineWrap, s.lineWrapWidth, Stretch() }, Row { s.lineWrap, s.lineWrapWidth, st },
Form { Form {
s.submitMessageCheckScript, s.submitMessageCheckScript,
s.nickNameMailMap, s.nickNameMailMap,