D18137: delete copy constructor and assignment operator of some public classes

2019-01-17 Thread Albert Astals Cid
aacid added a comment.


  The magic to generate sip files was not magic enough
  
  https://phabricator.kde.org/D18345

REPOSITORY
  R244 KCoreAddons

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

To: aacid, mpyne
Cc: cgiboudeaux, mpyne, kde-frameworks-devel, michaelh, ngraham, bruns


D18137: delete copy constructor and assignment operator of some public classes

2019-01-17 Thread Christophe Giboudeaux
cgiboudeaux added a comment.


  This is causing an error when building the python bindings:
  
  > In file included from 
/data/kde/build/kcoreaddons/src/lib/pybuild/PyKF5/KCoreAddons/unifiedKCoreAddons.cpp:15:
  >  
/data/kde/build/kcoreaddons/src/lib/pybuild/PyKF5/KCoreAddons/sipKCoreAddonsKdelibs4Migration.cpp:134:65:
 error: overload resolution selected deleted operator '='
  > 
  >   reinterpret_cast< ::Kdelibs4Migration *>(sipDst)[sipDstIdx] = 
*reinterpret_cast< ::Kdelibs4Migration *>(sipSrc);
  >   ~~~ ^ 
~
  > 
  > /data/kde/src/kcoreaddons/src/lib/util/kdelibs4migration.h:85:24: note: 
candidate function has been explicitly deleted
  > 
  >   Kdelibs4Migration &operator=(const Kdelibs4Migration &) = delete;
  >  ^
  > 
  > In file included from 
/data/kde/build/kcoreaddons/src/lib/pybuild/PyKF5/KCoreAddons/unifiedKCoreAddons.cpp:15:
  >  
/data/kde/build/kcoreaddons/src/lib/pybuild/PyKF5/KCoreAddons/sipKCoreAddonsKdelibs4Migration.cpp:148:17:
 error: call to deleted constructor of '::Kdelibs4Migration'
  > 
  >   return new  ::Kdelibs4Migration(reinterpret_cast(sipSrc)[sipSrcIdx]);
  >   ^   
~

REPOSITORY
  R244 KCoreAddons

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

To: aacid, mpyne
Cc: cgiboudeaux, mpyne, kde-frameworks-devel, michaelh, ngraham, bruns


D18137: delete copy constructor and assignment operator of some public classes

2019-01-10 Thread Albert Astals Cid
This revision was automatically updated to reflect the committed changes.
Closed by commit R244:44b91ba50d2f: delete copy constructor and assignment 
operator of some public classes (authored by aacid).

REPOSITORY
  R244 KCoreAddons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18137?vs=49109&id=49186

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

AFFECTED FILES
  src/lib/caching/kshareddatacache.h
  src/lib/util/kdelibs4configmigrator.h
  src/lib/util/kdelibs4migration.h

To: aacid, mpyne
Cc: mpyne, kde-frameworks-devel, michaelh, ngraham, bruns


D18137: delete copy constructor and assignment operator of some public classes

2019-01-10 Thread Albert Astals Cid
aacid added a comment.


  I did some grepping and didn't find anything obvious (which make sense since 
it would be crashy)

REPOSITORY
  R244 KCoreAddons

BRANCH
  master

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

To: aacid, mpyne
Cc: mpyne, kde-frameworks-devel, michaelh, ngraham, bruns


D18137: delete copy constructor and assignment operator of some public classes

2019-01-09 Thread Michael Pyne
mpyne accepted this revision.
mpyne added a comment.
This revision is now accepted and ready to land.


  The KSharedDataCache change is definitely correct. I've not done much with 
the kdelibs migrator but I agree with the logic and the implementation. Have 
you tried building some of the other frameworks or Plasma after implementing 
this patch? That's the only real risk I can think of.

REPOSITORY
  R244 KCoreAddons

BRANCH
  master

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

To: aacid, mpyne
Cc: mpyne, kde-frameworks-devel, michaelh, ngraham, bruns


D18137: delete copy constructor and assignment operator of some public classes

2019-01-09 Thread Albert Astals Cid
aacid created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
aacid requested review of this revision.

REVISION SUMMARY
  If someone was using them, it'd crash since it was raw-copying the d pointer
  so you would end up with a double delete.
  
  This is BIC, but IMHO it's fine, whoever gets a compiler failure has a bug to 
fix

REPOSITORY
  R244 KCoreAddons

BRANCH
  master

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

AFFECTED FILES
  src/lib/caching/kshareddatacache.h
  src/lib/util/kdelibs4configmigrator.h
  src/lib/util/kdelibs4migration.h

To: aacid
Cc: kde-frameworks-devel, michaelh, ngraham, bruns