D23065: Remove usage of QWeakPointer for QObject
Frederik Gladhorn <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
gladhorn created this revision. Herald added a project: KWin. Herald added a subscriber: kwin. gladhorn requested review of this revision. REVISION SUMMARY This usage of QWeakPointer has been deprecated since Qt 5.0, since it leads to really confusing API - usually you must never dereference a QWeakPointer directly, but always go through QSharedPointer, except in this one case, where it's permissible. Use QPointer instead, which is clean. Only keep the QPointer where the object in question may get deleted, while in the API where it has to be valid, use a regular pointer. Initializing the pointer explicitly to nullptr makes no sense. REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D23065 AFFECTED FILES useractions.cpp useractions.h To: gladhorn Cc: kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, mart