On Fri May 4 2012 13:25:24 Ladislav Slezak wrote:
> Dne 4.5.2012 11:48, Thomas Goettlicher napsal(a):
> > On Fri May 4 2012 11:19:24 Ladislav Slezak wrote:
> [...]
> 
> > Which regexp do you propose? Please keep in mind, that the regexp needs
> > to be executed each time the user wants to sort the columns for all rows
> > of the table. We should keep the regexp simple as it's critical to
> > performance.
> 
> According to http://qt-project.org/doc/qt-4.8/qregexp.html I'd propose
> 
>    "^\\s*(\\d+)"
I fine-tuned the sort function now:
*  Leading blanks for numbers are ignored
* '+' and '-' in front of numbers are respected
* text separated by a blank right of a number is being ignored

I think that's a sufficient solution for >95% of scenarios.

Cheers,
Thomas


-- 
Thomas Goettlicher
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, 
HRB 16746 (AG Nürnberg) 
Maxfeldstraße 5                         
90409 Nürnberg 
Germany

Reply via email to