Two KIO::AccessManager patches...

Dawit A. adawit at kde.org
Thu Sep 24 21:14:46 BST 2009


Attached is the adjusted patch...

On Thursday 24 September 2009 16:01:59 Dawit A. wrote:
> 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...
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: accessmanager.patch
Type: text/x-patch
Size: 3415 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090924/ed82cedd/attachment.bin>


More information about the kde-core-devel mailing list