<div dir="ltr"><div>Hello,</div><div><br></div><div>I noticed that in KWin we use a lot of smart pointers and we mix Qt and C++ standard library ones quite a lot. Judging by a few searches in frameworks repositories, it's a similar mix there.<br></div><div>I'd like to propose that going forwards we use C++ standard library smart pointers in new code and also port old code (where possible) away from Qt smart pointers, for the following reasons:</div><div>- it increases consistency, making code a little bit easier to read</div><div>- in the generalĀ  C++ community, smart pointers from the standard librariy are much more well known, which should make it a little bit easier for new contributors to settle in<br><div>- std::unique_ptr allows to properly express ownership transfers with move semantics, which QScopedPointer does not support</div><div>- std::shared_ptr is more efficient than QSharedPointer, it has half the overhead on reference changes</div><div><br></div><div>What do you all think?</div><div><br></div><div>Greetings,</div><div>Xaver<br></div></div></div>