aboutsummaryrefslogtreecommitdiff
path: root/logic/OpSys.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-21 18:24:29 +0100
committerSky <git@bunnies.cc>2013-10-21 18:24:29 +0100
commitaaf6fe894406ab8aa814de83692504493060e303 (patch)
treea7ac3a60534322f70cbdc34111228885e0606691 /logic/OpSys.cpp
parent6892c11e9f287dcfb1e698f8f46233a01fb7abb6 (diff)
parent11813a0621dd7b500c2d7966a2671c0ab93be692 (diff)
downloadPrismLauncher-aaf6fe894406ab8aa814de83692504493060e303.tar.gz
PrismLauncher-aaf6fe894406ab8aa814de83692504493060e303.tar.bz2
PrismLauncher-aaf6fe894406ab8aa814de83692504493060e303.zip
Merge branch 'develop'
Diffstat (limited to 'logic/OpSys.cpp')
-rw-r--r--logic/OpSys.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/logic/OpSys.cpp b/logic/OpSys.cpp
new file mode 100644
index 00000000..f101fd08
--- /dev/null
+++ b/logic/OpSys.cpp
@@ -0,0 +1,23 @@
+#include "OpSys.h"
+
+OpSys OpSys_fromString(QString name)
+{
+ if(name == "linux")
+ return Os_Linux;
+ if(name == "windows")
+ return Os_Windows;
+ if(name == "osx")
+ return Os_OSX;
+ return Os_Other;
+}
+
+QString OpSys_toString(OpSys name)
+{
+ switch(name)
+ {
+ case Os_Linux: return "linux";
+ case Os_OSX: return "osx";
+ case Os_Windows: return "windows";
+ default: return "other";
+ }
+} \ No newline at end of file