SUMMARY STEPS TO REPRODUCE 1. Open Night color settings 2. Select mode 'Times' 3. Try setting a time like 20:15 OBSERVED RESULT You can't select such a time EXPECTED RESULT Being able to set a time later than 19:00 SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.17.4 KDE Frameworks Version: 5.64.0 Qt Version: 5.13.2
Time input using those text fields is generally quite borked. :/
*** Bug 418209 has been marked as a duplicate of this bug. ***
*** Bug 428589 has been marked as a duplicate of this bug. ***
*** Bug 429053 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 413010 ***
Reopened, as this is actually NOT a duplicate of https://bugs.kde.org/show_bug.cgi?id=413010 (which is only about time format). I just wanted to report this issue myself as it could be very annoying to new users. Living in a 24hr-Timezone, you can't set a night color start time later than 19:00. There seems to be a problem with the time input field: 1. open night color settings 2. select mode "individual times" 3. you can't enter any start time starting with two (e.g. 22:00), only times starting with one or zero (e.g. 19:00) 4. workaround: type 22:00 in a text editor and copy it --> 22:00 can be pasted in the input field. Sometimes it also worked to at first try input a time starting with 1, then at second try it was possible to enter a time starting with 2. But I couldn't reproduce this reliably. In fact the regex in /usr/share/kpackage/kcms/kcm_nightcolor/contents/ui/TimeField.qml looks correct (/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/), so I' don't know what's the root cause of this issue :-(
Sorry, forgot to specify up to date software versions: SOFTWARE/OS VERSIONS KDE Plasma Version: 5.26.4 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7
I figured out that the problem is the "or"-part of the regex, this could be an underlying Qt Bug. Fortunately there seems to be an easy workaround, as the regex attempt here is more complicated than necessary. I'll try to submit a bugfix.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2465
Git commit be56079c4bff876d8c889abe99bfe46dd4004d67 by Fushan Wen, on behalf of Martin Frueh. Committed on 01/01/2023 at 02:39. Pushed by fusionfuture into branch 'master'. Fix time input bug caused by "or" in regex Removed or-condition in regex, Qt.ImhTime can take care of this. FIXED-IN: tbd M +2 -2 kcms/nightcolor/package/contents/ui/TimeField.qml https://invent.kde.org/plasma/plasma-workspace/commit/be56079c4bff876d8c889abe99bfe46dd4004d67
Git commit 3059f250d7d07ad04f667ade017b67c8bcd34c14 by Fushan Wen, on behalf of Martin Frueh. Committed on 01/01/2023 at 02:43. Pushed by fusionfuture into branch 'cherry-pick-be56079c'. Fix time input bug caused by "or" in regex Removed or-condition in regex, Qt.ImhTime can take care of this. FIXED-IN: tbd (cherry picked from commit be56079c4bff876d8c889abe99bfe46dd4004d67) M +2 -2 kcms/nightcolor/package/contents/ui/TimeField.qml https://invent.kde.org/plasma/plasma-workspace/commit/3059f250d7d07ad04f667ade017b67c8bcd34c14
Git commit 66a8c134277791c53bc212578e4979f4db171f83 by Fushan Wen. Committed on 01/01/2023 at 02:44. Pushed by fusionfuture into branch 'Plasma/5.26'. Fix time input bug caused by "or" in regex Removed or-condition in regex, Qt.ImhTime can take care of this. FIXED-IN: 5.26.5 (cherry picked from commit be56079c4bff876d8c889abe99bfe46dd4004d67) M +2 -2 kcms/nightcolor/package/contents/ui/TimeField.qml https://invent.kde.org/plasma/plasma-workspace/commit/66a8c134277791c53bc212578e4979f4db171f83