D23065: Remove usage of QWeakPointer for QObject

Frederik Gladhorn noreply at phabricator.kde.org
Sat Aug 10 09:35:30 BST 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190810/35a6c1a6/attachment.html>


More information about the kwin mailing list