Skip to content
Permalink
Browse files

local aware sorting for 1.0 branch

git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@9935 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jan 7, 2009
1 parent d0309c3 commit fc7991a5c477aea650c0d9d9308f2c2f5fdd746f
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/app/qgsattributetable.cpp
@@ -241,7 +241,8 @@ int QgsAttributeTable::compareItems( QString s1, QString s2, bool ascending, boo
{
if ( alphanumeric )
{
if ( s1 > s2 )
int compareValue = QString::localeAwareCompare(s1, s2);
if ( compareValue > 0 )
{
if ( ascending )
{
@@ -252,7 +253,7 @@ int QgsAttributeTable::compareItems( QString s1, QString s2, bool ascending, boo
return -1;
}
}
else if ( s1 < s2 )
else if ( compareValue < 0 )
{
if ( ascending )
{
@@ -263,7 +264,7 @@ int QgsAttributeTable::compareItems( QString s1, QString s2, bool ascending, boo
return 1;
}
}
else if ( s1 == s2 )
else if ( compareValue = 0 )
{
return 0;
}

0 comments on commit fc7991a

Please sign in to comment.
You can’t perform that action at this time.