When entering rename pattern in the file rename dialog, pressing the clear text on the input field does nothing. Reproducible: Always Steps to Reproduce: 1. Select an image or images 2. Select "Image -> Rename" 3. Enter text in the "rename pattern" input. 4. Try to clear the text by pressing the small 'x' on right of input field. Actual Results: Nothing happens Expected Results: The input field should be cleared. Same behavior in the rename file option of the batch manager.
Hello there, Just took a quick peek at the code. The widget used is ProxyLineEdit defined in libs/widgets/common/comboboxutilities.cpp This widget overrides the input events of KLineEdit for some reason, found just this comment there: /** * We just re-implement all relevant QWidget event handlers and call * the QWidget implementation, not the KLineEdit one. */ As one can see from here, the signal is being emited in KLineEdit implementation, and is not therefore ever emited in this case: http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/klineedit_8cpp_source.html#l01144 Marcel probably has insight why it was done so, added to CC.
(In reply to Teemu Rytilahti from comment #1) > Hello there, > > Just took a quick peek at the code. > The widget used is ProxyLineEdit defined in > libs/widgets/common/comboboxutilities.cpp > This widget overrides the input events of KLineEdit for some reason, found > just this comment there: > /** > * We just re-implement all relevant QWidget event handlers and call > * the QWidget implementation, not the KLineEdit one. > */ > > As one can see from here, the signal is being emited in KLineEdit > implementation, and is not therefore ever emited in this case: > http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/klineedit_8cpp_source. > html#l01144 > > Marcel probably has insight why it was done so, added to CC. Hi, I just changed the mousePressEvent and mouseReleaseEvent to KLineEdit's implementation and it seems to work, although I'm not sure why it was avoided in the first place. So i'll hold onto making the patch until it's confirmed that there's no problems involved.
I don't know exactly why QWidget is used instead KLineEdit to call parent methods in ProxyLineEdit. Marcel, any feedback about this topic please... Gilles Caulier
Anyway, look where is used comboboxutilities.h : - Advanced Searches dialog : ratingsearchutilities.h choisesearchutilities.h searchutilities.h - Rename tool : advancedrenameinput.h - Album combobox selector used in many place in digiKam : albumselectcombobox.h So, if you patch comboboxutilities.h about calling KLineEdit instead QWidget, you need to check if regression are introduced in all ProxyLineEdit children classes. Gilles Caulier
> So, if you patch comboboxutilities.h about calling KLineEdit instead > QWidget, you need to check if regression are introduced in all ProxyLineEdit > children classes. > > Gilles Caulier I tested it out on a couple of parameters, and I haven't experienced any problems so far. It seems to work on parameters which are not text entries as well. I don't know what the album combobox selector is in the application, sorry. How can I use it? I checked it out on the rest of the dialogues, and it seems to work fine. I think the only anamoly that I found was in the advanced rename input-- when you clear the text, and enter a new name, the clear button gets disabled. I don't know if that's the intended behaviour or if it needs to be changed.
Look in Maintenance tool, there are combobox to select albums or tags to process on top of dialog. It's also available in left sidebar, to Fuzzy Seach view, on the bottom. Look also Scan for Face dialog, on the bottom. Gilles Caulier
Got it. I tested it on all the options you've mentioned, and it seems to work fine. Clearing it sets it to 'Any album' which, I think, is the expected option. Should I send in the patch?
Attach the patch this this file. Gilles Caulier
Created attachment 89366 [details] Fix Clear text button working
Git commit 64cdd14274352575e26b47a5baacb59f4ea105de by Gilles Caulier. Committed on 29/10/2014 at 22:14. Pushed by cgilles into branch 'master'. Apply patch #89366 to make clear text button usable. FIXED-IN: 4.5.0 M +2 -1 NEWS M +11 -9 libs/widgets/common/comboboxutilities.cpp http://commits.kde.org/digikam/64cdd14274352575e26b47a5baacb59f4ea105de