summaryrefslogtreecommitdiffstats
path: root/logic/OpSys.cpp
blob: f101fd08060f8139d388d7e46bdf919a2512f0c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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";
	}
}