That is unlikely to work properly, njarobj is on the stack and will go out of scope at then end of the block (probably a function body).
You don't need a derived class if you don't want to change anything that QNetworkCookieJar does
QNetworkCookieJar does not persist cookies. Any derived class that implements persistence needs to address this depending on the persistence mechanism chosen for its implementation.
Or using explicit save/load methods that get called at the end/start of the program.
Indeed a valid option.
That seems to ignore the "url" argument, which will likely make it difficult to then later retrieve the cookies for that URL.
Cheers,
_






Reply With Quote
Bookmarks