Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
7d235699
Commit
7d235699
authored
Jul 12, 2011
by
Max-Wilhelm Bruker
Browse files
locale aware user sorting
parent
b38f0e21
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/userlist.cpp
View file @
7d235699
...
@@ -92,7 +92,7 @@ bool UserListTWI::operator<(const QTreeWidgetItem &other) const
...
@@ -92,7 +92,7 @@ bool UserListTWI::operator<(const QTreeWidgetItem &other) const
return
data
(
0
,
Qt
::
UserRole
).
toInt
()
>
other
.
data
(
0
,
Qt
::
UserRole
).
toInt
();
return
data
(
0
,
Qt
::
UserRole
).
toInt
()
>
other
.
data
(
0
,
Qt
::
UserRole
).
toInt
();
// Sort by name
// Sort by name
return
data
(
2
,
Qt
::
UserRole
).
toString
()
.
toLower
()
<
other
.
data
(
2
,
Qt
::
UserRole
).
toString
()
.
toLower
()
;
return
QString
::
localeAwareCompare
(
data
(
2
,
Qt
::
UserRole
).
toString
()
,
other
.
data
(
2
,
Qt
::
UserRole
).
toString
()
)
<
0
;
}
}
UserList
::
UserList
(
TabSupervisor
*
_tabSupervisor
,
AbstractClient
*
_client
,
UserListType
_type
,
QWidget
*
parent
)
UserList
::
UserList
(
TabSupervisor
*
_tabSupervisor
,
AbstractClient
*
_client
,
UserListType
_type
,
QWidget
*
parent
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment