Add protected virtual dtor for GAL_DISPLAY_OPTIONS_OBSERVER

GAL_DISPLAY_OPTIONS_OBSERVER aren't deleted by a base class pointer -
they are an "incidental" part of other classes. Add a virtual protected
destructor to make this explicit.
This commit is contained in:
John Beard 2017-02-16 09:15:45 +08:00 committed by Maciej Suminski
parent 0bf3a19967
commit 1f5619f740
1 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,9 @@ namespace KIGFX
{
public:
virtual void OnGalDisplayOptionsChanged( const GAL_DISPLAY_OPTIONS& ) = 0;
protected:
// Observer lifetimes aren't handled by base class pointer
virtual ~GAL_DISPLAY_OPTIONS_OBSERVER() {}
};
class GAL_DISPLAY_OPTIONS : public UTIL::OBSERVABLE<GAL_DISPLAY_OPTIONS_OBSERVER>