-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21aeb27
commit 9fa2e4b
Showing
6 changed files
with
46 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include <QNetworkAccessManager> | ||
|
||
/* | ||
* Notes: | ||
* | ||
* This MUST be used only in the main/UI thread | ||
* | ||
* Retaining a pointer in objects to this globalNetworkAccessManager is OK. | ||
* Having a pointer to it reduce minor overhead of global object accessing. | ||
* | ||
*/ | ||
|
||
#if ( QT_VERSION < QT_VERSION_CHECK( 6, 4, 0 ) ) | ||
Q_GLOBAL_STATIC( QNetworkAccessManager, GlobalNetAccessMgr ); | ||
#else | ||
#include <qapplicationstatic.h> | ||
Q_APPLICATION_STATIC( QNetworkAccessManager, GlobalNetworkAccessManager ); | ||
|
||
#endif |
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