Commit 9c68ad01 authored by hjk's avatar hjk Committed by hjk

utils: remove 'export' when batch-editing environment variables

This helps when copy-pasting from e.g. a shell script.

Change-Id: I8beb8f29189d1cd8c85818819c46bf3ed21b5f5a
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent d7284b62
......@@ -37,7 +37,6 @@
#include <QFont>
namespace Utils {
namespace Internal {
class EnvironmentModelPrivate
......@@ -364,6 +363,13 @@ void EnvironmentModel::setUserChanges(QList<Utils::EnvironmentItem> list)
return;
beginResetModel();
d->m_items = list;
for (int i = 0; i != list.size(); ++i) {
QString &name = d->m_items[i].name;
name = name.trimmed();
if (name.startsWith(QLatin1String("export ")))
name = name.mid(7).trimmed();
}
d->updateResultEnvironment();
endResetModel();
emit userChangesChanged();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment