Do not sort the entries in the syc protocol dialog alphabetically

The entries should be sorted chronogically.  But now the QTreeWidget can
only sort them alphabetically by the time,  which is not what we want.
Disalbe the sorting, and always insert the elements in the reverse
order.

Fix #890
This commit is contained in:
Olivier Goffart 2013-08-26 17:25:33 +02:00
Родитель c0e056bb84
Коммит c3326efe94
2 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -149,7 +149,7 @@ void ItemProgressDialog::setSyncResult( const SyncResult& result )
twitem->setToolTip(0, longTimeStr);
twitem->setToolTip(3, tooltip);
twitem->setIcon(0, Theme::instance()->syncStateIcon(SyncResult::Problem, true));
_ui->_treeWidget->addTopLevelItem(twitem);
_ui->_treeWidget->insertTopLevelItem(0, twitem);
}
}
@ -288,7 +288,7 @@ void ItemProgressDialog::slotProgressErrors( const QString& folder, const Progre
// by error_code. A quota problem is considered an error, others might not??
item->setIcon(0, Theme::instance()->syncStateIcon(SyncResult::Error, true));
item->setToolTip(0, longTimeStr);
_ui->_treeWidget->addTopLevelItem(item);
_ui->_treeWidget->insertTopLevelItem(0, item);
Q_UNUSED(item);
}
@ -319,7 +319,7 @@ void ItemProgressDialog::slotProgressInfo( const QString& folder, const Progress
QTreeWidgetItem *item = new QTreeWidgetItem(columns);
item->setToolTip(0, longTimeStr);
_ui->_treeWidget->addTopLevelItem(item);
_ui->_treeWidget->insertTopLevelItem(0, item);
Q_UNUSED(item);
}

Просмотреть файл

@ -39,9 +39,6 @@
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="columnCount">
<number>4</number>
</property>