mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
Ref T709 Prevent instantiation of CXSwiftBusSettingsQtFree, to avoid slicing.
- Constructors and destructor are protected. - Therefore destructor doesn't need to be virtual. - objectUpdated is pure virtual, so the class is abstract. - Both derived classes are declared final.
This commit is contained in:
@@ -27,7 +27,7 @@ namespace BlackMisc
|
||||
namespace Settings
|
||||
{
|
||||
//! XSwiftBus settings
|
||||
class BLACKMISC_EXPORT CXSwiftBusSettings :
|
||||
class BLACKMISC_EXPORT CXSwiftBusSettings final :
|
||||
public CValueObject<CXSwiftBusSettings>,
|
||||
public CXSwiftBusSettingsQtFree,
|
||||
public ITimestampBased
|
||||
@@ -88,7 +88,7 @@ namespace BlackMisc
|
||||
|
||||
protected:
|
||||
//! \copydoc CXSwiftBusSettingsQtFree::objectUpdated
|
||||
virtual void objectUpdated() override;
|
||||
virtual void objectUpdated() override final;
|
||||
|
||||
private:
|
||||
BLACK_METACLASS(
|
||||
|
||||
Reference in New Issue
Block a user