diff options
author | Andrew <forkk@forkk.net> | 2013-05-03 14:41:37 -0500 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-05-03 14:41:37 -0500 |
commit | 055198303c7bf15f456687838c37650871596946 (patch) | |
tree | 6c745d0d4cf3f9da25f6552138a07870544dd642 /libmultimc/src/instversion.cpp | |
parent | 1626fa013c86dc9f30254f57b3518211f6d0c65a (diff) | |
download | MultiMC-055198303c7bf15f456687838c37650871596946.tar MultiMC-055198303c7bf15f456687838c37650871596946.tar.gz MultiMC-055198303c7bf15f456687838c37650871596946.tar.lz MultiMC-055198303c7bf15f456687838c37650871596946.tar.xz MultiMC-055198303c7bf15f456687838c37650871596946.zip |
Removed old plugin system and implemented some version list stuff.
Diffstat (limited to 'libmultimc/src/instversion.cpp')
-rw-r--r-- | libmultimc/src/instversion.cpp | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/libmultimc/src/instversion.cpp b/libmultimc/src/instversion.cpp index cedb61df..d3d078a9 100644 --- a/libmultimc/src/instversion.cpp +++ b/libmultimc/src/instversion.cpp @@ -16,17 +16,48 @@ #include "include/instversion.h" #include "include/instversionlist.h" -InstVersion::InstVersion(InstVersionList *parent) : - QObject(parent) +InstVersion::InstVersion(const QString &descriptor, + const QString &name, + qint64 timestamp, + InstVersionList *parent) : + QObject(parent), m_descriptor(descriptor), m_name(name), m_timestamp(timestamp) +{ + +} + +InstVersion::InstVersion(const InstVersion &other, QObject *parent) : + QObject(parent ? parent : other.parent()), + m_descriptor(other.descriptor()), m_name(other.name()), m_timestamp(other.timestamp()) { } InstVersionList *InstVersion::versionList() const { - // Parent should *always* be an InstVersionList + // Parent should *always* be either an InstVersionList or NULL. if (!parent() || !parent()->inherits("InstVersionList")) return NULL; else return (InstVersionList *)parent(); } + +bool InstVersion::isMeta() const +{ + return false; +} + + +QString InstVersion::descriptor() const +{ + return m_descriptor; +} + +QString InstVersion::name() const +{ + return m_name; +} + +qint64 InstVersion::timestamp() const +{ + return m_timestamp; +} |