Bug 347045 - Sunday is always automatically selected once weekly recurrence drop down is clicked
Summary: Sunday is always automatically selected once weekly recurrence drop down is c...
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: recurrence (show other bugs)
Version: 5.21.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-02 09:02 UTC by bugzy
Modified: 2023-07-09 07:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
image of dialog before dropdown is clicked (37.38 KB, image/png)
2015-05-02 09:03 UTC, bugzy
Details
image of dialog as soon as dropdown is clicked (37.60 KB, image/png)
2015-05-02 09:03 UTC, bugzy
Details
Video Showing the bug and how to reproduce it (317.99 KB, video/mp4)
2017-06-24 16:43 UTC, bugzy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugzy 2015-05-02 09:02:19 UTC
Version: 4.14.6
When attempting to setup a recurrent even by week, if the user wants a recurrence for more than one day, and this clicks the "on:" drop down menu, Sunday is automatically added to the list of days for recurrence.

Reproducible: Always

Steps to Reproduce:
1. Open korganizer
2. Add new event
3. Click on Recurrence tab
4. Change "Repeats:" value to weekly
5. Click on the "on:" dropdown menus used to select days of the week

Actual Results:  
Sunday is automatically added to list of recurrent days

Expected Results:  
nothing should happen until the user (me) selects additional days of recurrence
Comment 1 bugzy 2015-05-02 09:03:06 UTC
Created attachment 92368 [details]
image of dialog before dropdown is clicked
Comment 2 bugzy 2015-05-02 09:03:56 UTC
Created attachment 92369 [details]
image of dialog as soon as dropdown is clicked
Comment 3 Denis Kurz 2017-06-23 20:00:58 UTC
This bug has never been confirmed for a KDE PIM version that is based on KDE Frameworks (5.x). Those versions differ significantly from the old 4.x series. Therefore, I plan to close it in around two or three months. In the meantime, it is set to WAITINGFORINFO to give reporters the oportunity to check if it is still valid. As soon as someone confirms it for a recent version (at least 5.1, ideally even more recent), I'll gladly reopen it.

Please understand that we lack the manpower to triage bugs reported for versions almost two years beyond their end of life.
Comment 4 bugzy 2017-06-24 02:00:20 UTC
The bug still exists in korganizer (5.4.3) and kdepim 16.12.3. Whereas I have not tested the 17.04.x versions of the same, I strongly doubt that the problem is fixed. Nevertheless, I will update this bug as soon as fedora kde applications packages are updated to match kde release.

When I have a chance I will also try to upload a video of this issue.
Comment 5 bugzy 2017-06-24 16:43:24 UTC
Created attachment 106275 [details]
Video Showing the bug and how to reproduce it

Attached video of the bug and how to reproduce it
Comment 6 Justin Zobel 2022-11-06 09:25:15 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 7 bugzy 2022-11-07 23:20:03 UTC
Still reproducable on korganizer 5.21.2
Comment 8 Thomas Karpiniec 2023-06-11 12:14:55 UTC
I've tracked this down to this connection in `KCheckComboBox`: https://invent.kde.org/pim/libkdepim/-/blob/master/src/widgets/kcheckcombobox.cpp#L122

    connect(this, &QComboBox::activated, this, [this]() {
        d->toggleCheckState();
    });

The idea is that the `activated` signal will fire when the user clicks on an item in the list, so its check state should be toggled. The problem is that this signal is _also_ firing when you first click the drop-down. I tested a hack that swallows the first `activated` event after `showPopup()` and this made it work correctly.

This doesn't appear to be normal behaviour for QComboBox which makes me wonder if we have the signal connected somewhere else and causing problems. I captured the following backtrace but haven't quite figured out where this is coming from yet:

