Not possible to use temperatures below 0 ?

Linus Torvalds torvalds at linux-foundation.org
Thu Nov 28 10:34:48 UTC 2013


On Thu, Nov 28, 2013 at 3:14 AM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
>
> only positive values seem to reach get_temperature_string(), while
> mkelvin_to_C() looks OK to me.
> so perhaps the text field is ignoring the minus sign...

I think it's parseTemperatureToMkelvin(). It does this:

        QString numOnly = text;
        numOnly.replace(",",".").remove(QRegExp("[^0-9.]"));

and I think the "remove(QRegExp("[^0-9.]") will remove the sign character.

Does adding a "-" to the end of that regex string fix it? Dirk, this
is all your code (commit a8888eaf26c9)..

               Linus


More information about the subsurface mailing list