Make sure adding forced candidates doesn't result in duplicates
This commit is contained in:
parent
b963ff7416
commit
808ca76363
@ -153,9 +153,14 @@ QList<QString> JavaUtils::FindJavaPaths()
|
||||
KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\Java Development Kit");
|
||||
|
||||
java_candidates.append(JRE64s);
|
||||
java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre7/bin/java.exe"));
|
||||
java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre6/bin/java.exe"));
|
||||
java_candidates.append(JDK64s);
|
||||
java_candidates.append(JRE32s);
|
||||
java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre7/bin/java.exe"));
|
||||
java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre6/bin/java.exe"));
|
||||
java_candidates.append(JDK32s);
|
||||
java_candidates.append(MakeJavaPtr(this->GetDefaultJava()->path));
|
||||
|
||||
QList<QString> candidates;
|
||||
for(JavaVersionPtr java_candidate : java_candidates)
|
||||
@ -166,13 +171,6 @@ QList<QString> JavaUtils::FindJavaPaths()
|
||||
}
|
||||
}
|
||||
|
||||
candidates.append("C:/Program Files/Java/jre7/bin/java.exe");
|
||||
candidates.append("C:/Program Files/Java/jre6/bin/java.exe");
|
||||
candidates.append("C:/Program Files (x86)/Java/jre7/bin/java.exe");
|
||||
candidates.append("C:/Program Files (x86)/Java/jre6/bin/java.exe");
|
||||
|
||||
candidates.append(this->GetDefaultJava()->path);
|
||||
|
||||
return candidates;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user