Better (but unsorted) Java detection
This commit is contained in:
parent
ab69c1b9e6
commit
afa5e14e20
13 changed files with 338 additions and 87 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue