D23070: Remove usage of QWeakPointer for QObject for thumbnails
Roman Gilg <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
romangg added a comment. In D23070#509761 <https://phabricator.kde.org/D23070#509761>, @gladhorn wrote: > See https://phabricator.kde.org/D23065 > > Using a QWeakPointer for QObjects works, but has been deprecated for around seven years. QPointer does the same cleanly (track life-time of QObjects). If you use .toStrongRef() on a QWeakPointer to a QObject without going through QSharedPointer you are in UB land. > In other words: this API is bad and will most likely be removed from Qt in the future. Thanks for the explanation. With "except in this one case" in the description you mean which case? Using it on QObjects? The API will most likely be removed, this means the whole concept of QWeakPointer? REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D23070 To: gladhorn, #kwin Cc: romangg, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart