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

opt: GlobalNetworkAccessManager #1607

Conversation

shenlebantongying
Copy link
Collaborator

@shenlebantongying shenlebantongying commented Jun 21, 2024

Things happens in the main event loop can share the same QNetworkAccessManager

#974

Other than AnkiConnector and iframehandler, all QNetworkAccessManager are created by MainWindow, then passed down to various places. This means, if the old code is correct, then obtaining the pointer from global (pretty much the same as the MainWindow) is also correct.

We can further remove the netMgr parameter from loadDictioanries/editDictionaries. And instead, let dictionaries obtain a pointer to the globalNetworkAccessManager during initialization.


Random related things:

QThread::isMainThread in Qt6.8 qt/qtbase@a3d5011#diff-4bb5aaa078a4700cf1c8a805176a3d445f6b0408e526612cb0a13fb19f5bd1dbR429-R444

@shenlebantongying shenlebantongying marked this pull request as draft June 21, 2024 23:30
@shenlebantongying shenlebantongying deleted the opt/one-single-netMgr branch August 28, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant