<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>217201</bug_id>
          
          <creation_ts>2009-12-03 14:36:28 +0000</creation_ts>
          <short_desc>green progress circle doesn&apos;t accurate work for &gt;= 1h</short_desc>
          <delta_ts>2013-10-29 23:57:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kteatime</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Debian testing</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>275598</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frederik Schwarzer">schwarzer</reporter>
          <assigned_to name="Stefan Böhmann">kde</assigned_to>
          <cc>kde</cc>
    
    <cc>xdunlapx</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>20</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>872802</commentid>
    <comment_count>0</comment_count>
    <who name="Frederik Schwarzer">schwarzer</who>
    <bug_when>2009-12-03 14:36:28 +0000</bug_when>
    <thetext>Version:            (using KDE 4.3.2)
Installed from:    Debian testing/unstable Packages

The green progress circle doesn&apos;t show the right proportions if you set up 2 hours anonymously.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872932</commentid>
    <comment_count>1</comment_count>
    <who name="FiNeX">finex</who>
    <bug_when>2009-12-03 18:57:20 +0000</bug_when>
    <thetext>*** Bug 217202 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088935</commentid>
    <comment_count>2</comment_count>
    <who name="Brittany Dunlap">xdunlapx</who>
    <bug_when>2011-02-18 00:58:43 +0000</bug_when>
    <thetext>The problem is with exactly 1 hour or above. It is inaccurate. For example if set for one hour, at 30 minutes it shows approximately 15 minutes left on the circle indicator.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1094775</commentid>
    <comment_count>3</comment_count>
      <attachid>57773</attachid>
    <who name="Roman Fietze">kde</who>
    <bug_when>2011-03-08 13:44:07 +0000</bug_when>
    <thetext>Created attachment 57773
Proposed patch to solve the problem

Different drawPie arguments</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1095317</commentid>
    <comment_count>4</comment_count>
    <who name="Roman Fietze">kde</who>
    <bug_when>2011-03-09 13:47:15 +0000</bug_when>
    <thetext>The statement

p.drawPie( rectangle, 90*16, -(360 * 16 * m_runningTeaTime) / m_runningTea.time() );

is not yet completely correct, because with larger values we run into overflows.

The correct statement has to be

p.drawPie( rectangle, 90*16, -(360L * 16L * m_runningTeaTime) / m_runningTea.time() );

Because openSUSE currently updates to 4.6.1 in the Release repos, I cannot test it using kteatime directly. But a small test program shows proper results going down (or better up) from -5758 (-359 degrees) to 0 for all selected times up to several hours (I think it&apos;s 27 hours on a 32 bit system, even more on a 64 bit system).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1098449</commentid>
    <comment_count>5</comment_count>
      <attachid>58137</attachid>
    <who name="Roman Fietze">kde</who>
    <bug_when>2011-03-18 10:32:55 +0000</bug_when>
    <thetext>Created attachment 58137
KTeaTime integer overflow fix

Fixes integer overflow by casting m_runningTeaTime indirectly to long by multiplying it by 360L * 16L.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313242</commentid>
    <comment_count>6</comment_count>
    <who name="Roman Fietze">kde</who>
    <bug_when>2012-11-07 07:52:39 +0000</bug_when>
    <thetext>The bug seems to be fixed for quite some time now. Tested with different KDE versions since 4.5.

Could please somebody verify this and evt. set it to RESOLVED?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1407388</commentid>
    <comment_count>7</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2013-10-29 23:57:38 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 275598 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>57773</attachid>
            <date>2011-03-08 13:44:07 +0000</date>
            <delta_ts>2011-03-08 13:44:07 +0000</delta_ts>
            <desc>Proposed patch to solve the problem</desc>
            <filename>kteatime.diff</filename>
            <type>text/plain</type>
            <size>857</size>
            <attacher name="Roman Fietze">kde</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL2t0ZWF0aW1lL3NyYy90b3BsZXZlbC5jcHAgYi9rdGVhdGltZS9zcmMvdG9w
