D9160: QList -> QVector where sizeof(type) > sizeof(T*)

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Mon Dec 4 14:41:39 UTC 2017


kossebau added a comment.


  In https://phabricator.kde.org/D9160#175583, @mwolff wrote:
  
  > In https://phabricator.kde.org/D9160#175540, @brauch wrote:
  >
  > > Hmm, this will break build of all the plugins, no?
  >
  
  
  Yes, needs adaption of some plugins, have that locally prepared for kdevpython/php at least already. Would be pushing the fixes as follow-ups once this patch is in. Want to see the diff for those as well first?
  
  >> Only thing I'm sceptical about is QStringList, esp. in tests or so it can have useful  API over QVector<QString> ... but ok, if none of that is needed, fine ;)
  > 
  > `QString` has `sizeof(void*)`, this change should not touch it. Why did you do that Friedrich?
  
  The change in test_quickopen.cpp from QStringList to QVector<QString> is needed to match the change in the API of `template<class Item, class Parent> class KDevelop::PathFilter` from QList to QVector. Which is done because of most if not all `Item` used being bigger than a pointer size, just the test here uses QString for Item for some simple to test type. (see `setItems(const QVector<Item>& data)` & Co).
  Perhaps worth a comment in the test code, to make that more obvious?
  
  Other than that there should be no QStringList -> QVector change. Did I trick myself somewhere?

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D9160

To: kossebau, #kdevelop
Cc: mwolff, brauch, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171204/cad7c212/attachment.html>


More information about the KDevelop-devel mailing list