I am using QtWebkit to implement a browser in C++/Qt. When I open a new tab in it with a QWebView instance and load a URL using load() the page loads normally, but when it's a site where I'm logged in using cookies, it'll appear as though I'm not logged in at all, due to the cookies for that page not being sent along with the HTTP request (verified using SocketSniff).
The only thing I think that might make a difference would be the custom cookiejar I created, but I'm unsure what it might be since the cookiejar works fine otherwise. You can find the full source code at the Github link on the project page for the browser: http://www.mayaposch.com/wildfox.php and the Github link: https://github.com/MayaPosch/WildFox
Any clues are welcome :)
Well, I at last found out what the problem was. I narrowed it down to the custom cookiejar I implemented, which has an in-memory structure containing new and accessed cookies, and stores non-session cookies in an SQLite structure on disk. The problem was that after first loading a site, it'd find cookies in the SQLite database, load them into the in-memory structure, but not use them.
Small glitch with big consequences and very easy to figure out once you get down to it. My sincere apologies for wasting your time with this question. Hopefully this answer will help someone, though :)