https://bugs.kde.org/show_bug.cgi?id=398405

--- Comment #6 from Jasem Mutlaq <mutla...@ikarustech.com> ---
I changed toDMSString in dms.cpp to this:

    QString dummy;
    char pm(' ');
    QChar zero('0');
    int dd = abs(degree());
    int dm = abs(arcmin());
    int ds = abs(arcsec());    

    if (Degrees() < 0.0)
        pm = '-';
    else if (forceSign && Degrees() > 0.0)
        pm = '+';

    if (machineReadable)
        return QString("%1%2:%3:%4").arg(pm)
                .arg(dd, 2, 10, QChar('0'))
                .arg(dm, 2, 10, QChar('0'))
                .arg(ds, 2, 10, QChar('0'));

    if (highPrecision)
    {
        double sec = arcsec() + marcsec() / 1000.;
        return QString("%1%2° %3\' %4\"").arg(pm)
                                         .arg(dd, 2, 10, zero)
                                         .arg(dm, 2, 10, zero)
                                         .arg(sec, 2, 'f', 2, zero);
    }

    return QString("%1%2° %3\' %4\"").arg(pm)
                                     .arg(dd, 2, 10, zero)
                                     .arg(dm, 2, 10, zero)
                                     .arg(ds, 2, 10, zero);


However, I am still getting decimal point even though I changed the language
and then also changed the system locale and logged out then in again. I also
briefly tried with QLocale().toString with same results. Can you find out
what's wrong?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to