Utils: Remove uses of deprecated PathChooser::path()

There's filePath() nowadays.

Change-Id: Ief06bd07a69a287d6a5ca3c41eb7069dba869d52
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-09-27 10:38:51 +02:00
parent 4b5aeb9a74
commit 81acd0c62a
4 changed files with 9 additions and 9 deletions

View File

@@ -1077,12 +1077,12 @@ void StringAspect::addToLayout(LayoutBuilder &builder)
if (d->m_blockAutoApply)
return;
d->m_blockAutoApply = true;
setValue(d->m_pathChooserDisplay->path());
setValue(d->m_pathChooserDisplay->filePath().toString());
d->m_blockAutoApply = false;
});
} else {
connect(d->m_pathChooserDisplay, &PathChooser::pathChanged, this, [this] {
setValue(d->m_pathChooserDisplay->path());
setValue(d->m_pathChooserDisplay->filePath().toString());
});
}
}
@@ -1163,7 +1163,7 @@ QVariant StringAspect::volatileValue() const
switch (d->m_displayStyle) {
case PathChooserDisplay:
QTC_ASSERT(d->m_pathChooserDisplay, return {});
return d->m_pathChooserDisplay->path();
return d->m_pathChooserDisplay->filePath().toString();
case LineEditDisplay:
QTC_ASSERT(d->m_lineEditDisplay, return {});
return d->m_lineEditDisplay->text();

View File

@@ -101,7 +101,7 @@ void SettingsPageWidget::apply()
{
ClearCaseSettings rc;
rc.ccCommand = m_ui.commandPathChooser->rawPath();
rc.ccBinaryPath = m_ui.commandPathChooser->path();
rc.ccBinaryPath = m_ui.commandPathChooser->filePath().toString();
rc.timeOutS = m_ui.timeOutSpinBox->value();
rc.autoCheckOut = m_ui.autoCheckOutCheckBox->isChecked();
rc.noComment = m_ui.noCommentCheckBox->isChecked();

View File

@@ -147,7 +147,7 @@ DesignerSettings SettingsPageWidget::settings() const
settings.insert(DesignerSettingsKey::DEBUG_PUPPET,
m_ui.debugPuppetComboBox->currentText());
QString newFallbackPuppetPath = m_ui.fallbackPuppetPathLineEdit->path();
QString newFallbackPuppetPath = m_ui.fallbackPuppetPathLineEdit->filePath().toString();
QTC_CHECK(PuppetCreator::defaultPuppetFallbackDirectory() ==
m_ui.fallbackPuppetPathLineEdit->lineEdit()->placeholderText());
if (newFallbackPuppetPath.isEmpty())
@@ -163,10 +163,10 @@ DesignerSettings SettingsPageWidget::settings() const
settings.insert(DesignerSettingsKey::PUPPET_DEFAULT_DIRECTORY, QString());
}
if (!m_ui.puppetBuildPathLineEdit->path().isEmpty() &&
m_ui.puppetBuildPathLineEdit->path() != PuppetCreator::defaultPuppetToplevelBuildDirectory()) {
if (!m_ui.puppetBuildPathLineEdit->filePath().isEmpty() &&
m_ui.puppetBuildPathLineEdit->filePath().toString() != PuppetCreator::defaultPuppetToplevelBuildDirectory()) {
settings.insert(DesignerSettingsKey::PUPPET_TOPLEVEL_BUILD_DIRECTORY,
m_ui.puppetBuildPathLineEdit->path());
m_ui.puppetBuildPathLineEdit->filePath().toString());
}
settings.insert(DesignerSettingsKey::ALWAYS_SAVE_IN_CRUMBLEBAR,
m_ui.alwaysSaveSubcomponentsCheckBox->isChecked());

View File

@@ -168,7 +168,7 @@ QString ComponentNameDialog::isValid() const
if (!ui->pathEdit->isValid())
return tr("Invalid path.");
if (QDir(ui->pathEdit->path()).exists(compName + ".qml"))
if (ui->pathEdit->filePath().pathAppended(compName + ".qml").exists())
return tr("Component already exists.");
return QString();