summaryrefslogtreecommitdiffstats
path: root/depends/util/include/modutils.h
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-02-02 14:05:07 +0100
committerJan Dalheimer <jan@dalheimer.de>2014-02-02 14:05:07 +0100
commitece826bdbc5ca525e253cafcfef3d93e492949f5 (patch)
tree6a248b84ddd8ecbd90bfd62b072b7cd17edd2686 /depends/util/include/modutils.h
parent790402bdce96a4ce67b32d228aa251fc4d184f5e (diff)
downloadMultiMC-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.h32
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);
+}
+