Better (but unsorted) Java detection

This commit is contained in:
Sky
2013-12-11 03:54:39 +00:00
parent ab69c1b9e6
commit afa5e14e20
13 changed files with 338 additions and 87 deletions

View File

@@ -3,21 +3,28 @@
#include <QTimer>
#include <memory>
class JavaChecker;
struct JavaCheckResult
{
QString path;
QString mojangPlatform;
QString realPlatform;
QString javaVersion;
bool valid = false;
bool is_64bit = false;
};
typedef std::shared_ptr<QProcess> QProcessPtr;
typedef std::shared_ptr<QProcess> QProcessPtr;
typedef std::shared_ptr<JavaChecker> JavaCheckerPtr;
class JavaChecker : public QObject
{
Q_OBJECT
public:
explicit JavaChecker(QObject *parent = 0);
void performCheck(QString path);
void performCheck();
QString path;
signals:
void checkFinished(JavaCheckResult result);