-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7055 from m-kuhn/wfsNoMainThreadEventLoopb
Avoid running QEventLoop on main thread (in WFS provider)
- Loading branch information
Showing
7 changed files
with
181 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66ad9d9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m-kuhn Hi Matthias, seeing this commit. My eye was pulled yesterday to this log msg which you get when you draw an xyz (eg OSM):
../src/providers/wms/qgswmsprovider.cpp: 617: (draw) [0ms] [thread:0x558840d62910] Trying to draw a WMS image on the main thread. Stop it!
Confirmed with a just compiled version now. Is that a call that a thread is stopped? Or is it asking devs to stop drawing in the main thread?
66ad9d9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rduivenvoorde in an idea world yes: there should be no blocking downloads done on the main thread.
The message is an advice for developers, no effect at the moment (except for an increased risk of crash in such a scenario).
This pull request is the first brick of a code refactoring to make things more stable (i.e. still not bullet proof, but the risk surface becomes smaller and is limited to cases when authentication is involved).
66ad9d9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m-kuhn what's the grand plan here?
66ad9d9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
66ad9d9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think indeed the online datasources will become more and more used. That is why I hope we can make QgsNetworkManager more user/python friendly (see qgis/QGIS-Enhancement-Proposals#123).
Also: what is https://qgis.org/pyqgis/master/core/Network/QgsNetworkContentFetcher.html becoming then? Looks to me as a second http-fetch class (though does not do POST?), isn't that a little redundant then?
66ad9d9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right thing to use in 90% of the cases when you are able and not so lazy to use blocking downloads.