Bug 511093

Summary: [regression] randomly can't rename layer in layer docker
Product: [Applications] krita Reporter: Ming Chuan <ming>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ming Chuan 2025-10-25 13:17:18 UTC
SUMMARY

When click on layer name to rename the layers, the blinking vertical bar (text cursor) appears as normal, but when pressing the keyboard the keys bypasses it and triggers krita shortcut instead. For example, if I press A on the keyboard in order to rename the layer's name as "a", the freehand selection tool shortcut is triggered instead.

These logs might be relevant:
```
QObject::disconnect: wildcard call disconnects from destroyed signal of KisImage::draft
QAbstractItemView::commitData called with an editor that does not belong to this view
QAbstractItemView::closeEditor called with an editor that does not belong to this view
QAbstractItemView::commitData called with an editor that does not belong to this view
```

This issue started occurring in the past 2–3 days, so it's likely a recent regression on the master branch, could also be caused by qt 6.10 or wayland I guess.

ADDITIONAL INFORMATION

* Qt 6.10
* Wayland
* Krita git master (2025-10-25)
Comment 1 Halla Rempt 2025-10-30 11:01:23 UTC
I cannot reproduce with Qt 6.4 -- I don't have access to a newer version yet.
Comment 2 Ming Chuan 2025-11-05 00:48:09 UTC
It turns out the issue still randomly happens after reverting to older krita commit. It's more likely to be a qt 6.10 regression then.

Overall qt 6.10 makes widget rendering looks more "asynchronous" and faster, so maybe some change happened upstream
Comment 3 Halla Rempt 2025-11-05 09:55:36 UTC
Yes, that sounds like a Qt issue. But should we try to patch Qt, or report upstream?
Comment 4 Ming Chuan 2025-11-05 12:17:06 UTC
Although I can't reliably repro the bug, the "QAbstractItemView::closeEditor/commitData called with an editor that does not belong to this view" warnings fortunately happens every time I edit layer names.

The qt code that checks for the warning was added 2-3 years ago, but krita only starts hitting it qt 6.10

Regardless of this bug, perhaps krita's layer docker implementation should be to reviewed to confirm if krita are indeed using qt's API incorrectly as suggested by the warning message. If krita is indeed doing something incorrect then maybe fixing the warning message would also fix this bug
Comment 5 Halla Rempt 2025-11-05 15:09:55 UTC
I do think we have some weird things going on there, actually, because qt's listview editor thing is quite complex.