Fixed bug: check the correct value when comparing 2 strings.
git-svn-id: http://voip.null.ro/svn/yate@4343 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
92077f23aa
commit
9237c61e35
1 changed files with 4 additions and 4 deletions
|
@ -312,28 +312,28 @@ static inline int compareStr(const QString& s1, const QString& s2,
|
|||
static bool caseInsensitiveLessThan(const QtTreeItemKey& left,
|
||||
const QtTreeItemKey& right)
|
||||
{
|
||||
return -1 == compareStr(left.second,right.second,Qt::CaseInsensitive);
|
||||
return compareStr(left.second,right.second,Qt::CaseInsensitive) < 0;
|
||||
}
|
||||
|
||||
// Utility: compare a single key item
|
||||
static bool caseInsensitiveGreaterThan(const QtTreeItemKey& left,
|
||||
const QtTreeItemKey& right)
|
||||
{
|
||||
return 1 == compareStr(left.second,right.second,Qt::CaseInsensitive);
|
||||
return compareStr(left.second,right.second,Qt::CaseInsensitive) > 0;
|
||||
}
|
||||
|
||||
// Utility: compare a single key item
|
||||
static bool caseSensitiveLessThan(const QtTreeItemKey& left,
|
||||
const QtTreeItemKey& right)
|
||||
{
|
||||
return -1 == compareStr(left.second,right.second,Qt::CaseSensitive);
|
||||
return compareStr(left.second,right.second,Qt::CaseSensitive) < 0;
|
||||
}
|
||||
|
||||
// Utility: compare a single key item
|
||||
static bool caseSensitiveGreaterThan(const QtTreeItemKey& left,
|
||||
const QtTreeItemKey& right)
|
||||
{
|
||||
return 1 == compareStr(left.second,right.second,Qt::CaseSensitive);
|
||||
return compareStr(left.second,right.second,Qt::CaseSensitive) > 0;
|
||||
}
|
||||
|
||||
// Utility: sort
|
||||
|
|
Loading…
Reference in a new issue