Comment 2 for bug 1675988

Revision history for this message
Stephen Lyons (slysven) wrote :

Humm, I remember this, commit-10649019416655df3e6499d83862b09e88f803ed {2016-02-18 19:34:01}

The QWidget then called "mpSearchArea" (but renamed there to widget_searchArea") was defined in the trigger_editor.ui file and was the container for all the search stuff, including the QComboBox that was the place to enter search terms, but in the dlgTriggerEditor constructor the value the pointer mpSearchArea pointed to was assigned a *DIFFERENT* widget namely the QTreeWidget tree_widget_search_results_main even though it seemed to be the "handle" for the whole of the search area. This didn't make sense to me.

I found the control labelled button_searchAreaClose and having a "close" style icon had it's clicked signal (it not being a "Checkable" button, clicked() would be sent on every activation) wired to a slot that toggled the state of the search area (as well as the big "Search" button) - for that to make sense it seemed to me that the "close" button would be expected to hide itself when clicked.

Together these gave me the impression that it was intended that clicking the "Search" button would show/hide the entire search area and that the "close" button would hide it. This was not happening as after the Search Area was brought up by the "Search" button the Search term entry box would not then go away!

Remember that the same "close" button icon also is used on the system message area on the top right of the editor and in that location it causes the system message area to hide itself completely.

It was my belief that I was fixing a bug when I recoded the behaviour to completely hide the search area.

Given that it is reported that some users want something other that want is currently the case it is feasible to add a second button perhaps called "button_searchAreaResultsHide" underneath the first which can clear/hide the *results* part of the search area i.e. that part with the identifier "treeWidget_searchResults" - I can visualise the sort of code to do this in an additional SLOT method to the dlgTrigggerEditor class.