fix: don't use forward-declared Ptr types in meta/
This would cause ODR violations when those headers were included in other places that also included stuff like "Version.h" (note the "meta/Version.h"), which can cause problems, especially in LTO. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -30,13 +30,14 @@
|
||||
|
||||
namespace Meta
|
||||
{
|
||||
using VersionPtr = std::shared_ptr<class Version>;
|
||||
|
||||
class Version : public QObject, public BaseVersion, public BaseEntity
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public: /* con/des */
|
||||
public:
|
||||
using Ptr = std::shared_ptr<Version>;
|
||||
|
||||
explicit Version(const QString &uid, const QString &version);
|
||||
virtual ~Version();
|
||||
|
||||
@ -78,8 +79,8 @@ public: /* con/des */
|
||||
return m_data != nullptr;
|
||||
}
|
||||
|
||||
void merge(const VersionPtr &other);
|
||||
void mergeFromList(const VersionPtr &other);
|
||||
void merge(const Version::Ptr &other);
|
||||
void mergeFromList(const Version::Ptr &other);
|
||||
void parse(const QJsonObject &obj) override;
|
||||
|
||||
QString localFilename() const override;
|
||||
@ -113,4 +114,4 @@ private:
|
||||
};
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(Meta::VersionPtr)
|
||||
Q_DECLARE_METATYPE(Meta::Version::Ptr)
|
||||
|
Reference in New Issue
Block a user