[QGIS Commit] r9934 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Jan 7 03:04:00 EST 2009
Author: mhugent
Date: 2009-01-07 03:04:00 -0500 (Wed, 07 Jan 2009)
New Revision: 9934
Modified:
trunk/qgis/src/app/qgsattributetable.cpp
Log:
Use local aware comparison for sorting in attribute table
Modified: trunk/qgis/src/app/qgsattributetable.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributetable.cpp 2009-01-07 07:31:27 UTC (rev 9933)
+++ trunk/qgis/src/app/qgsattributetable.cpp 2009-01-07 08:04:00 UTC (rev 9934)
@@ -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