Skip to content
  • Martin Flöser's avatar
    [server] Standardize the destructor request handling for Resources · 03594de1
    Martin Flöser authored
    Summary:
    This change standardizes the behavior regarding the destructor request.
    
    The destructor should destroy the resource and nothing else. The
    Wayland library invokes the static unbind method once the resource is
    destroyed. The implementation provided by Resource::Private::unbind
    triggers a delete later on the Resource. So there is no need to trigger
    a deleteLater from the destructor request callback.
    
    This change adds a generic implementation to Resource::Private which is
    now used by all inheriting classes replacing the custom implementations.
    
    Test Plan:
    For a few Resources the test is extended to ensure that the Resource
    gets deleted on server side.
    
    Reviewers: #plasma
    
    Subscribers: plasma-devel
    
    Tags: #plasma
    
    Differential Revision: https://phabricator.kde.org/D1679
    03594de1