Two KIO::AccessManager patches...

David Faure faure at kde.org
Thu Sep 24 18:33:21 BST 2009


On Thursday 24 September 2009, Dawit A. wrote:
> On Thursday 24 September 2009 04:42:03 David Faure wrote:
> > On Thursday 24 September 2009, Dawit A. wrote:
> > > Improved #2 Patch:
> > >
> > > Instead of chaning the QNetworkReply error code value which might
> >
> > have
> >
> > >  other ramifications, send the KIO error code as an attribute,
> >
> > specifically
> >
> > >  using the QNetworkRequest::UserMax attribute...
> >
> > Should there be a typedef for that enum value in AccessManager.h,
> > so that it's documented that this is the enum value used for it?
> 
> I guess it should, but we currently use QNetworkRequest::User in
> KIO::AccessManager already as well. 

Exactly. See how confusing it gets? :-)

> Perhaps we need our own enum
> and simply cast that away to QNetworkRequest::Attribute when used ?

Yes.

(And then I recommend that your enum uses
 {
  Value1 = QNetworkRequest::User,
  Value2
 }

(i.e. Value2=User+1, rather than UserMax). Then you can get a Value3 easily ;)

-- 
David Faure, faure at kde.org, sponsored by Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list