[Interest] Subclassing QNetworkAccessManager not working

Jason H jhihn at gmx.com
Tue Nov 3 17:23:04 CET 2015


> Sent: Tuesday, November 03, 2015 at 11:18 AM
> From: "Thiago Macieira" <thiago.macieira at intel.com>
> To: interest at qt-project.org
> Subject: Re: [Interest] Subclassing QNetworkAccessManager not working
>
> On Tuesday 03 November 2015 16:51:48 Jason H wrote:
> > I am experimenting with creating my own scheme. Per the documentation at
> > http://doc.qt.io/qt-5/qnetworkaccessmanager.html#supportedSchemes I am to
> > provide a protected slot, which will be hooked up by the MOC. However I am
> > only ever getting the default implementation: I got:
> > ("ftp", "file", "qrc", "http", "https", "data")
> > I expected:
> > ("aes")
> 
> You need to provide a slot, but it's called supportedSchemesImplementation.


Didn't I already do that? Here it is again:
class EncryptingNetworkManager: public QNetworkAccessManager {
public:
	EncryptingNetworkManager(QObject *parent = 0) : QNetworkAccessManager(parent){}

protected slots:
	QStringList supportedSchemesImplementation() const { // const or not it does not work
		QStringList schemes;
		schemes.push_back("aes");
		return schemes;
	}
};



More information about the Interest mailing list