> Sent: Tuesday, November 03, 2015 at 11:01 AM
> From: "Samuel Gaist" <[email protected]>
> To: "Jason H" <[email protected]>
> Cc: "[email protected]" <[email protected]>
> Subject: Re: [Interest] Subclassing QNetworkAccessManager not working
>
> 
> On 3 nov. 2015, at 16:51, "Jason H" <[email protected]> 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")
> > 
> > Also, what's this "data" scheme it supports?
> > 
> > [Please no comments about using HTTPS, I'm already using HTTPS where 
> > appropriate]
> > 
> > #include <QNetworkAccessManager>
> > 
> > class EncryptingNetworkManager: public QNetworkAccessManager {
> > public:
> >     EncryptingNetworkManager(QObject *parent = 0) : 
> > QNetworkAccessManager(parent)
> >     {
> >     }
> > 
> > protected slots:
> >     QStringList supportedSchemesImplementation() {
> >             QStringList schemes;
> >             schemes.push_back("aes");
> >             return schemes;
> >     }
> > };
> > 
> > int main(int argc, char *argv[])
> > {
> >     EncryptingNetworkManager enm;
> >     qDebug() << enm.supportedSchemes();
> > ...
> > 
> > }
> > 
> > --
> > Thanks
> > _______________________________________________
> > Interest mailing list
> > [email protected]
> > http://lists.qt-project.org/mailman/listinfo/interest
> 
> Hi,
> 
> You have a signature error: it's a const method
/

Well this is supposed to run through the signal/slot system which I don't think 
is const sensitive. It's not a conventional overload, per the binary 
compatibility restriction. Originally I had it as const too, then I found 
https://codereview.qt-project.org/#/c/93577/2/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp,unified
  Which has it as non-const, which reinforced my thinking of the const-ness not 
mattering.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to