Hi Jason, I did not find in your code chunk, where you created the object for QNetworkCookieJar instead of SalorCookieJar.
If you miss doing that, You can refer to the way how its implemented in QtTestBrowser. Refer to the way how the TestBrowserCookieJar is used with networkAccessManager -Sri On Sat, Jan 21, 2012 at 5:28 PM, Jason Martin <[email protected] > wrote: > Hey All, > > I am trying to implement filesystem storage of cookie. I have overidden > the methods suggested, however, during use of the browser widget, only > one of those methods is ever called: setCookiesFromUrl. > > I have placed qDebug() splats at the top of cookiesForUrl and allCookies > and setAllCookies, the functions that read the stored files. > > Could anyone give me a pointer, or some information or an example that > might help? > > Thanks in advance! > /Jason Knight > > Here is the header file: > > class SalorCookieJar : public QNetworkCookieJar > { > Q_OBJECT > public: > explicit SalorCookieJar(QObject *parent = 0); > bool setCookiesFromUrl ( const QList<QNetworkCookie> & cookieList, > const QUrl & url ); > QList<QNetworkCookie> cookiesForUrl ( const QUrl & url ); > protected: > void setAllCookies( const QList<QNetworkCookie> & cookieList ); > QList<QNetworkCookie> allCookies(); > private: > QList<QNetworkCookie> * p_cookies; > QList<QNetworkCookie> p_ParseCookie(QString file); > QString p_CookiePath(QUrl url) { > ... > } > signals: > > public slots: > > }; > > > > And here is the c code: > > > > SalorCookieJar::**SalorCookieJar(QObject *parent) : > QNetworkCookieJar(parent) > { > QList<QNetworkCookie> * cookies = new QList<QNetworkCookie>(); > this->p_cookies = cookies; > } > > bool SalorCookieJar::**setCookiesFromUrl ( const QList<QNetworkCookie> & > cookieList, const QUrl & url ) { > qDebug() << "setCookiesFromUrl"; // This is the only splat that shows > up... > ... > return true; > } > QList<QNetworkCookie> SalorCookieJar::cookiesForUrl ( const QUrl & url ) { > qDebug() << "cookiesForUrl"; > QString fname = this->p_CookiePath(url); > return this->p_ParseCookie(fname); > } > QList<QNetworkCookie> SalorCookieJar::allCookies() { > qDebug() << "allCookiesCalled"; > ... > return *cookies; > } > QList<QNetworkCookie> SalorCookieJar::p_ParseCookie(**QString fname) { > qDebug() << "p_ParseCookie called with: " << fname; > ... > return *cookies; > } > void SalorCookieJar::setAllCookies(**const QList<QNetworkCookie> > &cookieList) { > qDebug() << "setAllCookies Called"; > ... > } > > ______________________________**_________________ > webkit-qt mailing list > [email protected] > http://lists.webkit.org/**mailman/listinfo.cgi/webkit-qt<http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt> > -- -Sri
_______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
