diff options
author | dt <qtc-committer@nokia.com> | 2011-03-01 19:47:11 +0100 |
---|---|---|
committer | dt <qtc-committer@nokia.com> | 2011-03-01 19:48:39 +0100 |
commit | df2aef74523c70ee0259aae5780e72a5f0ff0310 (patch) | |
tree | 1d82cb3941f363ac39a0468c1cee93da90818c94 /src/plugins/projectexplorer/environmentwidget.cpp | |
parent | 2780ff6f2281c5e0bfe79a3f3e15abae18f008f4 (diff) | |
download | qt-creator-df2aef74523c70ee0259aae5780e72a5f0ff0310.tar.gz |
EnvironmentWidget: Sort the changes
Task-number: QTCREATORBUG-3889
Diffstat (limited to 'src/plugins/projectexplorer/environmentwidget.cpp')
-rw-r--r-- | src/plugins/projectexplorer/environmentwidget.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/environmentwidget.cpp b/src/plugins/projectexplorer/environmentwidget.cpp index 5e5af14099..7f6e597aef 100644 --- a/src/plugins/projectexplorer/environmentwidget.cpp +++ b/src/plugins/projectexplorer/environmentwidget.cpp @@ -184,10 +184,17 @@ void EnvironmentWidget::setUserChanges(const QList<Utils::EnvironmentItem> &list updateSummaryText(); } +bool sortEnvironmentItem(const Utils::EnvironmentItem &a, const Utils::EnvironmentItem &b) +{ + return a.name < b.name; +} + void EnvironmentWidget::updateSummaryText() { + QList<Utils::EnvironmentItem> list = d->m_model->userChanges(); + qSort(list.begin(), list.end(), &sortEnvironmentItem); + QString text; - const QList<Utils::EnvironmentItem> &list = d->m_model->userChanges(); foreach (const Utils::EnvironmentItem &item, list) { if (item.name != Utils::EnvironmentModel::tr("<VARIABLE>")) { text.append("<br>"); |