bGV2ZWwuY3BwCmluZGV4IGNhM2I1YWUuLjRiMmM5NmUgMTAwNjQ0Ci0tLSBhL2t0ZWF0aW1lL3Ny
Yy90b3BsZXZlbC5jcHAKKysrIGIva3RlYXRpbWUvc3JjL3RvcGxldmVsLmNwcApAQCAtMTYsNiAr
MTYsNyBAQAogICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdl
bmVyYWwgUHVibGljIExpY2Vuc2UKICAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtLiAgSWYgbm90
LCBzZWUgPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LgogICovCisKICNpbmNsdWRlICJ0
b3BsZXZlbC5oIgogI2luY2x1ZGUgInRpbWVlZGl0LmgiCiAjaW5jbHVkZSAic2V0dGluZ3MuaCIK
QEAgLTI0Niw3ICsyNDcsNyBAQCB2b2lkIFRvcExldmVsOjpyZXBhaW50VHJheUljb24oKQogCiAg
ICAgICAgIGlmKCBtX3J1bm5pbmdUZWFUaW1lID4gMCApIHsKICAgICAgICAgICAgIHAuc2V0QnJ1
c2goIFFDb2xvcigyNTUsIDAsIDAsIDE5MCkgKTsKLSAgICAgICAgICAgIHAuZHJhd1BpZSggcmVj
dGFuZ2xlLCA5MCoxNiwgLSggMzYwKjE2IC8gbV9ydW5uaW5nVGVhLnRpbWUoKSAqIG1fcnVubmlu
Z1RlYVRpbWUgKSApOworICAgICAgICAgICAgcC5kcmF3UGllKCByZWN0YW5nbGUsIDkwKjE2LCAt
KDM2MCAqIDE2ICogbV9ydW5uaW5nVGVhVGltZSkgLyBtX3J1bm5pbmdUZWEudGltZSgpICk7CiAg
ICAgICAgIH0KICAgICAgICAgZWxzZSBpZiggKG1fcnVubmluZ1RlYVRpbWUgKiAtMSkgJSAyID09
IDAgKSB7CiAgICAgICAgICAgIHAuc2V0QnJ1c2goIFFDb2xvciggMjU1LCAwLCAwLCAxOTAgKSAp
Owo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>58137</attachid>
            <date>2011-03-18 10:32:55 +0000</date>
            <delta_ts>2011-03-18 10:32:55 +0000</delta_ts>
            <desc>KTeaTime integer overflow fix</desc>
            <filename>kteatime.diff</filename>
            <type>text/plain</type>
            <size>614</size>
            <attacher name="Roman Fietze">kde</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL2t0ZWF0aW1lL3NyYy90b3BsZXZlbC5jcHAgYi9rdGVhdGltZS9zcmMvdG9w
bGV2ZWwuY3BwCmluZGV4IGNhM2I1YWUuLjA4YjkyMjggMTAwNjQ0Ci0tLSBhL2t0ZWF0aW1lL3Ny
Yy90b3BsZXZlbC5jcHAKKysrIGIva3RlYXRpbWUvc3JjL3RvcGxldmVsLmNwcApAQCAtMjQ2LDcg
KzI0Niw3IEBAIHZvaWQgVG9wTGV2ZWw6OnJlcGFpbnRUcmF5SWNvbigpCiAKICAgICAgICAgaWYo
IG1fcnVubmluZ1RlYVRpbWUgPiAwICkgewogICAgICAgICAgICAgcC5zZXRCcnVzaCggUUNvbG9y
KDI1NSwgMCwgMCwgMTkwKSApOwotICAgICAgICAgICAgcC5kcmF3UGllKCByZWN0YW5nbGUsIDkw
KjE2LCAtKCAzNjAqMTYgLyBtX3J1bm5pbmdUZWEudGltZSgpICogbV9ydW5uaW5nVGVhVGltZSAp
ICk7CisJICAgIHAuZHJhd1BpZSggcmVjdGFuZ2xlLCA5MCoxNiwgLSgzNjBMICogMTZMICogbV9y
dW5uaW5nVGVhVGltZSkgLyBtX3J1bm5pbmdUZWEudGltZSgpICk7CiAgICAgICAgIH0KICAgICAg
ICAgZWxzZSBpZiggKG1fcnVubmluZ1RlYVRpbWUgKiAtMSkgJSAyID09IDAgKSB7CiAgICAgICAg
ICAgIHAuc2V0QnJ1c2goIFFDb2xvciggMjU1LCAwLCAwLCAxOTAgKSApOwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>