Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'esc' did not close Find bar during test of 3.10.0dev #692

Open
caver456 opened this issue Nov 1, 2023 · 3 comments
Open

'esc' did not close Find bar during test of 3.10.0dev #692

caver456 opened this issue Nov 1, 2023 · 3 comments

Comments

@caver456
Copy link
Collaborator

caver456 commented Nov 1, 2023

This happened during test/demo at R5, 10/26/23. Clicking a row in the find popup was the only way to close the find bar (and popup). Need to check the transcript.

@caver456
Copy link
Collaborator Author

Looking in the log files from that test/demo night, there are some interesting sequences:

173921:updating fsLog (fleetsync): fleet=100 dev=2018 callsign=<None>  COM port=COM3
175041:ERROR: there are no entries that match both the time and the text selected from the search result popup
175041:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175042:ERROR: there are no entries that match both the time and the text selected from the search result popup
175043:ERROR: there are no entries that match both the time and the text selected from the search result popup
175043:ERROR: there are no entries that match both the time and the text selected from the search result popup
175043:ERROR: there are no entries that match both the time and the text selected from the search result popup
175043:ERROR: there are no entries that match both the time and the text selected from the search result popup
175134:openNewEntry called:key=False callsign=None formattedLocString=None fleet=None dev=None origLocString=None amendFlag=False amendRow=None isMostRecentForCallsign=False
175134:newEntryWidget __init__ called: formattedLocString=None fleet=None dev=None origLocString=None amendFlag=False amendRow=None isMostRecentForCallsign=False
175134:newEntryWidget.addTab called: labelText=1751  widget=<__main__.newEntryWidget object at 0x09904898>
175134:inserting tab
175136:restoring completer popup
175136:ERROR: there are no entries that match both the time and the text selected from the search result popup
175136:ERROR: there are no entries that match both the time and the text selected from the search result popup
175137:ERROR: there are no entries that match both the time and the text selected from the search result popup
175137:ERROR: there are no entries that match both the time and the text selected from the search result popup
175137:ERROR: there are no entries that match both the time and the text selected from the search result popup
175137:ERROR: there are no entries that match both the time and the text selected from the search result popup
175137:ERROR: there are no entries that match both the time and the text selected from the search result popup
175137:ERROR: there are no entries that match both the time and the text selected from the search result popup
175138:ERROR: there are no entries that match both the time and the text selected from the search result popup
175138:ERROR: there are no entries that match both the time and the text selected from the search result popup
175201:openNewEntry called:key=False callsign=None formattedLocString=None fleet=None dev=None origLocString=None amendFlag=False amendRow=None isMostRecentForCallsign=False
175201:newEntryWidget __init__ called: formattedLocString=None fleet=None dev=None origLocString=None amendFlag=False amendRow=None isMostRecentForCallsign=False
175201:newEntryWidget.addTab called: labelText=1752  widget=<__main__.newEntryWidget object at 0x0990D2B0>
175201:inserting tab
175204:restoring completer popup
175205:ERROR: there are no entries that match both the time and the text selected from the search result popup
175205:ERROR: there are no entries that match both the time and the text selected from the search result popup
175206:ERROR: there are no entries that match both the time and the text selected from the search result popup
175206:ERROR: there are no entries that match both the time and the text selected from the search result popup
175206:ERROR: there are no entries that match both the time and the text selected from the search result popup
175206:ERROR: there are no entries that match both the time and the text selected from the search result popup
175206:ERROR: there are no entries that match both the time and the text selected from the search result popup
175206:ERROR: there are no entries that match both the time and the text selected from the search result popup
175239:ERROR: there are no entries that match both the time and the text selected from the search result popup
175239:ERROR: there are no entries that match both the time and the text selected from the search result popup
175239:ERROR: there are no entries that match both the time and the text selected from the search result popup
175239:ERROR: there are no entries that match both the time and the text selected from the search result popup
175239:ERROR: there are no entries that match both the time and the text selected from the search result popup
175239:ERROR: there are no entries that match both the time and the text selected from the search result popup
175320: ...

This raises a few questions:

  1. why is the ERROR line getting called so much?
    that line is inside findDialog.processChangedSelection (which gets called when the mouse enters findDialog, and when the completer selection changed (by moving the mouse up or down the list of matches?) and only gets called if there are no common indices in the match lists, as the message says. Can do some more testing and debugging here before making any code changes. Clearly something is fubar in the 'commonIndices' logic.

  2. why is 'restoring completer popup' getting called?
    that line is inside newEntryWindow.removeTab, and only gets called if the count before removal is 4 and the findDialog is visible. Can also do some more testing and debugging before making any code changes.

If these both remain elusive after some more testing, then some more debug log code can be added.

@caver456
Copy link
Collaborator Author

caver456 commented Nov 11, 2023

Managed to get the ERROR line to print once, for this scenario:
image

All new entries were spawned by fleetsync. These log lines show up while hovering the mouse up and down through the list of matches:

205018:mouse enter: findField="2048 : Team 1 : STARTING ASSIGNMENT"  row 1 : 2048 : Team 1 : STARTING ASSIGNMENT
205018:  teamName=Team 1  extTeamName=z_Team00001  tabIndex=1
205018:  match rows by time:[0, 1]
205018:  match rows by text:[0]
205018:mouse enter: findField="2048 : Team 1 : STARTING ASSIGNMENT"  row 1 : 2048 : Team 1 : STARTING ASSIGNMENT
205018:  teamName=Team 1  extTeamName=z_Team00001  tabIndex=1
205018:  match rows by time:[0, 1]
205018:  match rows by text:[0]
205024:mouse enter: findField="2048 : Team 1 : STARTING ASSIGNMENT"  row 3 : 2049 : Team 1 : STARTING ASSIGNMENT
205024:  teamName=Team 1  extTeamName=z_Team00001  tabIndex=1
205024:  match rows by time:[2, 3]
205024:  match rows by text:[0]
205024:ERROR: there are no entries that match both the time and the text selected from the search result popup
205024:mouse enter: findField="2049 : Team 1 : STARTING ASSIGNMENT"  row 3 : 2049 : Team 1 : STARTING ASSIGNMENT
205024:  teamName=Team 1  extTeamName=z_Team00001  tabIndex=1
205024:  match rows by time:[2, 3]
205024:  match rows by text:[0]
205024:ERROR: there are no entries that match both the time and the text selected from the search result popup

seems like 'match rows by text' is only returning the first match instead of all matches...?

@caver456
Copy link
Collaborator Author

yup, adding the -1 arg at the end of the model.match call allows it to return all matches; by default it only returns the first match.
See QAbstractItemView.match.

So, it >should< be the case that the ERROR lines above will never be encountered again. Instead, the WARNING line shows as expected:

210642:mouse enter: findField="2105 : Team 1 : STARTING ASSIGNMENT"  row 1 : 2105 : Team 1 : STARTING ASSIGNMENT
210642:  teamName=Team 1  extTeamName=z_Team00001  tabIndex=1
210642:  match rows by time 2105:[0, 1, 2, 3]
210642:  match rows by text "STARTING ASSIGNMENT":[0, 1, 2, 3]
210642:WARNING: there are multiple entries that match the time and text selected from the search result popup; selecting the first one

This might answer question 1 above, but doesn't address question 2, which may actually be expected behavior.

Also, it doesn't address the main question in the title of this issue.

So, probably best to go ahead and release 3.10.0 with code that uses the -1 argument and also adds the log lines as above, plus some more logging to show when the find dialog is opened and closed.

Leaving this issue open since none of this actually fixes it.

caver456 added a commit that referenced this issue Nov 11, 2023
call model.match with -1 to get all matches by text; add logging lines to help debug #692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant