Declare ResourceId Qt metatype in public header so it's QVariant'able

This commit is contained in:
baldurk committed 2017-11-17 16:30:55 +00:00
1 parent 25de6726f6
commit 1776b4e6c0
7 files changed
+8 -10

No files matched your search

+8
View File
@@ -372,6 +372,10 @@ struct ResourceId
bool operator!=(const ResourceId u) const { return id != u.id; }
DOCUMENT("Compares two ``ResourceId`` objects for less-than.");
bool operator<(const ResourceId u) const { return id < u.id; }
#if defined(RENDERDOC_QT_COMPAT)
operator QVariant() const { return QVariant::fromValue(*this); }
#endif
private:
uint64_t id;
@@ -380,6 +384,10 @@ private:
#endif
};
#if defined(RENDERDOC_QT_COMPAT)
Q_DECLARE_METATYPE(ResourceId);
#endif
DECLARE_REFLECTION_STRUCT(ResourceId);
#include "capture_options.h"