* @brief Base class for all the events
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
namespace Common {
/**
- * Base class for all the eVaf events
+ * Event class for all the eVaf events
* @code@include <Common/Event>@endcode
*
- * The Event class is an event container for reference counted data objects.
+ * The Event class is an event container for all the eVaf events.
*/
class COMMON_EXPORT Event : public QEvent
{
* is decreased by 1 when the event object is destroyed. If nobody else claimed the ownership, then
* the shared data object is destroyed too.
*/
- Event(uint eventId, quint32 intValue = 0, QSharedData * dataObj = 0)
+ Event(uint eventId, quint32 intValue = 0, QSharedData * dataObj = nullptr)
: QEvent(eVafEvent)
, mId(eventId)
, mValue(intValue)
, mData(dataObj)
{}
+ virtual ~Event();
+
/**
* Returns the event ID value
*/
* is finished, the event and shared data attached to it are destroyed. To keep the shared
* data object, use QExplicitlySharedDataPointer<> to claim ownership.
*/
- inline QSharedData * data() const { return mData ? mData.data() : 0; }
+ inline QSharedData * data() const { return mData != nullptr ? mData.data() : nullptr; }
private: