KDE/kdevplatform/vcs

Andreas Pakulat apaku at gmx.de
Sat Dec 8 15:54:30 UTC 2007


SVN commit 746291 by apaku:

Improve API docs with some explanations about the QVariant wrapping of the special types.

Should we generally allow only creating the specialtype QVariant with only the template-parameter call to qVariantFromValue and thus tread QVariant(int) as a simple number?

CCMAIL:kdevelop-devel at kdevelop.org

 M  +17 -1     vcsrevision.h  


--- trunk/KDE/kdevplatform/vcs/vcsrevision.h #746290:746291
@@ -42,8 +42,24 @@
  * <tr><td>GlobalNumber</td><td>qlonglong</td></tr>
  * <tr><td>FileNumber</td><td>qlonglong</td></tr>
  * <tr><td>Date</td><td>QDateTime</td></tr>
- * <tr><td>Special</td><td>KDevelop::VcsRevision::RevisionSpecialType</td></tr>
+ * <tr><td>Special</td><td>KDevelop::VcsRevision::RevisionSpecialType or int, see explanation below</td></tr>
  * </table>
+ * 
+ * The vcs plugins need to register the Revision and RevisionSpecialType with
+ * qRegisterMetaType. 
+ * 
+ * Also Users of this class should set RevisionSpecialType QVariant values via
+ * <code>
+ * setRevisionValue( qVariantFromValue<KDevelop::VcsRevision::RevisionSpecialType>( val ), KDevelop::VcsRevision::Special);
+ * </code>
+ * instead of
+ * <code>
+ * setRevisionValue( qVariantFromValue( val ), KDevelop::VcsRevision::Special);
+ * </code>
+ * 
+ * If the latter method is used the QVariant will be an Integer, which might not 
+ * be handled by the vcs plugin and is possibly ambiguous with the qlonglong
+ * parameters.
  *
  */
 class KDEVPLATFORMVCS_EXPORT VcsRevision




More information about the KDevelop-devel mailing list