Summary: | kteatime won't support intervals larger than 1 hour | ||
---|---|---|---|
Product: | [Applications] kteatime | Reporter: | Oleg Kostyuk <cub.uanic> |
Component: | general | Assignee: | Stefan Böhmann <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | lueck, schwarzer |
Priority: | NOR | ||
Version: | 1.2.1 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Oleg Kostyuk
2011-06-13 23:34:24 UTC
Confirmed. 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: Index: kdetoys/kteatime/src/timeedit.ui =================================================================== --- kdetoys/kteatime/src/timeedit.ui (Revision 1228128) +++ kdetoys/kteatime/src/timeedit.ui (Arbeitskopie) @@ -39,7 +39,7 @@ <enum>Qt::WheelFocus</enum> </property> <property name="maximum" > - <number>1440</number> + <number>59</number> </property> <property name="value" > <number>3</number> Index: kdetoys/kteatime/src/settings.ui =================================================================== --- kdetoys/kteatime/src/settings.ui (Revision 1228128) +++ kdetoys/kteatime/src/settings.ui (Arbeitskopie) @@ -149,7 +149,7 @@ <bool>false</bool> </property> <property name="maximum"> - <number>1440</number> + <number>59</number> </property> </widget> </item> 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: Index: kdetoys/kteatime/src/settings.cpp =================================================================== --- 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 ); } Index: kdetoys/kteatime/src/timeedit.cpp =================================================================== --- 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. BUG: 275598 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. *** |