[Development] Qt 5.2 header diff: QtWidgets

Marc Mutz marc.mutz at kdab.com
Tue Nov 5 18:22:29 CET 2013


On Tuesday, November 05, 2013 17:51:25 Thiago Macieira wrote:
> On terça-feira, 5 de novembro de 2013 11:09:48, Giuseppe D'Angelo wrote:
> > >   class Q_WIDGETS_EXPORT QMacCocoaViewContainer : public QWidget
> > >   {
> > >   
> > >       Q_OBJECT
> > >   
> > >   public:
> > > -    QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent =
> > > 0); +    QMacCocoaViewContainer(NSView *cocoaViewToWrap, QWidget
> > > *parent = 0);
> > > 
> > >       virtual ~QMacCocoaViewContainer();
> > > 
> > > -    void setCocoaView(void *cocoaViewToWrap);
> > > -    void *cocoaView() const;
> > > +    void setCocoaView(NSView *view);
> > > +    NSView *cocoaView() const;
> > > 
> > >   private:
> > >       Q_DECLARE_PRIVATE(QMacCocoaViewContainer)
> > 
> > Isn't this binary and source incompatible?
> 
> Yes.
> 
> Technically speaking, the cocoaView() const member is still binary
> compatible because we're talking about a Mac here and we know its ABI does
> not encode return types (except for template functions, which this one
> isn't).

And it very probably is source compatible, because assignemnt to void* still 
works, and casts to NSView*, too.

> But the constructor and the setter are definitely binary incompatible.

But can be overloaded on the new types, right.



More information about the Development mailing list