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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user