[Development] QContactLocalId in Qt5

Robin Burchell robin+qt at viroteck.net
Sun Oct 23 20:56:03 CEST 2011


As of commit 9453d77995d9d36661a3be97d91742da0b449d5e in QtPim,
QContactLocalId was changed from a quint32 to a QString.

I'm interested to know what the justifications for this change were
(unfortunately, there's no details in the commit message), because
this will have pretty nasty source-incompatible effects (which Qt5 is
supposed to avoid), such as in code as exposed by
qdeclarativecontact's autotests:

  445         QContactLocalIdFilter lif = df->filter();
  446         QVERIFY(lif.ids().size() == 3);
  447         QVERIFY(lif.ids().contains(1111));
  448         QVERIFY(lif.ids().contains(2222));
  449         QVERIFY(lif.ids().contains(3333));

This code no longer builds, because QString (correctly) cannot be
constructed from an integer (you need QString::number()).



More information about the Development mailing list