diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-02-02 14:05:07 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-02-02 14:05:07 +0100 |
commit | ece826bdbc5ca525e253cafcfef3d93e492949f5 (patch) | |
tree | 6a248b84ddd8ecbd90bfd62b072b7cd17edd2686 /depends/util/include/modutils.h | |
parent | 790402bdce96a4ce67b32d228aa251fc4d184f5e (diff) | |
download | MultiMC-ece826bdbc5ca525e253cafcfef3d93e492949f5.tar MultiMC-ece826bdbc5ca525e253cafcfef3d93e492949f5.tar.gz MultiMC-ece826bdbc5ca525e253cafcfef3d93e492949f5.tar.lz MultiMC-ece826bdbc5ca525e253cafcfef3d93e492949f5.tar.xz MultiMC-ece826bdbc5ca525e253cafcfef3d93e492949f5.zip |
Add a MMC-depend field (soft/hard) for version checking
Diffstat (limited to 'depends/util/include/modutils.h')
-rw-r--r-- | depends/util/include/modutils.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/depends/util/include/modutils.h b/depends/util/include/modutils.h new file mode 100644 index 00000000..e04db66f --- /dev/null +++ b/depends/util/include/modutils.h @@ -0,0 +1,32 @@ +#pragma once + +#include <QString> +#include "libutil_config.h" + +class QUrl; + +namespace Util +{ +struct Version +{ + Version(const QString &str); + + bool operator<(const Version &other) const; + bool operator<=(const Version &other) const; + bool operator>(const Version &other) const; + bool operator==(const Version &other) const; + bool operator!=(const Version &other) const; + + QString toString() const + { + return m_string; + } + +private: + QString m_string; +}; + +LIBUTIL_EXPORT QUrl expandQMURL(const QString &in); +LIBUTIL_EXPORT bool versionIsInInterval(const QString &version, const QString &interval); +} + |