Commit df2aef74 authored by dt's avatar dt
Browse files

EnvironmentWidget: Sort the changes

Task-number: QTCREATORBUG-3889
parent 2780ff6f
......@@ -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>");
......
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