Replace more used of PathChooser::pathChanged by filePathChanged

Change-Id: I0f92be6fcfd0a5319ad9f5d3681266966e40705e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2022-06-29 17:21:30 +02:00
parent 5a75da8d1a
commit 7cc06b85d0
11 changed files with 19 additions and 19 deletions

View File

@@ -366,7 +366,7 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD
return; return;
} }
}; };
connect(&d->clangdChooser, &Utils::PathChooser::pathChanged, this, updateWarningLabel); connect(&d->clangdChooser, &Utils::PathChooser::filePathChanged, this, updateWarningLabel);
updateWarningLabel(); updateWarningLabel();
connect(&d->useClangdCheckBox, &QCheckBox::toggled, connect(&d->useClangdCheckBox, &QCheckBox::toggled,
@@ -383,7 +383,7 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD
this, &ClangdSettingsWidget::settingsDataChanged); this, &ClangdSettingsWidget::settingsDataChanged);
connect(&d->documentUpdateThreshold, qOverload<int>(&QSpinBox::valueChanged), connect(&d->documentUpdateThreshold, qOverload<int>(&QSpinBox::valueChanged),
this, &ClangdSettingsWidget::settingsDataChanged); this, &ClangdSettingsWidget::settingsDataChanged);
connect(&d->clangdChooser, &Utils::PathChooser::pathChanged, connect(&d->clangdChooser, &Utils::PathChooser::filePathChanged,
this, &ClangdSettingsWidget::settingsDataChanged); this, &ClangdSettingsWidget::settingsDataChanged);
connect(d->configSelectionWidget, &ClangDiagnosticConfigsSelectionWidget::changed, connect(d->configSelectionWidget, &ClangDiagnosticConfigsSelectionWidget::changed,
this, &ClangdSettingsWidget::settingsDataChanged); this, &ClangdSettingsWidget::settingsDataChanged);

View File

@@ -350,9 +350,9 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget()
formLayout->addRow(new QLabel(tr("Version:")), m_versionLabel); formLayout->addRow(new QLabel(tr("Version:")), m_versionLabel);
formLayout->addRow(new QLabel(tr("Working directory:")), m_workingDirectoryChooser); formLayout->addRow(new QLabel(tr("Working directory:")), m_workingDirectoryChooser);
connect(m_binaryChooser, &PathChooser::pathChanged, connect(m_binaryChooser, &PathChooser::filePathChanged,
this, &DebuggerItemConfigWidget::binaryPathHasChanged); this, &DebuggerItemConfigWidget::binaryPathHasChanged);
connect(m_workingDirectoryChooser, &PathChooser::pathChanged, connect(m_workingDirectoryChooser, &PathChooser::filePathChanged,
this, &DebuggerItemConfigWidget::store); this, &DebuggerItemConfigWidget::store);
connect(m_displayNameLineEdit, &QLineEdit::textChanged, connect(m_displayNameLineEdit, &QLineEdit::textChanged,
this, &DebuggerItemConfigWidget::store); this, &DebuggerItemConfigWidget::store);

View File

@@ -296,7 +296,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget() :
m_targetChooser->setHistoryCompleter("Debugger.MappingTarget.History"); m_targetChooser->setHistoryCompleter("Debugger.MappingTarget.History");
connect(m_sourceLineEdit, &QLineEdit::textChanged, connect(m_sourceLineEdit, &QLineEdit::textChanged,
this, &DebuggerSourcePathMappingWidget::slotEditSourceFieldChanged); this, &DebuggerSourcePathMappingWidget::slotEditSourceFieldChanged);
connect(m_targetChooser, &PathChooser::pathChanged, connect(m_targetChooser, &PathChooser::filePathChanged,
this, &DebuggerSourcePathMappingWidget::slotEditTargetFieldChanged); this, &DebuggerSourcePathMappingWidget::slotEditTargetFieldChanged);
auto editLayout = new QFormLayout; auto editLayout = new QFormLayout;
const QString sourceToolTip = tr("<p>The source path contained in the " const QString sourceToolTip = tr("<p>The source path contained in the "

View File

@@ -167,8 +167,8 @@ UnstartedAppWatcherDialog::UnstartedAppWatcherDialog(QWidget *parent)
this, &UnstartedAppWatcherDialog::selectExecutable); this, &UnstartedAppWatcherDialog::selectExecutable);
connect(m_watchingPushButton, &QAbstractButton::toggled, connect(m_watchingPushButton, &QAbstractButton::toggled,
this, &UnstartedAppWatcherDialog::startStopWatching); this, &UnstartedAppWatcherDialog::startStopWatching);
connect(m_pathChooser, &Utils::PathChooser::pathChanged, this, connect(m_pathChooser, &Utils::PathChooser::filePathChanged,
&UnstartedAppWatcherDialog::stopAndCheckExecutable); this, &UnstartedAppWatcherDialog::stopAndCheckExecutable);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
connect(&m_timer, &QTimer::timeout, connect(&m_timer, &QTimer::timeout,
this, &UnstartedAppWatcherDialog::findProcess); this, &UnstartedAppWatcherDialog::findProcess);

View File

