Version: 1.2.1 (using KDE 4.6.2)
KTeatime won't support intervals larger than 1 hour. If you'll try to set "Time" in "Tea Properties" for some value, larger than 59 (in minutes field), then configuration will be accepted, but when you'll open "Configure" dialog next time - amount of minutes will be set to (%prev_amount% mod 60). For example, if you'll set it to 62 minutes, then it will be reseted to 2 minutes.
Steps to Reproduce:
1. Open "Configure" dialog, add new tea entry, set amount of minutes to any value, larger than 60, press "Ok"
2. Open "Configure" dialog again, scroll list to just entered entry, and you'll see proper amount of time. But when you'll try to click on this item in list (select it), then amount of minutes will be reseted.
Amount of minutes reseted to %prev_value% mod 60
Amount of minutes shouldn't change
But I don't think kteatime should allow to enter >59 minutes here, it should have the same behavior as for the seconds, where the entry filed has this upper limit.
This is the patch to limit minutes to 59:
--- kdetoys/kteatime/src/timeedit.ui (Revision 1228128)
+++ kdetoys/kteatime/src/timeedit.ui (Arbeitskopie)
@@ -39,7 +39,7 @@
<property name="maximum" >
<property name="value" >
--- kdetoys/kteatime/src/settings.ui (Revision 1228128)
+++ kdetoys/kteatime/src/settings.ui (Arbeitskopie)
@@ -149,7 +149,7 @@
Objections to fix it this way?
Well, then how I can set timer to 2 hours, for example? This worked fine in KDE3 - I just set minutes to 120 - and this was very useful.
Also, don't see why it's better to close eyes and make some non-useful workaround, instead of find and fix the bug. And this is definitely bug, because when you enter 59 minutes, and then click several times on up arrow (to increase amount of minutes), then you'll see that in list time amount will be displayed _with_ hours ("1 hour 1 minute", "1 hour 2 minutes", and so on). So, KTeaTime _can_ handle hours - why you propose to cut away this functionality? As for me, your patch is not acceptable at all.
And side note: is there any reason to have any restrictions for amount of minutes? And why currently it's set to 1440? Why not 2880? As for me, this looks like Windows-way: "we always know better what users want" - but this is not so really.
KTeatime lost the functionality to accept minutes > 59 with this commit http://websvn.kde.org/?view=revision&revision=710357, where
minuteBox->setValue(val / 60); was changed to m_ui->minutes->setValue((time%(60*60))/60);
Patch to revert that:
--- kdetoys/kteatime/src/settings.cpp (Revision 1236689)
+++ kdetoys/kteatime/src/settings.cpp (Arbeitskopie)
@@ -263,7 +263,7 @@
ui->teaNameEdit->setText( name );
- ui->minutesSpin->setValue( (time % ( 60 * 60 ) ) / 60 );
+ ui->minutesSpin->setValue( time / 60 );
ui->secondsSpin->setValue( time % 60 );
--- kdetoys/kteatime/src/timeedit.cpp (Revision 1236689)
+++ kdetoys/kteatime/src/timeedit.cpp (Arbeitskopie)
@@ -55,7 +55,7 @@
int time=group.readEntry( "AnonymousTeaTime", 180 );
- ui->minutes->setValue( ( time % ( 60 * 60 ) ) / 60 );
+ ui->minutes->setValue( time / 60 );
ui->seconds->setValue( time % 60 );
ui->minutes->setFocus( Qt::ShortcutFocusReason );
SVN commit 1236875 by sboehmann:
Fix bug that KTeaTime won't support intervals larger than 1 hour.
Thanks to Oleg Kostyuk for reporting and thanks to Burkhard Lueck for the patch.
M +1 -1 settings.cpp
M +1 -1 timeedit.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1236875
*** Bug 217201 has been marked as a duplicate of this bug. ***