[Bug 304020] Come up with a standardised less-rubbish way of setting versions
Daniele E. Domenichelli
daniele.domenichelli at gmail.com
Fri Nov 2 11:16:19 GMT 2012
https://bugs.kde.org/show_bug.cgi?id=304020
--- Comment #3 from Daniele E. Domenichelli <daniele.domenichelli at gmail.com> ---
(In reply to comment #2)
> There should be no ABI breaks between 0.5.x versions of common-internals or
> API additions (consider 3rd party apps using it, like webaccounts).
> Therefore knowing the compile time version is irrelevant. (right?)
Uh yes, that's right... but what if one 0.5 component can be compiled with
common internal 0.4
I think that at the moment we are not doing any check on common internal
version
Imho we should make a check in each component
KTP_VERSION_MAJOR == KTP_{COMPONENT}_VERSION_MAJOR AND KTP_VERSION_MINOR ==
KTP_{COMPONENT}_VERSION_MINOR
in order to enforce that you need the same version
> I suggest a static method in the library that returns the version.
I agree with the static method... something like "QString KTp::version()"
should be enough, but if we need to make some checks we can add also "int
KTp::versionMajor()", int KTp::versionMinor()" and "int KTp::versionPatch()"
We could use it in main() when setting the version so that we get it when you
run xxxx --version.
At the moment the --version prints:
$ ktp-contactlist --version
Qt: 4.8.2
KDE Development Platform: 4.8.4 (4.8.4)
KDE Telepathy Contact List: 0.5.1
I'm not sure about the meaning of the KDE Development Platform version in
brackets but perhaps we can have 0.5.1 (0.5.1) where the second version is the
ktp-common-internals one.
Another interesting thing to print is tp-qt version...
Also Qt has some define to make checks at compile time... even I believe this
is not necessary for us, it might be useful for someone else that wants to use
the library and wants to support more than one version. I don't want to
over-engineer this, but since we are deciding how to handle it, it is worth to
have a look around at what the others are doing. Here are some useful links:
* http://qt-project.org/doc/qt-4.8/qtglobal.html
* http://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/group__KDEMacros.html
*
http://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/namespaceKDE.html#aa7220767389d3c119ac8cf38bf333c55
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kde-telepathy-bugs
mailing list