[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] Duplicate methods for QByteArray::data()
From:       Chris Burel <chrisburel () gmail ! com>
Date:       2009-11-06 22:43:26
Message-ID: 7d7416600911061443m3ab25454pf91a57ed623a6978 () mail ! gmail ! com
[Download RAW message or body]

> There are some use cases, especially in QtDBus, where
> you need the 'const' version of a method. Depending on whether the method is
> const or not the returned value differs.

Really?  The only thing that looks different is the call to detach().
And if you really want the const data, couldn't you use constData?
inline char *QByteArray::data()
{ detach(); return d->data; }
inline const char *QByteArray::data() const
{ return d->data; }
inline const char *QByteArray::constData() const
{ return d->data; }
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic