Skip to content

Commit

Permalink
Make QNetworkAccessManager::supportedSchemes virtual
Browse files Browse the repository at this point in the history
Change-Id: I6807e2133049551bbaa4c6f312b6a00ea752f81b
Reviewed-by: Timur Pocheptsov <[email protected]>
  • Loading branch information
Morten242 committed Aug 24, 2020
1 parent 4573d29 commit 081207d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
13 changes: 6 additions & 7 deletions src/network/access/qnetworkaccessmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,9 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
Lists all the URL schemes supported by the access manager.
\sa supportedSchemesImplementation()
Reimplement this method to provide your own supported schemes
in a QNetworkAccessManager subclass. It is for instance necessary
when your subclass provides support for new protocols.
*/
QStringList QNetworkAccessManager::supportedSchemes() const
{
Expand All @@ -1293,19 +1295,16 @@ QStringList QNetworkAccessManager::supportedSchemes() const

/*!
\since 5.2
\obsolete
Lists all the URL schemes supported by the access manager.
You should not call this function directly; use
QNetworkAccessManager::supportedSchemes() instead.
Reimplement this slot to provide your own supported schemes
in a QNetworkAccessManager subclass. It is for instance necessary
when your subclass provides support for new protocols.
Because of binary compatibility constraints, the supportedSchemes()
method (introduced in Qt 5.2) is not virtual. Instead, supportedSchemes()
will dynamically detect and call this slot.
method (introduced in Qt 5.2) was not virtual in Qt 5, but now it
is. Override the supportedSchemes method rather than this one.
\sa supportedSchemes()
*/
Expand Down
3 changes: 1 addition & 2 deletions src/network/access/qnetworkaccessmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ class Q_NETWORK_EXPORT QNetworkAccessManager: public QObject
explicit QNetworkAccessManager(QObject *parent = nullptr);
~QNetworkAccessManager();

// ### Qt 6: turn into virtual
QStringList supportedSchemes() const;
virtual QStringList supportedSchemes() const;

void clearAccessCache();

Expand Down

0 comments on commit 081207d

Please sign in to comment.