Project

General

Profile

Actions

Bug #11932

closed
MV MV

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

Bug #11932: Assigning a new WPopupMenu to a WPushButton that already contains a WPopupMenu

Added by Matthias Van Ceulebroeck almost 3 years ago. Updated almost 3 years 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.

MV Updated by Matthias Van Ceulebroeck almost 3 years ago Actions #1

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

MV Updated by Matthias Van Ceulebroeck almost 3 years ago Actions #2

  • Assignee set to Yoika Ghysens

MV Updated by Matthias Van Ceulebroeck almost 3 years ago Actions #3

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

MV Updated by Matthias Van Ceulebroeck almost 3 years ago Actions #4

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom