Two KIO::AccessManager patches...

Dawit A. adawit at kde.org
Thu Sep 24 21:01:59 BST 2009


On Thursday 24 September 2009 13:33:21 David Faure wrote:
> 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? :-)

No argument from me there...

> > 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
>  ;)

That was exactly what I was going to do, i.e. add the following enum to 
KIO::AccessManager

enum Attribute {
   MetaData = QNetworkRequest::User,
   KioError
};

Then one can do KIO::AccessManager::MetaData etc etc...





More information about the kde-core-devel mailing list