|
|
@ -657,20 +657,20 @@ void GUI::sortDownloadList(int index, Qt::SortOrder startSortOrder, bool fromLoa |
|
|
|
sortOrder = Qt::AscendingOrder; |
|
|
|
sortOrder = Qt::AscendingOrder; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
QString sortOrderLetter; |
|
|
|
QString sortOrderLetter; |
|
|
|
if(sortOrder == Qt::AscendingOrder) |
|
|
|
if(sortOrder == Qt::AscendingOrder) |
|
|
|
sortOrderLetter = "a"; |
|
|
|
sortOrderLetter = "a"; |
|
|
|
else |
|
|
|
else |
|
|
|
sortOrderLetter = "d"; |
|
|
|
sortOrderLetter = "d"; |
|
|
|
if(fromLoadColWidth) { |
|
|
|
if(fromLoadColWidth) { |
|
|
|
// XXX: Why is this needed?
|
|
|
|
// XXX: Why is this needed?
|
|
|
|
if(sortOrder == Qt::DescendingOrder) |
|
|
|
if(sortOrder == Qt::DescendingOrder) |
|
|
|
downloadList->header()->setSortIndicator(index, Qt::AscendingOrder); |
|
|
|
downloadList->header()->setSortIndicator(index, Qt::AscendingOrder); |
|
|
|
else |
|
|
|
else |
|
|
|
downloadList->header()->setSortIndicator(index, Qt::DescendingOrder); |
|
|
|
downloadList->header()->setSortIndicator(index, Qt::DescendingOrder); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
downloadList->header()->setSortIndicator(index, sortOrder); |
|
|
|
downloadList->header()->setSortIndicator(index, sortOrder); |
|
|
|
} |
|
|
|
} |
|
|
|
switch(index){ |
|
|
|
switch(index){ |
|
|
|
case SIZE: |
|
|
|
case SIZE: |
|
|
|
case ETA: |
|
|
|
case ETA: |
|
|
@ -679,9 +679,13 @@ void GUI::sortDownloadList(int index, Qt::SortOrder startSortOrder, bool fromLoa |
|
|
|
sortDownloadListFloat(index, sortOrder); |
|
|
|
sortDownloadListFloat(index, sortOrder); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case PROGRESS: |
|
|
|
case PROGRESS: |
|
|
|
// Progress sorting must be delayed until files are checked
|
|
|
|
if(fromLoadColWidth){ |
|
|
|
delayedSorting = true; |
|
|
|
// Progress sorting must be delayed until files are checked (on startup)
|
|
|
|
delayedSortingOrder = sortOrder; |
|
|
|
delayedSorting = true; |
|
|
|
|
|
|
|
delayedSortingOrder = sortOrder; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
sortDownloadListFloat(index, sortOrder); |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
sortDownloadListString(index, sortOrder); |
|
|
|
sortDownloadListString(index, sortOrder); |
|
|
|