#0  KPIM::KCheckComboBox::KCheckComboBoxPrivate::toggleCheckState (this=0x12ccc90) at /home/tk/kde/src/libkdepim/src/widgets/kcheckcombobox.cpp:113
#1  0x00007ffff4f25232 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffc170, r=0x12cc800, this=0x12cccf0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#2  doActivate<false> (sender=0x12cc800, signal_index=8, argv=0x7fffffffc170) at kernel/qobject.cpp:3923
#3  0x00007ffff4f1de2f in QMetaObject::activate (sender=sender@entry=0x12cc800, m=m@entry=0x7ffff60c25c0 <QComboBox::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffc170) at kernel/qobject.cpp:3983
#4  0x00007ffff5ca8a91 in QComboBox::activated (this=this@entry=0x12cc800, _t1=<optimized out>) at .moc/moc_qcombobox.cpp:510
#5  0x00007ffff5caa23e in QComboBoxPrivate::emitActivated (this=this@entry=0x12cc840, index=...) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:62
#6  0x00007ffff5caf322 in QComboBoxPrivate::_q_editingFinished (this=0x12cc840) at widgets/qcombobox.cpp:1358
#7  0x00007ffff4f251d3 in doActivate<false> (sender=0x12cd930, signal_index=11, argv=0x7fffffffc2d0) at kernel/qobject.cpp:3935
#8  0x00007ffff4f1de2f in QMetaObject::activate (sender=sender@entry=0x12cd930, m=m@entry=0x7ffff60c5b20 <QLineEdit::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3983
#9  0x00007ffff5ceafd3 in QLineEdit::editingFinished (this=this@entry=0x12cd930) at .moc/moc_qlineedit.cpp:473
#10 0x00007ffff5cf1d61 in QLineEdit::focusOutEvent (this=0x12cd930, e=0x7fffffffc530) at widgets/qlineedit.cpp:1959
#11 0x00007ffff5be6ee0 in QWidget::event (this=0x12cd930, event=0x7fffffffc530) at kernel/qwidget.cpp:8793
#12 0x00007ffff5be6ee0 in QWidget::event (this=0x12cc800, event=0x7fffffffc530) at kernel/qwidget.cpp:8793
#13 0x00007ffff5ba51ae in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x12cc800, e=0x7fffffffc530) at kernel/qapplication.cpp:3640
#14 0x00007ffff4eec978 in QCoreApplication::notifyInternal2 (receiver=0x12cc800, event=0x7fffffffc530) at kernel/qcoreapplication.cpp:1064
#15 0x00007ffff5baa160 in QApplicationPrivate::openPopup (this=<optimized out>, popup=<optimized out>, popup@entry=0x12cf790) at kernel/qapplication.cpp:3767
#16 0x00007ffff5be3ab0 in QWidgetPrivate::show_helper (this=this@entry=0x12d4aa0) at kernel/qwidget.cpp:7844
#17 0x00007ffff5be6823 in QWidgetPrivate::setVisible (this=0x12d4aa0, visible=<optimized out>) at kernel/qwidget.cpp:8137
#18 0x00007ffff5cb034e in QComboBox::showPopup (this=0x12cc800) at widgets/qcombobox.cpp:2953
#19 0x00007ffff5cb10de in QComboBoxPrivate::showPopupFromMouseEvent (this=0x12cc840, e=<optimized out>) at widgets/qcombobox.cpp:3303
#20 0x00007ffff5be6d78 in QWidget::event (this=0x12cc800, event=0x7fffffffcd50) at kernel/qwidget.cpp:9045
#21 0x00007ffff5ba51ae in QApplicationPrivate::notify_helper (this=this@entry=0x435230, receiver=receiver@entry=0x12cc800, e=e@entry=0x7fffffffcd50) at kernel/qapplication.cpp:3640
#22 0x00007ffff5bad5df in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffffffcd50) at kernel/qapplication.cpp:3084
#23 0x00007ffff4eec978 in QCoreApplication::notifyInternal2 (receiver=0x12cc800, event=0x7fffffffcd50) at kernel/qcoreapplication.cpp:1064
#24 0x00007ffff5bab93e in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x12cc800, event=event@entry=0x7fffffffcd50, alienWidget=<optimized out>, nativeWidget=0x7fffe0003430, buttonDown=buttonDown@entry=0x7ffff60f2330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#25 0x00007ffff5bff80d in QWidgetWindow::handleMouseEvent (this=0x18dd660, event=0x7fffffffd000) at kernel/qwidgetwindow.cpp:684
#26 0x00007ffff5c02d2f in QWidgetWindow::event (this=0x18dd660, event=0x7fffffffd000) at kernel/qwidgetwindow.cpp:300
#27 0x00007ffff5ba51ae in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x18dd660, e=0x7fffffffd000) at kernel/qapplication.cpp:3640
#28 0x00007ffff4eec978 in QCoreApplication::notifyInternal2 (receiver=0x18dd660, event=0x7fffffffd000) at kernel/qcoreapplication.cpp:1064
#29 0x00007ffff537c9cb in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib64/libQt5Gui.so.5
#30 0x00007ffff53500fc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Gui.so.5
#31 0x00007ffff0f1a16a in ?? () from /lib64/libQt5XcbQpa.so.5
#32 0x00007ffff25168d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#33 0x00007ffff2516ce8 in ?? () from /lib64/libglib-2.0.so.0
#34 0x00007ffff2516d7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#35 0x00007ffff4f45f26 in QEventDispatcherGlib::processEvents (this=0x51f140, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#36 0x00007ffff4eeb40b in QEventLoop::exec (this=this@entry=0x7fffffffd330, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#37 0x00007ffff4ef38a0 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#38 0x000000000040b6a7 in main (argc=<optimized out>, argv=<optimized out>) at /home/tk/kde/src/korganizer/src/main.cpp:72
Comment 9 Bug Janitor Service 2023-06-21 11:47:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/libkdepim/-/merge_requests/13
Comment 10 Volker Krause 2023-07-09 07:24:14 UTC
Git commit bda4e47a7872769abbdfb82464585d379be34fb0 by Volker Krause, on behalf of Thomas Karpiniec.
Committed on 09/07/2023 at 07:20.
Pushed by vkrause into branch 'master'.

Avoid spurious checkcombobox toggle where indexes don't match

When clicking on a KCheckComboBox that has an item already selected,
QComboBox will fire activated (via _q_editingFinished). When this
popup is opening for the first time the currentIndex of the combo
box is correct but the view's current index is still row 0. This
leads to spuriously toggling the first item in the list.

Since this activation from QComboBox happens programatically, care
must also be taken not to process this event for a disabled item.

M  +3    -2    src/widgets/kcheckcombobox.cpp

https://invent.kde.org/pim/libkdepim/-/commit/bda4e47a7872769abbdfb82464585d379be34fb0