@@ -68,9 +68,9 @@ ChangeSelectionDialog::ChangeSelectionDialog(const FilePath &workingDirectory, I
connect(m_ui->changeNumberEdit, &CompletingLineEdit::textChanged, connect(m_ui->changeNumberEdit, &CompletingLineEdit::textChanged,
this, &ChangeSelectionDialog::changeTextChanged); this, &ChangeSelectionDialog::changeTextChanged);
connect(m_ui->workingDirectoryChooser, &PathChooser::pathChanged, connect(m_ui->workingDirectoryChooser, &PathChooser::filePathChanged,
this, &ChangeSelectionDialog::recalculateDetails); this, &ChangeSelectionDialog::recalculateDetails);
connect(m_ui->workingDirectoryChooser, &PathChooser::pathChanged, connect(m_ui->workingDirectoryChooser, &PathChooser::filePathChanged,
this, &ChangeSelectionDialog::recalculateCompletion); this, &ChangeSelectionDialog::recalculateCompletion);
connect(m_ui->selectFromHistoryButton, &QPushButton::clicked, connect(m_ui->selectFromHistoryButton, &QPushButton::clicked,
this, &ChangeSelectionDialog::selectCommitFromRecentHistory); this, &ChangeSelectionDialog::selectCommitFromRecentHistory);

View File

@@ -106,7 +106,7 @@ GitLabCloneDialog::GitLabCloneDialog(const Project &project, QWidget *parent)
QTC_ASSERT(slashIndex > 0, return); QTC_ASSERT(slashIndex > 0, return);
m_directoryLE->setText(path.mid(slashIndex + 1)); m_directoryLE->setText(path.mid(slashIndex + 1));
connect(m_pathChooser, &Utils::PathChooser::pathChanged, this, [this]() { connect(m_pathChooser, &Utils::PathChooser::filePathChanged, this, [this]() {
m_directoryLE->validate(); m_directoryLE->validate();
GitLabCloneDialog::updateUi(); GitLabCloneDialog::updateUi();
}); });

View File

@@ -266,7 +266,7 @@ QWidget *McuPackage::widget()
QObject::connect(this, &McuPackage::statusChanged, this, [this] { updateStatusUi(); }); QObject::connect(this, &McuPackage::statusChanged, this, [this] { updateStatusUi(); });
QObject::connect(m_fileChooser, &PathChooser::pathChanged, this, [this] { QObject::connect(m_fileChooser, &PathChooser::filePathChanged, this, [this] {
updatePath(); updatePath();
emit changed(); emit changed();
}); });

View File

@@ -193,8 +193,7 @@ void WorkingDirectoryAspect::addToLayout(LayoutBuilder &builder)
m_chooser->setPromptDialogTitle(tr("Select Working Directory")); m_chooser->setPromptDialogTitle(tr("Select Working Directory"));
m_chooser->setBaseDirectory(m_defaultWorkingDirectory); m_chooser->setBaseDirectory(m_defaultWorkingDirectory);
m_chooser->setFilePath(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory); m_chooser->setFilePath(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory);
connect(m_chooser.data(), &PathChooser::pathChanged, this, connect(m_chooser.data(), &PathChooser::filePathChanged, this, [this] {
[this]() {
m_workingDirectory = m_chooser->rawFilePath(); m_workingDirectory = m_chooser->rawFilePath();
m_resetButton->setEnabled(m_workingDirectory != m_defaultWorkingDirectory); m_resetButton->setEnabled(m_workingDirectory != m_defaultWorkingDirectory);
}); });

View File

@@ -183,7 +183,7 @@ public:
layout->addRow(tr("Default installation directory:"), &m_defaultInstallDirLineEdit); layout->addRow(tr("Default installation directory:"), &m_defaultInstallDirLineEdit);
layout->addRow(tr("Qbs version:"), &m_versionLabel); layout->addRow(tr("Qbs version:"), &m_versionLabel);
connect(&m_qbsExePathChooser, &PathChooser::pathChanged, [this] { connect(&m_qbsExePathChooser, &PathChooser::filePathChanged, [this] {
m_versionLabel.setText(getQbsVersionString()); m_versionLabel.setText(getQbsVersionString());
}); });
} }

View File

@@ -196,7 +196,7 @@ GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::GenericLinuxDeviceConfig
deployLayout->addWidget(&d->iconLabel); deployLayout->addWidget(&d->iconLabel);
deployLayout->addStretch(); deployLayout->addStretch();
mainLayout->addLayout(deployLayout); mainLayout->addLayout(deployLayout);
connect(&d->keyFileChooser, &PathChooser::pathChanged, this, [this, deployButton] { connect(&d->keyFileChooser, &PathChooser::filePathChanged, this, [this, deployButton] {
deployButton->setEnabled(d->keyFileChooser.filePath().exists()); deployButton->setEnabled(d->keyFileChooser.filePath().exists());
d->iconLabel.clear(); d->iconLabel.clear();
emit completeChanged(); emit completeChanged();

View File

@@ -89,7 +89,8 @@ WebAssemblyOptionsWidget::WebAssemblyOptionsWidget()
m_emSdkPathChooser->setExpectedKind(PathChooser::Directory); m_emSdkPathChooser->setExpectedKind(PathChooser::Directory);
m_emSdkPathChooser->setInitialBrowsePathBackup(FileUtils::homePath()); m_emSdkPathChooser->setInitialBrowsePathBackup(FileUtils::homePath());
m_emSdkPathChooser->setFilePath(WebAssemblyEmSdk::registeredEmSdk()); m_emSdkPathChooser->setFilePath(WebAssemblyEmSdk::registeredEmSdk());
connect(m_emSdkPathChooser, &PathChooser::pathChanged, [this](){ updateStatus(); }); connect(m_emSdkPathChooser, &PathChooser::filePathChanged,
this, &WebAssemblyOptionsWidget::updateStatus);
layout->addWidget(m_emSdkPathChooser); layout->addWidget(m_emSdkPathChooser);
m_emSdkVersionDisplay = new InfoLabel(this); m_emSdkVersionDisplay = new InfoLabel(this);
m_emSdkVersionDisplay->setElideMode(Qt::ElideNone); m_emSdkVersionDisplay->setElideMode(Qt::ElideNone);