[QGIS Commit] r9935 - branches/Version-1_0/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Jan 7 03:07:46 EST 2009
Author: mhugent
Date: 2009-01-07 03:07:46 -0500 (Wed, 07 Jan 2009)
New Revision: 9935
Modified:
branches/Version-1_0/src/app/qgsattributetable.cpp
Log:
local aware sorting for 1.0 branch
Modified: branches/Version-1_0/src/app/qgsattributetable.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsattributetable.cpp 2009-01-07 08:04:00 UTC (rev 9934)
+++ branches/Version-1_0/src/app/qgsattributetable.cpp 2009-01-07 08:07:46 UTC (rev 9935)
@@ -241,7 +241,8 @@
{
if ( alphanumeric )
{
- if ( s1 > s2 )
+ int compareValue = QString::localeAwareCompare(s1, s2);
+ if ( compareValue > 0 )
{
if ( ascending )
{
@@ -252,7 +253,7 @@
return -1;
}
}
- else if ( s1 < s2 )
+ else if ( compareValue < 0 )
{
if ( ascending )
{
@@ -263,7 +264,7 @@
return 1;
}
}
- else if ( s1 == s2 )
+ else if ( compareValue = 0 )
{
return 0;
}
More information about the QGIS-commit
mailing list