mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- COSMETIC: Now displaying the number of downloads in tab title
- BUGFIX: Fixed problems that could happen with delete selection action
This commit is contained in:
parent
a3f9de767b
commit
dd65bb7292
4 changed files with 55 additions and 25 deletions
14
src/misc.h
14
src/misc.h
|
@ -135,6 +135,20 @@ class misc : public QObject{
|
|||
list.insert(i, value);
|
||||
}
|
||||
|
||||
template <class T> static void insertSort2(QList<QPair<int, T> > &list, const QPair<int, T>& value, Qt::SortOrder sortOrder){
|
||||
int i = 0;
|
||||
if(sortOrder == Qt::AscendingOrder){
|
||||
while(i < list.size() and value.first > list.at(i).first){
|
||||
++i;
|
||||
}
|
||||
}else{
|
||||
while(i < list.size() and value.first < list.at(i).first){
|
||||
++i;
|
||||
}
|
||||
}
|
||||
list.insert(i, value);
|
||||
}
|
||||
|
||||
// Can't use template class for QString because >,< use unicode code for sorting
|
||||
// which is not what a human would expect when sorting strings.
|
||||
static void insertSortString(QList<QPair<int, QString> > &list, QPair<int, QString> value, Qt::SortOrder sortOrder){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue