mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-06 14:51:04 +00:00
Declare ResourceId Qt metatype in public header so it's QVariant'able
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
#include "PipelineStateViewer.h"
|
||||
#include "ui_D3D11PipelineStateViewer.h"
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
struct D3D11VBIBTag
|
||||
{
|
||||
D3D11VBIBTag() { offset = 0; }
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#include "PipelineStateViewer.h"
|
||||
#include "ui_D3D12PipelineStateViewer.h"
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
struct D3D12VBIBTag
|
||||
{
|
||||
D3D12VBIBTag() { offset = 0; }
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
#include "PipelineStateViewer.h"
|
||||
#include "ui_GLPipelineStateViewer.h"
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
struct GLVBIBTag
|
||||
{
|
||||
GLVBIBTag() { offset = 0; }
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "PipelineStateViewer.h"
|
||||
#include "ui_VulkanPipelineStateViewer.h"
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
Q_DECLARE_METATYPE(SamplerData);
|
||||
|
||||
struct VulkanVBIBTag
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
static const int ResourceIdRole = Qt::UserRole;
|
||||
static const int FilterRole = Qt::UserRole + 1;
|
||||
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
class ResourceListItemModel : public QAbstractItemModel
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -55,7 +55,6 @@ float aspect(const QSizeF &s)
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(Following);
|
||||
Q_DECLARE_METATYPE(ResourceId);
|
||||
|
||||
const Following Following::Default = Following();
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user