forked from qt-creator/qt-creator
Tracing: Fix compile error
ff7d69daf in Qt base added a static assert. In file included from /data/dev/creator/src/libs/tracing/timelinetracemanager.cpp:6: In file included from /data/dev/creator/src/libs/tracing/timelinetracemanager.h:8: /data/dev/creator/src/libs/tracing/traceeventtype.h:45:1: error: static assertion failed due to requirement '!isRelocatable || std::is_copy_constructible_v<Timeline::TraceEventType> || std::is_move_constructible_v<Timeline::TraceEventType>': Timeline::TraceEventType is neither copy- nor move-constructible, so cannot be Q_RELOCATABLE_TYPE Q_DECLARE_TYPEINFO(Timeline::TraceEventType, Q_MOVABLE_TYPE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/dev/qt-6/qtbase/include/QtCore/../../src/corelib/global/qtypeinfo.h:173:12: note: expanded from macro 'Q_DECLARE_TYPEINFO' template<> \ ^ /data/dev/qt-6/qtbase/include/QtCore/../../src/corelib/global/qtypeinfo.h:166:5: note: expanded from macro '\ Q_DECLARE_TYPEINFO_BODY' static_assert(!isRelocatable || \ ^ ~~~~~~~~~~~~~~~~~~~ /data/dev/creator/src/libs/tracing/traceeventtype.h:45:1: note: expression evaluates to 'false || false' Q_DECLARE_TYPEINFO(Timeline::TraceEventType, Q_MOVABLE_TYPE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/dev/qt-6/qtbase/include/QtCore/../../src/corelib/global/qtypeinfo.h:173:12: note: expanded from macro 'Q_DECLARE_TYPEINFO' template<> \ ^ /data/dev/qt-6/qtbase/include/QtCore/../../src/corelib/global/qtypeinfo.h:167:55: note: expanded from macro '\ Q_DECLARE_TYPEINFO_BODY' std::is_copy_constructible_v<TYPE > || \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ 1 error generated. Change-Id: I68c963f6b2856e9aca3e8be65ac177456a02a875 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -14,6 +14,11 @@ namespace Timeline {
|
||||
class TraceEvent : public SafeCastable<TraceEvent>
|
||||
{
|
||||
public:
|
||||
TraceEvent(const TraceEvent &) = default;
|
||||
TraceEvent(TraceEvent &&) = default;
|
||||
TraceEvent &operator=(const TraceEvent &) = default;
|
||||
TraceEvent &operator=(TraceEvent &&) = default;
|
||||
|
||||
qint64 timestamp() const { return m_timestamp; }
|
||||
void setTimestamp(qint64 timestamp) { m_timestamp = timestamp; }
|
||||
|
||||
@@ -29,11 +34,6 @@ protected:
|
||||
: m_timestamp(timestamp), m_typeIndex(typeIndex), m_classId(classId)
|
||||
{}
|
||||
|
||||
TraceEvent(const TraceEvent &) = default;
|
||||
TraceEvent(TraceEvent &&) = default;
|
||||
TraceEvent &operator=(const TraceEvent &) = default;
|
||||
TraceEvent &operator=(TraceEvent &&) = default;
|
||||
|
||||
private:
|
||||
qint64 m_timestamp;
|
||||
qint32 m_typeIndex;
|
||||
|
@@ -15,6 +15,11 @@ namespace Timeline {
|
||||
class TraceEventType : public SafeCastable<TraceEventType>
|
||||
{
|
||||
public:
|
||||
TraceEventType(const TraceEventType &) = default;
|
||||
TraceEventType(TraceEventType &&) = default;
|
||||
TraceEventType &operator=(const TraceEventType &) = default;
|
||||
TraceEventType &operator=(TraceEventType &&) = default;
|
||||
|
||||
const QString &displayName() const { return m_displayName; }
|
||||
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
|
||||
|
||||
@@ -28,11 +33,6 @@ protected:
|
||||
: m_displayName(displayName), m_classId(classId), m_feature(feature)
|
||||
{}
|
||||
|
||||
TraceEventType(const TraceEventType &) = default;
|
||||
TraceEventType(TraceEventType &&) = default;
|
||||
TraceEventType &operator=(const TraceEventType &) = default;
|
||||
TraceEventType &operator=(TraceEventType &&) = default;
|
||||
|
||||
private:
|
||||
QString m_displayName;
|
||||
qint32 m_classId;
|
||||
|
Reference in New Issue
Block a user