aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2024-02-13 18:01:32 +0100
committerhjk <hjk@qt.io>2024-02-14 11:33:53 +0000
commit0a1783d656964df60f1ec462f81c56ea38100dc5 (patch)
treef3dc9d8d3df558d1b8e80efa36f01b192bc0f123 /src/plugins/projectexplorer
parent91c1c244a1256b2dc9979edb1a3ce83c28ef5636 (diff)
Utils: Rename NameValueItem to EnvironmentItem (1/2)
Only used in Environments nowadays. Change-Id: I64a645ebebd5cb57c50d5d8f72a5e4dba40e122f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/environmentwidget.cpp8
-rw-r--r--src/plugins/projectexplorer/environmentwidget.h2
-rw-r--r--src/plugins/projectexplorer/project.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/projectexplorer/environmentwidget.cpp b/src/plugins/projectexplorer/environmentwidget.cpp
index 9a63d789ec..a34f8bc256 100644
--- a/src/plugins/projectexplorer/environmentwidget.cpp
+++ b/src/plugins/projectexplorer/environmentwidget.cpp
@@ -481,25 +481,25 @@ void EnvironmentWidget::unsetEnvironmentButtonClicked()
d->m_editor.setEnvironmentItems(d->m_model->userChanges());
}
-void EnvironmentWidget::amendPathList(Utils::NameValueItem::Operation op)
+void EnvironmentWidget::amendPathList(Utils::EnvironmentItem::Operation op)
{
const QString varName = d->m_model->indexToVariable(d->m_environmentView->currentIndex());
const FilePath dir = FileUtils::getExistingDirectory(this, Tr::tr("Choose Directory"));
if (dir.isEmpty())
return;
- Utils::NameValueItems changes = d->m_model->userChanges();
+ Utils::EnvironmentItems changes = d->m_model->userChanges();
changes.append({varName, dir.toUserOutput(), op});
setUserChanges(changes);
}
void EnvironmentWidget::appendPathButtonClicked()
{
- amendPathList(Utils::NameValueItem::Append);
+ amendPathList(Utils::EnvironmentItem::Append);
}
void EnvironmentWidget::prependPathButtonClicked()
{
- amendPathList(Utils::NameValueItem::Prepend);
+ amendPathList(Utils::EnvironmentItem::Prepend);
}
void EnvironmentWidget::environmentCurrentIndexChanged(const QModelIndex &current)
diff --git a/src/plugins/projectexplorer/environmentwidget.h b/src/plugins/projectexplorer/environmentwidget.h
index a00e45bcda..b1a26b036b 100644
--- a/src/plugins/projectexplorer/environmentwidget.h
+++ b/src/plugins/projectexplorer/environmentwidget.h
@@ -57,7 +57,7 @@ private:
void linkActivated(const QString &link);
using PathListModifier = std::function<QString(const QString &oldList, const QString &newDir)>;
- void amendPathList(Utils::NameValueItem::Operation op);
+ void amendPathList(Utils::EnvironmentItem::Operation op);
class Private;
const std::unique_ptr<Private> d;
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index cd46c2a521..7f2eee43db 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -1063,13 +1063,13 @@ void Project::setNamedSettings(const Key &name, const QVariant &value)
void Project::setAdditionalEnvironment(const EnvironmentItems &envItems)
{
- setNamedSettings(PROJECT_ENV_KEY, NameValueItem::toStringList(envItems));
+ setNamedSettings(PROJECT_ENV_KEY, EnvironmentItem::toStringList(envItems));
emit environmentChanged();
}
EnvironmentItems Project::additionalEnvironment() const
{
- return NameValueItem::fromStringList(namedSettings(PROJECT_ENV_KEY).toStringList());
+ return EnvironmentItem::fromStringList(namedSettings(PROJECT_ENV_KEY).toStringList());
}
bool Project::needsConfiguration() const