Hi,

https://bugreports.qt.nokia.com/browse/QTBUG-1072 

This bug is essentially a request to change the QAIM API:

    virtual void fetchMore(const QModelIndex &parent);
    virtual bool canFetchMore(const QModelIndex &parent) const;

into:


    virtual void fetchMore(const QModelIndex &parent, Qt::Orientation 
orientation = Qt::UnspecifiedOrientation);
    virtual bool canFetchMore(const QModelIndex &parent, Qt::Orientation 
orientation = Qt::UnspecifiedOrientation) const;

(A new enum value of UnspecifiedOrientation would also be needed)

I think it makes sense, but that is an often used and overridden virtual 
method, and changing it would not make the compiler notify about the porting 
need (Can't expect downstream to be using Q_DECL_OVERRIDE already).

I tried various other tricks like Q_DECL_FINAL to prevent overriding the wrong 
signature (success - clang trunk gave an error for the derivation before 
porting) Q_DECL_EQ_DELETE to delete the old method signature (failure - clang 
trunk compiled with no error. Understandable), and changing the return type 
(success - clang gives an error for the derivation before porting).

In the cases where an error is given for the deriving code (before porting), 
calling code still can't compile because the call is ambiguous anyway.

I had an interesting play with new C++ keywords, but is there any elegant 
solution to all this?

Thanks,

-- 
Stephen Kelly <stephen.ke...@kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to