2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-27 15:25:58 +00:00

Replace QSharedPointer with std::shared_ptr.

This commit is contained in:
John Preston
2017-12-18 13:07:18 +04:00
parent cbbccd0364
commit 14034c255e
46 changed files with 215 additions and 185 deletions

View File

@@ -38,9 +38,11 @@ bool ClickHandler::setActive(const ClickHandlerPtr &p, ClickHandlerHost *host) {
// other pressed click handler currently, if there is
// this method will be called when it is unpressed
if (_active && *_active) {
auto emitClickHandlerActiveChanged = (!_pressed || !*_pressed || *_pressed == *_active);
auto wasactive = *_active;
(*_active).clear();
const auto emitClickHandlerActiveChanged = false
|| !_pressed
|| !*_pressed
|| (*_pressed == *_active);
const auto wasactive = base::take(*_active);
if (_activeHost) {
if (emitClickHandlerActiveChanged) {
_activeHost->clickHandlerActiveChanged(wasactive, false);