Maproom / qmapshack

Consumer grade GIS software
GNU General Public License v3.0
287 stars 64 forks source link

[QMS-630] on-the-fly routing cannot be canceled #631

Closed ntruchsess closed 1 year ago

ntruchsess commented 1 year ago

What is the linked issue for this pull request:

QMS-#630

What you have done:

comment: # enabled processing of userInterfaceEvents in local brouter synchronous request processing to allow cancellation of progress-dialog.

Steps to perform a simple smoke test:

  1. in router config dialog choose BRouter (offline)
  2. if not yet done install BRouter locally klicking Setup and make sure to successfully complete the brouter installation wizzard downloading some tiles that cover a lager area.
  3. zoom the map to a location that is covered by brouter routing data (see tiles download dialog in install wizzard).
  4. right click on the map, choose a point that is located on some street or path that is likely to be inclused in brouter routing data.
  5. zoom out and move to a location that of both some 100km away from the starting-point and also covered by brouter routing data.
  6. zoom in and place the mouse over a location that is likely to be covered by routing data.
  7. stop moving the mouse. On-the-fly routing should start.
  8. wait until a dialog with the title 'Please wait...' appears.
  9. click 'cancel' on this dialog. => the dialog closes, status area displays message in red: 'Routing: Bad response from server: Operation canceled'.

Does the code comply to the coding rules and naming conventions Coding Guidelines:

Is every user facing string in a tr() macro?

Did you add the ticket number and title into the changelog? Keep the numeric order in each release block.

ntruchsess commented 1 year ago

@kiozen when I implemented this in 2017 processing of userInputEvents in local Eventloop did cause a crash within Qt-library-code. Now in 2023 (I'm using Qt 5.15.6) processing userInputEvents in local Eventloop seems to work smooth, not causing crashes any more.