| Summary: | Can't set negative absolute hours | ||
|---|---|---|---|
| Product: | [Applications] ktimetracker | Reporter: | Ronald <ronald> |
| Component: | general | Assignee: | Thorsten Staerk <dev> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | lro, smparrish |
| Priority: | NOR | ||
| Version First Reported In: | Git (master) | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Patch for inconsistencies with -0:59 <=t<=-0:01 | ||
|
Description
Ronald
2007-06-11 20:51:19 UTC
I confirm this bug. I would be glad if you could tell me what you need negative times for - I enabled them somehow, but I still cannot think about a usecase. And I am always happy to hear how people use karm (which is renamed to ktimetracker for KDE 4). SVN commit 674402 by tstaerk: allow negative times BUGS:146679 M +1 -1 edittaskdialog.cpp M +1 -1 edittaskdialog.h M +0 -4 ktimewidget.cpp --- trunk/KDE/kdepim/ktimetracker/edittaskdialog.cpp #674401:674402 @@ -1,5 +1,5 @@ /* - * karm + * ktimetracker * This file only: Copyright (C) 1999 Espen Sand, espensa@online.no * Modifications (see CVS log) Copyright (C) 2000 Klarälvdalens * Datakonsult AB <kalle@dalheimer.de>, Jesper Pedersen <blackie@kde.org> --- trunk/KDE/kdepim/ktimetracker/edittaskdialog.h #674401:674402 @@ -1,5 +1,5 @@ /* - * karm + * ktimetracker * This file only: Copyright (C) 1999 Espen Sand, espensa@online.no * * This program is free software; you can redistribute it and/or modify --- trunk/KDE/kdepim/ktimetracker/ktimewidget.cpp #674401:674402 @@ -27,7 +27,6 @@ #include <QString> #include <QValidator> #include <QWidget> -//Added by qt3to4: #include <QHBoxLayout> #include <QKeyEvent> @@ -55,9 +54,6 @@ if ( ! ok ) return Invalid; - if ( str.contains('-') != 0 ) - return Invalid; - if ( _tp==MINUTE && val >= 60 ) return Invalid; else Thanks for your fast reply and fix! So what's the use of negative times? I use them to mimic the behavior of a count-down timer so I can easily see how many time is left when I'm completing a task with a time budget. Of course, it misses functionality like warnings or an alarm bell and if this functionality would have made it in a normal way to the application, there would be a seperate field for time budget or something, but it works this way. See https://bugs.kde.org/show_bug.cgi?id=90407 for the request for a time budget - I will not implement it. SVN commit 674691 by tstaerk:
Backport SVN commit 674402 to KDE 3.5 series: Allow negative times for
budgeting time for a task.
CCBUGS:146679
M +0 -3 ktimewidget.cpp
--- branches/KDE/3.5/kdepim/karm/ktimewidget.cpp #674690:674691
@@ -30,9 +30,6 @@
if ( ! ok )
return Invalid;
- if ( str.contains('-') != 0 )
- return Invalid;
-
if ( _tp==MINUTE && val >= 60 )
return Invalid;
else
*** Bug 90407 has been marked as a duplicate of this bug. *** Created attachment 23877 [details]
Patch for inconsistencies with -0:59 <=t<=-0:01
The bug was not fully fixed. There is still a problem with display and input of
"negative" time if it's in -0:59 to -0:01 range. Then it's displayed without
minus. This patch fixes this issue. Applied against karm 3.5.9
At the moment it is 1:30 am and I do not have the concentration to look at it, but the patch seems beautiful - less code partly. And I never understood the printf parameters, thanks for helping me here. Modestas is right: - start karm - add a task a - edit task a, subtract 59 minutes -> actual: task a shows 0:59 minutes; expected: task a shows -0:59 - edit task a, subtrack 2 hours -> actual and expected: task a shows -2:59 this is a bug SVN commit 785005 by tstaerk: Patch by Modestas Vainius to show negative times with an abs value below 1 hour correctly. Thanks! CCBUGS:146679 M +2 -2 edittaskdialog.cpp M +3 -1 karmutility.cpp M +13 -8 ktimewidget.cpp M +1 -1 ktimewidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=785005 For ktimetracker 4: - add a task a, with a negative time of 59 minutes - task a shows 0:-59 => this is a bug in ktimetracker 4 as well WebSVN link: http://websvn.kde.org/?view=rev&revision=785006 *** Bug 164785 has been marked as a duplicate of this bug. *** |