[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdenetwork/wifi/kwireless
From:       Lukáš_Tinkl <lukas () kde ! org>
Date:       2004-11-29 16:38:16
Message-ID: 200411291738.16447.lukas () kde ! org
[Download RAW message or body]

Dne po 29. listopadu 2004 16:52 Helge Deller napsal(a):
> CVS commit by deller:
>
> code simplification is always good
>
>
>   M +3 -30     kwirelesswidget.cpp   1.4
>
>
> --- kdenetwork/wifi/kwireless/kwirelesswidget.cpp  #1.3:1.4
> @@ -51,14 +51,5 @@ float DeviceInfo::quality()
>  QString DeviceInfo::qualityString()
>  {
> -    QString text;
> -    QTextOStream qual(&text);
> -    if(m_quality<0.995)
> -    {
> -        qual.precision(2);
> -    } else {
> -        qual.precision(3);
> -    }
> -    qual << m_quality*100.0 << "%";
> -    return text;
> +    return QString::number(m_quality*100, 'f', 0) + "%";
>  }

Please notice that some languages put the percent sign _before_ the number, so 
this deserves an i18n() call.

-- 
Lukáš Tinkl <lukas@kde.org>
KDE developer


As the poet said, "Only God can make a tree" -- probably because it's so hard 
to figure out how to get the bark on. -- Woody Allen

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic