PDA

View Full Version : Maybe I need reimplementing QNetworkCookieJar::allCookies() but don't know how



jiveaxe
17th February 2009, 15:58
Hi,
I'm experimenting with QNetworkAccessManager. I want to save in a file cookies of a request so I wrote:


QList<QNetworkCookie> cookieslist = manager->cookieJar()->allCookies();

but since QNetworkCookieJar::allCookies() is protected I got error compiling.

Perhaps I should reimplement this function but don't know how. Some tips?

Thanks

wysota
17th February 2009, 16:55
You should subclass QNetworkCookieJar and implement storing cookies in the subclass. Then use QNetworkAccessManager::setCookieJar() to set your own cookie jar for the access manager.