[Development] QML import versions
Olivier Goffart
olivier at woboq.com
Mon Sep 21 07:51:56 CEST 2015
On Friday 18. September 2015 15:12:22 Nurmi J-P wrote:
[...]
> What makes the situation even more cumbersome, to ourselves who develop
> these modules, is that there's no convention on how new properties are
> revisioned. Some classes are using a running revision number that gets
> incremented whenever new members are added, whereas others match it with
> the minor version of the module or Qt.
>
> - QQuickImage
> - rev 1 in QtQuick 2.3
> - rev 2 in QtQuick 2.5
>
> - QQuickMouseArea
> - rev 1 in QtQuick 2.4
> - rev 2 in QtQuick 2.5
>
> - QQuickText
> - rev 2 in QtQuick 2.2
> - rev 3 in QtQuick 2.3
> - rev 6 in QtQuick 2.6
>
> Now, mix meta revisions with inheritance and it gets interesting...
I've always found that tyhe revision system is broken by design.
(Because of the mainingless of the version number, because of the inheriting,
because it's of little use anyway for we always do behaviour changes and the
likelyhood of a name clash is not the worst)
Here was my proposal:
class QQuickImage {
Q_CLASS_INFO("Qt.Module","QtQuick")
Q_PROPERTY(int rating MEMBER m_rating NOTIFY ratingChanged SINCE 2.6)
public slots:
Q_SINCE(2.6) void shareOnSocialMedia();
};
The Q_SINCE could even be parsed by qdoc and be an alternative to the \since
Alternatives: "SINCE QtQuick 2.6" ;
Q_ANNOTATE(SINCE, 2.6)
As for the import discussion, my vote goes to
import QtQuick; // takes whatever version
--
Olivier
Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
More information about the Development
mailing list