aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp')
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
index dad78b5aa0..2b838f9073 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
@@ -461,11 +461,14 @@ QWidget *SpacerField::createWidget(const QString &displayName, JsonFieldPage *pa
{
Q_UNUSED(displayName)
Q_UNUSED(page)
- int size = QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing) * m_factor;
+ int hspace = QApplication::style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing);
+ int vspace = QApplication::style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing);
+ int hsize = hspace * m_factor;
+ int vsize = vspace * m_factor;
auto w = new QWidget();
- w->setMinimumSize(size, size);
- w->setMaximumSize(size, size);
+ w->setMinimumSize(hsize, vsize);
+ w->setMaximumSize(hsize, vsize);
w->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
return w;
}
@@ -493,7 +496,7 @@ bool LineEditField::parseData(const QVariant &data, QString *errorMessage)
m_disabledText = JsonWizardFactory::localizedString(consumeValue(tmp, "trDisabledText").toString());
m_placeholderText = JsonWizardFactory::localizedString(consumeValue(tmp, "trPlaceholder").toString());
m_historyId = consumeValue(tmp, "historyId").toString();
- m_restoreLastHistoryItem = consumeValue(tmp, "restoreLastHistoyItem", false).toBool();
+ m_restoreLastHistoryItem = consumeValue(tmp, "restoreLastHistoryItem", false).toBool();
QString pattern = consumeValue(tmp, "validator").toString();
if (!pattern.isEmpty()) {
m_validatorRegExp = QRegularExpression(pattern);
@@ -737,7 +740,7 @@ QWidget *PathChooserField::createWidget(const QString &displayName, JsonFieldPag
if (!m_historyId.isEmpty())
w->setHistoryCompleter(m_historyId);
QObject::connect(w, &PathChooser::pathChanged, [this, w] {
- if (w->path() != m_path)
+ if (w->filePath().toString() != m_path)
setHasUserChanges();
});
return w;
@@ -789,7 +792,7 @@ void PathChooserField::fromSettings(const QVariant &value)
QVariant PathChooserField::toSettings() const
{
- return qobject_cast<PathChooser *>(widget())->path();
+ return qobject_cast<PathChooser *>(widget())->filePath().toString();
}
// --------------------------------------------------------------------
@@ -840,7 +843,7 @@ void CheckBoxField::setup(JsonFieldPage *page, const QString &name)
return page->expander()->expand(m_uncheckedValue);
});
- QObject::connect(w, &QCheckBox::stateChanged, page, [this, page]() {
+ QObject::connect(w, &QCheckBox::clicked, page, [this, page]() {
m_isModified = true;
setHasUserChanges();
emit page->completeChanged();