Skip to content

Commit

Permalink
starting experiments with exposing property types
Browse files Browse the repository at this point in the history
  • Loading branch information
dogboydog committed Jun 6, 2024
1 parent da60adc commit 510c581
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/libtiled/propertytype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,4 +650,10 @@ QJsonArray PropertyTypes::toJson(const QString &path) const
return propertyTypesJson;
}

PropertyTypes::PropertyTypes(PropertyTypes &&other)
{
other.swap(*this);
}
} // namespace Tiled

#include "moc_propertytype.cpp"
9 changes: 6 additions & 3 deletions src/libtiled/propertytype.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ class TILEDSHARED_EXPORT ExportValue
/**
* The base class for custom property types.
*/
class TILEDSHARED_EXPORT PropertyType
class TILEDSHARED_EXPORT PropertyType : public QObject
{
Q_OBJECT

public:
enum Type {
PT_Invalid,
Expand Down Expand Up @@ -177,13 +179,14 @@ class TILEDSHARED_EXPORT ClassPropertyType final : public PropertyType
/**
* Container class for property types.
*/
class TILEDSHARED_EXPORT PropertyTypes
class TILEDSHARED_EXPORT PropertyTypes : public QObject
{
Q_OBJECT
using Types = QVector<PropertyType*>;

public:
PropertyTypes() = default;
PropertyTypes(PropertyTypes&& other) = default;
PropertyTypes(PropertyTypes&& other);
~PropertyTypes();

PropertyTypes& operator=(PropertyTypes&& other) = default;
Expand Down

0 comments on commit 510c581

Please sign in to comment.