Utils: Make Layouting a top level namespace

The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.

Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-04-25 10:15:07 +02:00
parent 68c92f6dfa
commit 8cf500c5bc
127 changed files with 154 additions and 149 deletions

View File

@@ -79,7 +79,7 @@ WorkspaceNameInputDialog::WorkspaceNameInputDialog(DockManager *manager, QWidget
connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
label, label,
@@ -137,7 +137,7 @@ WorkspaceDialog::WorkspaceDialog(DockManager *manager, QWidget *parent)
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { Row {

View File

@@ -53,7 +53,7 @@ public:
, license(createTextEdit()) , license(createTextEdit())
, dependencies(new QListWidget(q)) , dependencies(new QListWidget(q))
{ {
using namespace Utils::Layouting; using namespace Layouting;
// clang-format off // clang-format off
Form { Form {

View File

@@ -42,7 +42,7 @@ PluginErrorOverview::PluginErrorOverview(QWidget *parent)
QObject::connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); QObject::connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
QObject::connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); QObject::connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting; using namespace Layouting;
auto createLabel = [this](const QString &text) { auto createLabel = [this](const QString &text) {
QLabel *label = new QLabel(text, this); QLabel *label = new QLabel(text, this);

View File

@@ -41,7 +41,7 @@ public:
errorString->setTabChangesFocus(true); errorString->setTabChangesFocus(true);
errorString->setReadOnly(true); errorString->setReadOnly(true);
using namespace Utils::Layouting; using namespace Layouting;
Form { Form {
Tr::tr("State:"), state, br, Tr::tr("State:"), state, br,

View File

@@ -80,7 +80,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) :
vAlignButtons->addButton(m_centerVAlignmentButton); vAlignButtons->addButton(m_centerVAlignmentButton);
vAlignButtons->addButton(m_bottomAlignmentButton); vAlignButtons->addButton(m_bottomAlignmentButton);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { m_fontComboBox, m_colorButton, m_fontSizeSpinBox, }, Row { m_fontComboBox, m_colorButton, m_fontSizeSpinBox, },
Row { Row {

View File

@@ -97,7 +97,7 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage
vRadioButtons->addButton(m_borderImage.verticalStretchRadioButton); vRadioButtons->addButton(m_borderImage.verticalStretchRadioButton);
vRadioButtons->addButton(m_borderImage.verticalTileRadioButtonNoCrop); vRadioButtons->addButton(m_borderImage.verticalTileRadioButtonNoCrop);
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
Column { m_previewLabel, m_sizeLabel, }, Column { m_previewLabel, m_sizeLabel, },
Column { Column {
@@ -146,7 +146,7 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage
m_image.cropAspectFitRadioButton = radioButton("aspect-crop-icon", m_image.cropAspectFitRadioButton = radioButton("aspect-crop-icon",
Tr::tr("The image is scaled uniformly to fill, cropping if necessary.")); Tr::tr("The image is scaled uniformly to fill, cropping if necessary."));
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
Column { m_previewLabel, m_sizeLabel, }, Column { m_previewLabel, m_sizeLabel, },
Column { Column {

View File

@@ -56,7 +56,7 @@ ContextPaneWidgetRectangle::ContextPaneWidgetRectangle(QWidget *parent)
borderButtons->addButton(m_borderSolid); borderButtons->addButton(m_borderSolid);
borderButtons->addButton(m_borderNone); borderButtons->addButton(m_borderNone);
using namespace Utils::Layouting; using namespace Layouting;
Grid { Grid {
m_gradientLabel, m_gradientLine, br, m_gradientLabel, m_gradientLine, br,
Tr::tr("Color"), Row { m_colorColorButton, m_colorSolid, m_colorGradient, m_colorNone, st, }, br, Tr::tr("Color"), Row { m_colorColorButton, m_colorSolid, m_colorGradient, m_colorNone, st, }, br,

View File

@@ -145,7 +145,7 @@ EasingContextPane::EasingContextPane(QWidget *parent)
spinBox->setMaximum(999999.9); spinBox->setMaximum(999999.9);
} }
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { m_graphicsView, m_playButton, }, Row { m_graphicsView, m_playButton, },
Row { Row {

View File

@@ -30,7 +30,7 @@
#include <QSpinBox> #include <QSpinBox>
#include <QTextEdit> #include <QTextEdit>
using namespace Utils::Layouting; using namespace Layouting;
namespace Utils { namespace Utils {
namespace Internal { namespace Internal {

View File

@@ -21,16 +21,16 @@ class QGroupBox;
class QSettings; class QSettings;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Utils {
class AspectContainer;
class BoolAspect;
namespace Layouting { namespace Layouting {
class LayoutBuilder; class LayoutBuilder;
class LayoutItem; class LayoutItem;
} // Layouting } // Layouting
namespace Utils {
class AspectContainer;
class BoolAspect;
namespace Internal { namespace Internal {
class AspectContainerPrivate; class AspectContainerPrivate;
class BaseAspectPrivate; class BaseAspectPrivate;

View File

@@ -16,7 +16,7 @@
#include <QStyle> #include <QStyle>
#include <QTabWidget> #include <QTabWidget>
namespace Utils::Layouting { namespace Layouting {
/*! /*!
\enum Utils::LayoutBuilder::LayoutType \enum Utils::LayoutBuilder::LayoutType
@@ -464,7 +464,7 @@ TabWidget::TabWidget(QTabWidget *tabWidget, std::initializer_list<Tab> tabs)
// "Properties" // "Properties"
LayoutItem::Setter title(const QString &title, BoolAspect *checker) LayoutItem::Setter title(const QString &title, Utils::BoolAspect *checker)
{ {
return [title, checker](QObject *target) { return [title, checker](QObject *target) {
if (auto groupBox = qobject_cast<QGroupBox *>(target)) { if (auto groupBox = qobject_cast<QGroupBox *>(target)) {
@@ -528,4 +528,4 @@ Stretch st;
Space empty(0); Space empty(0);
HorizontalRule hr; HorizontalRule hr;
} // Utils::Layouting } // Layouting

View File

@@ -3,14 +3,19 @@
#pragma once #pragma once
#include "utils_global.h"
#include <QList> #include <QList>
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
#include <QtGlobal>
#include <optional> #include <optional>
#if defined(UTILS_LIBRARY)
# define QTCREATOR_UTILS_EXPORT Q_DECL_EXPORT
#else
# define QTCREATOR_UTILS_EXPORT Q_DECL_IMPORT
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QLayout; class QLayout;
class QSplitter; class QSplitter;
@@ -20,7 +25,7 @@ QT_END_NAMESPACE
namespace Utils { class BoolAspect; } namespace Utils { class BoolAspect; }
namespace Utils::Layouting { namespace Layouting {
enum AttachType { enum AttachType {
WithMargins, WithMargins,
@@ -180,7 +185,7 @@ QTCREATOR_UTILS_EXPORT extern HorizontalRule hr;
// "Properties" // "Properties"
QTCREATOR_UTILS_EXPORT LayoutItem::Setter title(const QString &title, QTCREATOR_UTILS_EXPORT LayoutItem::Setter title(const QString &title,
BoolAspect *checker = nullptr); Utils::BoolAspect *checker = nullptr);
QTCREATOR_UTILS_EXPORT LayoutItem::Setter text(const QString &text); QTCREATOR_UTILS_EXPORT LayoutItem::Setter text(const QString &text);
QTCREATOR_UTILS_EXPORT LayoutItem::Setter tooltip(const QString &toolTip); QTCREATOR_UTILS_EXPORT LayoutItem::Setter tooltip(const QString &toolTip);
@@ -289,4 +294,4 @@ public:
Stack(std::initializer_list<LayoutItem> items) : LayoutBuilder(StackLayout, items) {} Stack(std::initializer_list<LayoutItem> items) : LayoutBuilder(StackLayout, items) {}
}; };
} // Utils::Layouting } // Layouting

View File

@@ -125,7 +125,7 @@ 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 Layouting;
Form form { Form form {
Row {s.outputOnFail}, br, Row {s.outputOnFail}, br,

View File

@@ -49,7 +49,7 @@ public:
emailLineEdit = new QLineEdit; emailLineEdit = new QLineEdit;
fixedBugsLineEdit = new QLineEdit; fixedBugsLineEdit = new QLineEdit;
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
title(Tr::tr("General Information")), title(Tr::tr("General Information")),

View File

@@ -286,7 +286,7 @@ public:
dryRunBtn->setToolTip(Tr::tr("Test the outcome of removing the last committed revision, without actually removing anything.")); dryRunBtn->setToolTip(Tr::tr("Test the outcome of removing the last committed revision, without actually removing anything."));
buttonBox->addButton(dryRunBtn, QDialogButtonBox::ApplyRole); buttonBox->addButton(dryRunBtn, QDialogButtonBox::ApplyRole);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {
keepTagsCheckBox, br, keepTagsCheckBox, br,

View File

@@ -72,7 +72,7 @@ PullOrPushDialog::PullOrPushDialog(Mode mode, QWidget *parent)
m_localCheckBox->setVisible(false); m_localCheckBox->setVisible(false);
} }
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
title(Tr::tr("Branch Location")), title(Tr::tr("Branch Location")),

View File

@@ -84,7 +84,7 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett
Tr::tr(Constants::ARTISTICSTYLE_DISPLAY_NAME))); Tr::tr(Constants::ARTISTICSTYLE_DISPLAY_NAME)));
m_command->setFilePath(m_settings->command()); m_command->setFilePath(m_settings->command());
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_useOtherFiles, m_useOtherFiles,

View File

@@ -86,7 +86,7 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
else else
useCustomizedStyle->setChecked(true); useCustomizedStyle->setChecked(true);
using namespace Utils::Layouting; using namespace Layouting;
Form { Form {
m_usePredefinedStyle, m_predefinedStyle, br, m_usePredefinedStyle, m_predefinedStyle, br,

View File

@@ -40,7 +40,7 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent)
m_buttonBox->setOrientation(Qt::Horizontal); m_buttonBox->setOrientation(Qt::Horizontal);
m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {

View File

@@ -26,7 +26,7 @@ ConfigurationPanel::ConfigurationPanel(QWidget *parent)
m_remove = new QPushButton(Tr::tr("Remove")); m_remove = new QPushButton(Tr::tr("Remove"));
auto add = new QPushButton(Tr::tr("Add")); auto add = new QPushButton(Tr::tr("Add"));
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
m_configurations, m_configurations,

View File

@@ -60,7 +60,7 @@ GeneralOptionsPageWidget::GeneralOptionsPageWidget(const QStringList &toolIds)
const int index = m_autoFormatTool->findText(settings->autoFormatTool()); const int index = m_autoFormatTool->findText(settings->autoFormatTool());
m_autoFormatTool->setCurrentIndex(qMax(index, 0)); m_autoFormatTool->setCurrentIndex(qMax(index, 0));
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {

View File

@@ -86,7 +86,7 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set
auto options = new QGroupBox(Tr::tr("Options")); auto options = new QGroupBox(Tr::tr("Options"));
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_useOtherFiles, m_useOtherFiles,

View File

@@ -68,7 +68,7 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
m_removeSelectedButton = new QPushButton(Tr::tr("Remove Selected"), this); m_removeSelectedButton = new QPushButton(Tr::tr("Remove Selected"), this);
m_removeAllButton = new QPushButton(Tr::tr("Remove All")); m_removeAllButton = new QPushButton(Tr::tr("Remove All"));
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { m_restoreGlobal, st, gotoClangTidyModeLabel, gotoClazyModeLabel }, Row { m_restoreGlobal, st, gotoClangTidyModeLabel, gotoClazyModeLabel },

View File

@@ -86,7 +86,7 @@ FilterDialog::FilterDialog(const Checks &checks, QWidget *parent)
m_view->setSelectionBehavior(QAbstractItemView::SelectRows); m_view->setSelectionBehavior(QAbstractItemView::SelectRows);
m_view->setIndentation(0); m_view->setIndentation(0);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Tr::tr("Select the diagnostics to display."), Tr::tr("Select the diagnostics to display."),

View File

@@ -48,7 +48,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, bool showCom
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
lblFileName, lblFileName,
@@ -67,7 +67,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, bool showCom
m_actSelector = new ActivitySelector(this); m_actSelector = new ActivitySelector(this);
m_verticalLayout->insertWidget(0, m_actSelector); m_verticalLayout->insertWidget(0, m_actSelector);
m_verticalLayout->insertWidget(1, Utils::Layouting::createHr()); m_verticalLayout->insertWidget(1, Layouting::createHr());
} }
if (!showComment) if (!showComment)

View File

@@ -69,7 +69,7 @@ void ClearCaseSubmitEditorWidget::addActivitySelector(bool isUcm)
m_actSelector = new ActivitySelector; m_actSelector = new ActivitySelector;
m_verticalLayout->insertWidget(0, m_actSelector); m_verticalLayout->insertWidget(0, m_actSelector);
m_verticalLayout->insertWidget(1, Utils::Layouting::createHr()); m_verticalLayout->insertWidget(1, Layouting::createHr());
} }
QString ClearCaseSubmitEditorWidget::commitName() const QString ClearCaseSubmitEditorWidget::commitName() const

View File

@@ -51,7 +51,7 @@ VersionSelector::VersionSelector(const QString &fileName, const QString &message
"the changes (not supported by the plugin)") "the changes (not supported by the plugin)")
+ "</b></p></body></html>"); + "</b></p></body></html>");
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
headerLabel, headerLabel,

View File

@@ -59,7 +59,7 @@ CMakeFormatterOptionsPageWidget::CMakeFormatterOptionsPageWidget()
m_command->setPromptDialogTitle(Tr::tr("%1 Command").arg(Tr::tr("Formatter"))); m_command->setPromptDialogTitle(Tr::tr("%1 Command").arg(Tr::tr("Formatter")));
m_command->setFilePath(settings->command()); m_command->setFilePath(settings->command());
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {

View File

@@ -49,7 +49,7 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
using namespace Utils::Layouting; using namespace Layouting;
namespace CMakeProjectManager { namespace CMakeProjectManager {

View File

@@ -22,7 +22,7 @@ namespace Copilot {
AuthWidget::AuthWidget(QWidget *parent) AuthWidget::AuthWidget(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
using namespace Utils::Layouting; using namespace Layouting;
m_button = new QPushButton(Tr::tr("Sign in")); m_button = new QPushButton(Tr::tr("Sign in"));
m_button->setEnabled(false); m_button->setEnabled(false);

View File

@@ -22,7 +22,7 @@ AddToVcsDialog::AddToVcsDialog(QWidget *parent,
const QString &vcsDisplayName) const QString &vcsDisplayName)
: QDialog(parent) : QDialog(parent)
{ {
using namespace Utils::Layouting; using namespace Layouting;
resize(363, 375); resize(363, 375);
setMinimumSize({200, 200}); setMinimumSize({200, 200});

View File

@@ -25,7 +25,7 @@ OpenWithDialog::OpenWithDialog(const Utils::FilePath &filePath, QWidget *parent)
buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
using namespace Utils::Layouting; using namespace Layouting;
// clang-format off // clang-format off
Column { Column {
Tr::tr("Open file \"%1\" with:").arg(filePath.fileName()), Tr::tr("Open file \"%1\" with:").arg(filePath.fileName()),

View File

@@ -59,7 +59,7 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &item
m_saveBeforeBuildCheckBox->setVisible(false); m_saveBeforeBuildCheckBox->setVisible(false);
using namespace Utils::Layouting; using namespace Layouting;
// clang-format off // clang-format off
Column { Column {
m_msgLabel, m_msgLabel,

View File

@@ -78,7 +78,7 @@ MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) :
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {

View File

@@ -54,7 +54,7 @@ PasteSelectDialog::PasteSelectDialog(const QList<Protocol*> &protocols, QWidget
listFont.setStyleHint(QFont::TypeWriter); listFont.setStyleHint(QFont::TypeWriter);
m_listWidget->setFont(listFont); m_listWidget->setFont(listFont);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {
Tr::tr("Protocol:"), m_protocolBox, br, Tr::tr("Protocol:"), m_protocolBox, br,

View File

@@ -100,7 +100,7 @@ PasteView::PasteView(const QList<Protocol *> &protocols,
m_uiPatchList->setSortingEnabled(false); m_uiPatchList->setSortingEnabled(false);
m_uiPatchList->setSortingEnabled(__sortingEnabled); m_uiPatchList->setSortingEnabled(__sortingEnabled);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_uiPatchList, m_uiPatchList,

View File

@@ -1484,7 +1484,7 @@ CppCodeModelInspectorDialog::CppCodeModelInspectorDialog(QWidget *parent)
Column { Column {
Form { QString("Sn&apshot:"), m_snapshotSelector }, Form { QString("Sn&apshot:"), m_snapshotSelector },
m_snapshotView, m_snapshotView,
}.emerge(Utils::Layouting::WithoutMargins), }.emerge(Layouting::WithoutMargins),
m_docTab, m_docTab,
}, },
} }

View File

@@ -103,7 +103,7 @@ CppCodeModelSettingsWidget::CppCodeModelSettingsWidget(CppCodeModelSettings *s)
m_ignorePchCheckBox->setChecked(m_settings->pchUsage() == CppCodeModelSettings::PchUse_None); m_ignorePchCheckBox->setChecked(m_settings->pchUsage() == CppCodeModelSettings::PchUse_None);
m_useBuiltinPreprocessorCheckBox->setChecked(m_settings->useBuiltinPreprocessor()); m_useBuiltinPreprocessorCheckBox->setChecked(m_settings->useBuiltinPreprocessor());
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
@@ -401,7 +401,7 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD
else else
Core::EditorManager::openEditor(Utils::FilePath::fromString(link)); Core::EditorManager::openEditor(Utils::FilePath::fromString(link));
}); });
layout->addWidget(Utils::Layouting::createHr()); layout->addWidget(Layouting::createHr());
layout->addWidget(configFilesHelpLabel); layout->addWidget(configFilesHelpLabel);
layout->addStretch(1); layout->addStretch(1);

View File

@@ -175,7 +175,7 @@ public:
QObject::connect(m_tabSettingsWidget, &TabSettingsWidget::settingsChanged, QObject::connect(m_tabSettingsWidget, &TabSettingsWidget::settingsChanged,
q, &CppCodeStylePreferencesWidget::slotTabSettingsChanged); q, &CppCodeStylePreferencesWidget::slotTabSettingsChanged);
using namespace Utils::Layouting; using namespace Layouting;
const Group contentGroup { const Group contentGroup {
title(Tr::tr("Indent")), title(Tr::tr("Indent")),

View File

@@ -30,7 +30,7 @@ public:
void fromMap(const QVariantMap &map) override; void fromMap(const QVariantMap &map) override;
void toMap(QVariantMap &map) const override; void toMap(QVariantMap &map) const override;
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
QVariant volatileValue() const override; QVariant volatileValue() const override;
void setVolatileValue(const QVariant &val) override; void setVolatileValue(const QVariant &val) override;

View File

@@ -60,7 +60,7 @@ public:
} }
private: private:
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override void addToLayout(Layouting::LayoutBuilder &builder) override
{ {
addMutableAction(m_comboBox); addMutableAction(m_comboBox);
builder.addItem(m_comboBox); builder.addItem(m_comboBox);

View File

@@ -66,7 +66,7 @@ NewClassWidget::NewClassWidget(QWidget *parent) :
setNamesDelimiter(QLatin1String("::")); setNamesDelimiter(QLatin1String("::"));
using namespace Utils::Layouting; using namespace Layouting;
Form { Form {
Tr::tr("&Class name:"), d->m_classLineEdit, br, Tr::tr("&Class name:"), d->m_classLineEdit, br,
Tr::tr("&Header file:"), d->m_headerFileLineEdit, br, Tr::tr("&Header file:"), d->m_headerFileLineEdit, br,

View File

@@ -67,7 +67,7 @@ ConfigureDialog::ConfigureDialog(QWidget *parent) : QDialog(parent),
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
title(Tr::tr("Repository User")), title(Tr::tr("Repository User")),

View File

@@ -1094,7 +1094,7 @@ RevertDialog::RevertDialog(const QString &title, QWidget *parent)
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting; using namespace Layouting;
Form { Form {
Tr::tr("Revision"), m_revisionLineEdit, br, Tr::tr("Revision"), m_revisionLineEdit, br,
}.attachTo(groupBox); }.attachTo(groupBox);

View File

@@ -52,7 +52,7 @@ PullOrPushDialog::PullOrPushDialog(Mode mode, QWidget *parent)
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
title(Tr::tr("Remote Location")), title(Tr::tr("Remote Location")),

View File

@@ -125,7 +125,7 @@ BranchAddDialog::BranchAddDialog(const QStringList &localBranches, Type type, QW
break; break;
} }
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { branchNameLabel, m_branchNameEdit }, Row { branchNameLabel, m_branchNameEdit },

View File

@@ -45,7 +45,7 @@ BranchCheckoutDialog::BranchCheckoutDialog(QWidget *parent,
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_makeStashRadioButton, m_makeStashRadioButton,

View File

@@ -136,7 +136,7 @@ GerritPushDialog::GerritPushDialog(const Utils::FilePath &workingDir, const QStr
connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting; using namespace Layouting;
Grid { Grid {
::Git::Tr::tr("Push:"), workingDir.toUserOutput(), m_localBranchComboBox, br, ::Git::Tr::tr("Push:"), workingDir.toUserOutput(), m_localBranchComboBox, br,

View File

@@ -181,7 +181,7 @@ GitLabOptionsWidget::GitLabOptionsWidget(GitLabOptionsPage *page, GitLabParamete
m_add = new QPushButton(Tr::tr("Add..."), this); m_add = new QPushButton(Tr::tr("Add..."), this);
m_add->setToolTip(Tr::tr("Add new GitLab server configuration.")); m_add->setToolTip(Tr::tr("Add new GitLab server configuration."));
using namespace Utils::Layouting; using namespace Layouting;
Grid { Grid {
Form { Form {

View File

@@ -23,7 +23,7 @@ public:
QString fullCommandFlag(bool keepJobNum) const; QString fullCommandFlag(bool keepJobNum) const;
private: private:
void addToLayout(Utils::Layouting::LayoutBuilder &builder) final; void addToLayout(Layouting::LayoutBuilder &builder) final;
void fromMap(const QVariantMap &map) final; void fromMap(const QVariantMap &map) final;
void toMap(QVariantMap &map) const final; void toMap(QVariantMap &map) const final;

View File

@@ -32,7 +32,7 @@ CreateSimulatorDialog::CreateSimulatorDialog(QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {

View File

@@ -27,7 +27,7 @@ public:
void fromMap(const QVariantMap &map) override; void fromMap(const QVariantMap &map) override;
void toMap(QVariantMap &map) const override; void toMap(QVariantMap &map) const override;
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
IosDeviceType deviceType() const; IosDeviceType deviceType() const;
void setDeviceType(const IosDeviceType &deviceType); void setDeviceType(const IosDeviceType &deviceType);

View File

@@ -94,7 +94,7 @@ IosSettingsWidget::IosSettingsWidget()
m_pathWidget->addButton(Tr::tr("Screenshot"), this, m_pathWidget->addButton(Tr::tr("Screenshot"), this,
std::bind(&IosSettingsWidget::onScreenshot, this)); std::bind(&IosSettingsWidget::onScreenshot, this));
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
title(Tr::tr("Devices")), title(Tr::tr("Devices")),

View File

@@ -40,7 +40,7 @@ SimulatorOperationDialog::SimulatorOperationDialog(QWidget *parent) :
m_formatter = new Utils::OutputFormatter; m_formatter = new Utils::OutputFormatter;
m_formatter->setPlainTextEdit(messageEdit); m_formatter->setPlainTextEdit(messageEdit);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
messageEdit, messageEdit,

View File

@@ -49,7 +49,7 @@ MacroOptionsWidget::MacroOptionsWidget()
m_macroGroup = new QGroupBox(Tr::tr("Macro"), this); m_macroGroup = new QGroupBox(Tr::tr("Macro"), this);
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
Tr::tr("Description:"), m_description Tr::tr("Description:"), m_description

View File

@@ -22,7 +22,7 @@ public:
void makeReadOnly() override {} void makeReadOnly() override {}
void refresh() override {} void refresh() override {}
void addToLayout(Utils::Layouting::LayoutBuilder &) override {} void addToLayout(Layouting::LayoutBuilder &) override {}
}; };
} // anonymous namespace } // anonymous namespace

View File

@@ -24,7 +24,7 @@ AuthenticationDialog::AuthenticationDialog(const QString &username, const QStrin
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {

View File

@@ -101,7 +101,7 @@ public:
m_authorLineEdit = new QLineEdit; m_authorLineEdit = new QLineEdit;
m_emailLineEdit = new QLineEdit; m_emailLineEdit = new QLineEdit;
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
@@ -120,7 +120,7 @@ public:
}, },
} }
} }
}.attachTo(this, Utils::Layouting::WithoutMargins); }.attachTo(this, Layouting::WithoutMargins);
} }
QLabel *m_repositoryLabel; QLabel *m_repositoryLabel;

View File

@@ -45,7 +45,7 @@ GeneralSettingsPage::GeneralSettingsPage()
setLayouter([](QWidget *widget) { setLayouter([](QWidget *widget) {
Settings &s = *Settings::instance(); Settings &s = *Settings::instance();
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
s.autorunMeson, s.autorunMeson,

View File

@@ -36,7 +36,7 @@ private:
void makeReadOnly() override { m_toolsComboBox->setEnabled(false); } void makeReadOnly() override { m_toolsComboBox->setEnabled(false); }
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override void addToLayout(Layouting::LayoutBuilder &builder) override
{ {
addMutableAction(m_toolsComboBox); addMutableAction(m_toolsComboBox);
builder.addItem(m_toolsComboBox); builder.addItem(m_toolsComboBox);

View File

@@ -37,7 +37,7 @@ NimCodeStylePreferencesWidget::NimCodeStylePreferencesWidget(ICodeStylePreferenc
m_previewTextEdit = new SnippetEditorWidget; m_previewTextEdit = new SnippetEditorWidget;
m_previewTextEdit->setPlainText(Nim::Constants::C_NIMCODESTYLEPREVIEWSNIPPET); m_previewTextEdit->setPlainText(Nim::Constants::C_NIMCODESTYLEPREVIEWSNIPPET);
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
Column { Column {
tabPreferencesWidget, tabPreferencesWidget,

View File

@@ -27,7 +27,7 @@ ChangeNumberDialog::ChangeNumberDialog(QWidget *parent)
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { Tr::tr("Change number:"), m_lineEdit }, Row { Tr::tr("Change number:"), m_lineEdit },

View File

@@ -48,7 +48,7 @@ PendingChangesDialog::PendingChangesDialog(const QString &data, QWidget *parent)
submitButton->setEnabled(false); submitButton->setEnabled(false);
} }
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_listWidget, m_listWidget,

View File

@@ -41,7 +41,7 @@ PerfTracePointDialog::PerfTracePointDialog()
m_privilegesChooser->addItems({ELEVATE_METHOD_NA, ELEVATE_METHOD_PKEXEC, ELEVATE_METHOD_SUDO}); m_privilegesChooser->addItems({ELEVATE_METHOD_NA, ELEVATE_METHOD_PKEXEC, ELEVATE_METHOD_SUDO});
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_label, m_label,
m_textEdit, m_textEdit,

View File

@@ -23,7 +23,7 @@ public:
bool isShadowBuild() const; bool isShadowBuild() const;
void setProblem(const QString &description); void setProblem(const QString &description);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
static Utils::FilePath fixupDir(const Utils::FilePath &dir); static Utils::FilePath fixupDir(const Utils::FilePath &dir);

View File

@@ -48,7 +48,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project)
connect(languageComboBox, &QComboBox::currentIndexChanged, connect(languageComboBox, &QComboBox::currentIndexChanged,
stackedWidget, &QStackedWidget::setCurrentIndex); stackedWidget, &QStackedWidget::setCurrentIndex);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { new QLabel(Tr::tr("Language:")), languageComboBox, st }, Row { new QLabel(Tr::tr("Language:")), languageComboBox, st },

View File

@@ -101,7 +101,7 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
using namespace Utils::Layouting; using namespace Layouting;
auto tabWarning = new QWidget; auto tabWarning = new QWidget;
Column { Column {

View File

@@ -24,7 +24,7 @@ DeviceFactorySelectionDialog::DeviceFactorySelectionDialog(QWidget *parent) :
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
m_buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Start Wizard")); m_buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Start Wizard"));
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Tr::tr("Available device types:"), Tr::tr("Available device types:"),
m_listWidget, m_listWidget,

View File

@@ -143,7 +143,7 @@ void DeviceSettingsWidget::initGui()
scrollArea->setWidgetResizable(true); scrollArea->setWidgetResizable(true);
scrollArea->setWidget(scrollAreaWidget); scrollArea->setWidget(scrollAreaWidget);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_generalGroupBox, m_generalGroupBox,
m_osSpecificGroupBox, m_osSpecificGroupBox,

View File

@@ -43,7 +43,7 @@ DeviceTestDialog::DeviceTestDialog(const IDevice::Ptr &deviceConfiguration,
d->textEdit->setReadOnly(true); d->textEdit->setReadOnly(true);
d->buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel); d->buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
d->textEdit, d->textEdit,
d->buttonBox, d->buttonBox,

View File

@@ -48,7 +48,7 @@ EditorSettingsWidget::EditorSettingsWidget(Project *project) : m_project(project
m_behaviorSettings = new TextEditor::BehaviorSettingsWidget(this); m_behaviorSettings = new TextEditor::BehaviorSettingsWidget(this);
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
m_showWrapColumn, m_showWrapColumn,

View File

@@ -34,7 +34,7 @@
#include <QVBoxLayout> #include <QVBoxLayout>
using namespace Utils; using namespace Utils;
using namespace Utils::Layouting; using namespace Layouting;
namespace ProjectExplorer { namespace ProjectExplorer {

View File

@@ -117,7 +117,7 @@ ProjectExplorerSettingsWidget::ProjectExplorerSettingsWidget(QWidget *parent) :
"Disable it if you experience problems with your builds."); "Disable it if you experience problems with your builds.");
jomLabel->setWordWrap(true); jomLabel->setWordWrap(true);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
title(Tr::tr("Projects Directory")), title(Tr::tr("Projects Directory")),

View File

@@ -288,7 +288,7 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent)
scrollArea->setWidgetResizable(true); scrollArea->setWidgetResizable(true);
scrollArea->setWidget(m_filesLabel); scrollArea->setWidget(m_filesLabel);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {
m_projectLabel, m_projectComboBox, br, m_projectLabel, m_projectComboBox, br,

View File

@@ -33,7 +33,7 @@
#include <QPushButton> #include <QPushButton>
using namespace Utils; using namespace Utils;
using namespace Utils::Layouting; using namespace Layouting;
namespace ProjectExplorer { namespace ProjectExplorer {

View File

@@ -29,7 +29,7 @@ class PROJECTEXPLORER_EXPORT TerminalAspect : public Utils::BaseAspect
public: public:
TerminalAspect(); TerminalAspect();
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
bool useTerminal() const; bool useTerminal() const;
void setUseTerminalHint(bool useTerminal); void setUseTerminalHint(bool useTerminal);
@@ -62,7 +62,7 @@ public:
explicit WorkingDirectoryAspect(const Utils::MacroExpander *expander, explicit WorkingDirectoryAspect(const Utils::MacroExpander *expander,
EnvironmentAspect *envAspect); EnvironmentAspect *envAspect);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
Utils::FilePath workingDirectory() const; Utils::FilePath workingDirectory() const;
Utils::FilePath defaultWorkingDirectory() const; Utils::FilePath defaultWorkingDirectory() const;
@@ -91,7 +91,7 @@ class PROJECTEXPLORER_EXPORT ArgumentsAspect : public Utils::BaseAspect
public: public:
explicit ArgumentsAspect(const Utils::MacroExpander *macroExpander); explicit ArgumentsAspect(const Utils::MacroExpander *macroExpander);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
QString arguments() const; QString arguments() const;
QString unexpandedArguments() const; QString unexpandedArguments() const;
@@ -163,7 +163,7 @@ public:
void setSettingsKey(const QString &key); void setSettingsKey(const QString &key);
void makeOverridable(const QString &overridingKey, const QString &useOverridableKey); void makeOverridable(const QString &overridingKey, const QString &useOverridableKey);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
void setLabelText(const QString &labelText); void setLabelText(const QString &labelText);
void setPlaceHolderText(const QString &placeHolderText); void setPlaceHolderText(const QString &placeHolderText);
void setHistoryCompleter(const QString &historyCompleterKey); void setHistoryCompleter(const QString &historyCompleterKey);
@@ -235,7 +235,7 @@ public:
void fromMap(const QVariantMap &) override; void fromMap(const QVariantMap &) override;
void toMap(QVariantMap &) const override; void toMap(QVariantMap &) const override;
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
struct Data : Utils::BaseAspect::Data { Interpreter interpreter; }; struct Data : Utils::BaseAspect::Data { Interpreter interpreter; };

View File

@@ -77,7 +77,7 @@ SessionNameInputDialog::SessionNameInputDialog(QWidget *parent)
m_usedSwitchTo = true; m_usedSwitchTo = true;
}); });
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Tr::tr("Enter the name of the session:"), Tr::tr("Enter the name of the session:"),
m_newSessionLineEdit, m_newSessionLineEdit,
@@ -150,7 +150,7 @@ SessionDialog::SessionDialog(QWidget *parent) : QDialog(parent)
"What is a Session?</a>")); "What is a Session?</a>"));
whatsASessionLabel->setOpenExternalLinks(true); whatsASessionLabel->setOpenExternalLinks(true);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { Row {

View File

@@ -85,7 +85,7 @@ bool PythonWizardPageFactory::validateData(Id typeId, const QVariant &data, QStr
PythonWizardPage::PythonWizardPage(const QList<QPair<QString, QVariant>> &pySideAndData, PythonWizardPage::PythonWizardPage(const QList<QPair<QString, QVariant>> &pySideAndData,
const int defaultPyside) const int defaultPyside)
{ {
using namespace Utils::Layouting; using namespace Layouting;
m_interpreter.setSettingsDialogId(Constants::C_PYTHONOPTIONS_PAGE_ID); m_interpreter.setSettingsDialogId(Constants::C_PYTHONOPTIONS_PAGE_ID);
connect(PythonSettings::instance(), connect(PythonSettings::instance(),
&PythonSettings::interpretersChanged, &PythonSettings::interpretersChanged,

View File

@@ -43,7 +43,7 @@ CustomQbsPropertiesDialog::CustomQbsPropertiesDialog(const QVariantMap &properti
m_removeButton = new QPushButton(Tr::tr("&Remove")); m_removeButton = new QPushButton(Tr::tr("&Remove"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { Row {
m_propertiesTable, m_propertiesTable,

View File

@@ -35,7 +35,7 @@ private:
void makeReadOnly() override { m_changeButton->setEnabled(false); } void makeReadOnly() override { m_changeButton->setEnabled(false); }
void refresh() override { m_contentLabel->setText(QbsKitAspect::representation(kit())); } void refresh() override { m_contentLabel->setText(QbsKitAspect::representation(kit())); }
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override void addToLayout(Layouting::LayoutBuilder &builder) override
{ {
addMutableAction(m_contentLabel); addMutableAction(m_contentLabel);
builder.addItem(m_contentLabel); builder.addItem(m_contentLabel);

View File

@@ -120,7 +120,7 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget()
m_profileValueLabel = new QLabel; m_profileValueLabel = new QLabel;
m_propertiesView = new QTreeView; m_propertiesView = new QTreeView;
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {
Tr::tr("Kit:"), m_kitsComboBox, br, Tr::tr("Kit:"), m_kitsComboBox, br,

View File

@@ -21,7 +21,7 @@ ClassDefinition::ClassDefinition(QWidget *parent) :
QTabWidget(parent), QTabWidget(parent),
m_domXmlChanged(false) m_domXmlChanged(false)
{ {
using namespace Utils::Layouting; using namespace Layouting;
// "Sources" tab // "Sources" tab
auto sourceTab = new QWidget; auto sourceTab = new QWidget;

View File

@@ -34,7 +34,7 @@ CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) :
m_pluginNameEdit = new QLineEdit; m_pluginNameEdit = new QLineEdit;
m_resourceFileEdit = new QLineEdit(Tr::tr("icons.qrc")); m_resourceFileEdit = new QLineEdit(Tr::tr("icons.qrc"));
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Tr::tr("Specify the properties of the plugin library and the collection class."), Tr::tr("Specify the properties of the plugin library and the collection class."),
Space(10), Space(10),

View File

@@ -39,7 +39,7 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) :
dummy->setEnabled(false); dummy->setEnabled(false);
m_tabStackLayout->addWidget(dummy); m_tabStackLayout->addWidget(dummy);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Tr::tr("Specify the list of custom widgets and their properties."), Tr::tr("Specify the list of custom widgets and their properties."),
Space(10), Space(10),

View File

@@ -30,7 +30,7 @@ OpenUiQmlFileDialog::OpenUiQmlFileDialog(QWidget *parent) :
m_listWidget = new QListWidget; m_listWidget = new QListWidget;
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
tr("You are opening a .qml file in the designer. Do you want to open a .ui.qml file instead?"), tr("You are opening a .qml file in the designer. Do you want to open a .ui.qml file instead?"),

View File

@@ -196,7 +196,7 @@ SettingsPageWidget::SettingsPageWidget(ExternalDependencies &externalDependencie
m_debugPuppetComboBox = new QComboBox; m_debugPuppetComboBox = new QComboBox;
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_useDefaultPuppetRadioButton, m_useDefaultPuppetRadioButton,

View File

@@ -34,7 +34,7 @@ ComponentNameDialog::ComponentNameDialog(QWidget *parent) :
m_checkBox = new QCheckBox(Tr::tr("ui.qml file")); m_checkBox = new QCheckBox(Tr::tr("ui.qml file"));
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Form { Form {
Tr::tr("Component name:"), m_componentNameEdit, br, Tr::tr("Component name:"), m_componentNameEdit, br,

View File

@@ -246,7 +246,7 @@ public:
QObject::connect(useQmlls, &QCheckBox::stateChanged, this, [this](int checked) { QObject::connect(useQmlls, &QCheckBox::stateChanged, this, [this](int checked) {
useLatestQmlls->setEnabled(checked != Qt::Unchecked); useLatestQmlls->setEnabled(checked != Qt::Unchecked);
}); });
using namespace Utils::Layouting; using namespace Layouting;
// clang-format off // clang-format off
const auto formattingGroup = const auto formattingGroup =
Group { Group {

View File

@@ -46,7 +46,7 @@ QmlJSCodeStylePreferencesWidget::QmlJSCodeStylePreferencesWidget(
decorateEditor(TextEditorSettings::fontSettings()); decorateEditor(TextEditorSettings::fontSettings());
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
Column { Column {
m_tabPreferencesWidget, m_tabPreferencesWidget,

View File

@@ -19,7 +19,7 @@ QmlJSCodeStyleSettingsWidget::QmlJSCodeStyleSettingsWidget(QWidget *parent)
m_lineLengthSpinBox->setMinimum(0); m_lineLengthSpinBox->setMinimum(0);
m_lineLengthSpinBox->setMaximum(999); m_lineLengthSpinBox->setMaximum(999);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Group { Group {
title(Tr::tr("Qml JS Code Style")), title(Tr::tr("Qml JS Code Style")),

View File

@@ -42,7 +42,7 @@ public:
Utils::FilePath currentFile; Utils::FilePath currentFile;
}; };
void addToLayout(Utils::Layouting::LayoutBuilder &builder) final; void addToLayout(Layouting::LayoutBuilder &builder) final;
void toMap(QVariantMap &map) const final; void toMap(QVariantMap &map) const final;
void fromMap(const QVariantMap &map) final; void fromMap(const QVariantMap &map) final;

View File

@@ -44,7 +44,7 @@ CodeGenSettingsPageWidget::CodeGenSettingsPageWidget()
CodeGenSettings parameters; CodeGenSettings parameters;
parameters.fromSettings(Core::ICore::settings()); parameters.fromSettings(Core::ICore::settings());
using namespace Utils::Layouting; using namespace Layouting;
m_ptrAggregationRadioButton = new QRadioButton(Tr::tr("Aggregation as a pointer member")); m_ptrAggregationRadioButton = new QRadioButton(Tr::tr("Aggregation as a pointer member"));
m_ptrAggregationRadioButton->setChecked m_ptrAggregationRadioButton->setChecked

View File

@@ -18,7 +18,7 @@ class QTSUPPORT_EXPORT QmlDebuggingAspect : public Utils::TriStateAspect
public: public:
explicit QmlDebuggingAspect(ProjectExplorer::BuildConfiguration *buildConfig); explicit QmlDebuggingAspect(ProjectExplorer::BuildConfiguration *buildConfig);
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
private: private:
const ProjectExplorer::BuildConfiguration *m_buildConfig = nullptr; const ProjectExplorer::BuildConfiguration *m_buildConfig = nullptr;
@@ -32,7 +32,7 @@ public:
QtQuickCompilerAspect(ProjectExplorer::BuildConfiguration *buildConfig); QtQuickCompilerAspect(ProjectExplorer::BuildConfiguration *buildConfig);
private: private:
void addToLayout(Utils::Layouting::LayoutBuilder &builder) override; void addToLayout(Layouting::LayoutBuilder &builder) override;
const ProjectExplorer::BuildConfiguration *m_buildConfig = nullptr; const ProjectExplorer::BuildConfiguration *m_buildConfig = nullptr;
}; };

View File

@@ -261,7 +261,7 @@ QtOptionsPageWidget::QtOptionsPageWidget()
m_errorLabel = new QLabel; m_errorLabel = new QLabel;
using namespace Utils::Layouting; using namespace Layouting;
auto versionInfoWidget = new QWidget; auto versionInfoWidget = new QWidget;
// clang-format off // clang-format off

View File

@@ -43,7 +43,7 @@ QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent)
m_languageLabel = new QLabel(Tr::tr("Language:")); m_languageLabel = new QLabel(Tr::tr("Language:"));
m_languageText = new QLineEdit; m_languageText = new QLineEdit;
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { Row {
addPrefixButton, addPrefixButton,

View File

@@ -34,7 +34,7 @@ ColorPicker::ColorPicker(const QString &key, QWidget *parent)
m_lastUsedColorContainer = new QHBoxLayout(lastUsedColorContainer); m_lastUsedColorContainer = new QHBoxLayout(lastUsedColorContainer);
m_lastUsedColorContainer->setContentsMargins(0, 0, 0, 0); m_lastUsedColorContainer->setContentsMargins(0, 0, 0, 0);
using namespace Utils::Layouting; using namespace Layouting;
Grid colorGrid; Grid colorGrid;
for (int i = 0; i < colors.count(); ++i) { for (int i = 0; i < colors.count(); ++i) {
QWidget *button = createButton(colors[i]); QWidget *button = createButton(colors[i]);

View File

@@ -36,7 +36,7 @@ ColorSettings::ColorSettings(QWidget *parent)
s->value(Constants::C_SETTINGS_COLORSETTINGS_CURRENTCOLORTHEME).toString()); s->value(Constants::C_SETTINGS_COLORSETTINGS_CURRENTCOLORTHEME).toString());
selectTheme(m_comboColorThemes->currentIndex()); selectTheme(m_comboColorThemes->currentIndex());
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
Row { Row {
m_comboColorThemes, m_comboColorThemes,

View File

@@ -21,7 +21,7 @@ ColorThemeDialog::ColorThemeDialog(QWidget *parent)
QDialogButtonBox::Cancel | QDialogButtonBox::Cancel |
QDialogButtonBox::Apply); QDialogButtonBox::Apply);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_colorSettings, m_colorSettings,
buttonBox, buttonBox,

View File

@@ -29,7 +29,7 @@ NavigatorSlider::NavigatorSlider(QWidget *parent)
btn->setAutoRepeatInterval(10); btn->setAutoRepeatInterval(10);
} }
using namespace Utils::Layouting; using namespace Layouting;
Row { Row {
zoomOut, zoomOut,
m_slider, m_slider,

View File

@@ -45,7 +45,7 @@ Search::Search(QWidget *parent)
m_searchView->setModel(m_proxyModel); m_searchView->setModel(m_proxyModel);
m_searchView->setFrameShape(QFrame::NoFrame); m_searchView->setFrameShape(QFrame::NoFrame);
using namespace Utils::Layouting; using namespace Layouting;
Column { Column {
m_searchEdit, m_searchEdit,
m_searchView, m_searchView,

Some files were not shown because too many files have changed in this diff Show More