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
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
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
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.
I did some grepping and didn't find anything obvious (which make sense since it would be crashy)
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<const ::Kdelibs4Migration *>(sipSrc)[sipSrcIdx]); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[cut]
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:181:27: error: call to deleted constructor of '::Kdelibs4Migration'sipCpp = new ::Kdelibs4Migration(*a0); ^ ~~~
[cut]
In file included from /data/kde/build/kcoreaddons/src/lib/pybuild/PyKF5/KCoreAddons/unifiedKCoreAddons.cpp:53:
/data/kde/build/kcoreaddons/src/lib/pybuild/PyKF5/KCoreAddons/sipKCoreAddonsKSharedDataCache.cpp:348:27: error: call to deleted constructor of '::KSharedDataCache'sipCpp = new ::KSharedDataCache(*a0); ^ ~~~