change: make Mod a QObject used as a pointer

Prevents problems when copying it around!

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-06-26 14:17:15 -03:00
parent fac63541a4
commit c4316e81e6
19 changed files with 229 additions and 216 deletions

View File

@ -39,10 +39,12 @@
#include <QFileInfo>
#include <QList>
#include "QObjectPtr.h"
#include "ModDetails.h"
class Mod
class Mod : public QObject
{
Q_OBJECT
public:
enum ModType
{
@ -53,6 +55,8 @@ public:
MOD_LITEMOD, //!< The mod is a litemod
};
using Ptr = shared_qobject_ptr<Mod>;
Mod() = default;
Mod(const QFileInfo &file);
explicit Mod(const QDir& mods_dir, const Metadata::ModStruct& metadata);