forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -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());
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user