Project

General

Profile

Actions

Bug #11932

closed

Assigning a new WPopupMenu to a WPushButton that already contains a WPopupMenu

Added by Matthias Van Ceulebroeck over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
09/12/2023
Due date:
% Done:

100%

Estimated time:

Description

When WPushButton::setMenu() is used, the WPopupMenu is moved to the button, so that when the button is removed, the popup is also cleared.
However, move semantics appear to be misbehaving here?

unique_ptr's documentation states:

The object is disposed of, using the associated deleter when either of the following happens:

    - the managing unique_ptr object is assigned another pointer via operator= or reset().

If however, the button is already managing a popup, the original popup is deleted, but the move that would assign the new popup to the button, does not go through. Essentially removing both popups.

Actions #1

Updated by Matthias Van Ceulebroeck over 1 year ago

  • Status changed from InProgress to Review
  • Assignee deleted (Matthias Van Ceulebroeck)
Actions #2

Updated by Matthias Van Ceulebroeck over 1 year ago

  • Assignee set to Yoika Ghysens
Actions #3

Updated by Matthias Van Ceulebroeck over 1 year ago

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Yoika Ghysens to Matthias Van Ceulebroeck
  • % Done changed from 0 to 100
Actions #4

Updated by Matthias Van Ceulebroeck about 1 year ago

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: Atom PDF