ui: added initial auto-detection for cpp standard headers and java runtime library
* when Coati is started with no java-path or global cxx header or framework paths in the appsettings they are auto-detected using the first working detector * order in which the detectors are shown in gui now matches the order they are added to the combined detector.
This commit is contained in:
@@ -3,10 +3,8 @@
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "utility/file/FileSystem.h"
|
||||
#include "utility/messaging/type/MessageSwitchColorScheme.h"
|
||||
#include "utility/path_detector/java_runtime/JavaPathDetectorLinux.h"
|
||||
#include "utility/path_detector/java_runtime/JavaPathDetectorMac.h"
|
||||
#include "utility/path_detector/java_runtime/JavaPathDetectorWindows.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
#include "utility/utilityPathDetection.h"
|
||||
|
||||
QtProjectWizzardContentPreferences::QtProjectWizzardContentPreferences(
|
||||
std::shared_ptr<ProjectSettings> settings, QtProjectWizzardWindow* window
|
||||
@@ -217,19 +215,7 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row)
|
||||
);
|
||||
row++;
|
||||
|
||||
m_javaPathDetector = std::make_shared<CombinedPathDetector>();
|
||||
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
|
||||
{
|
||||
m_javaPathDetector->addDetector(std::make_shared<JavaPathDetectorWindows>("1.8"));
|
||||
}
|
||||
else if (QSysInfo::macVersion() != QSysInfo::MV_None)
|
||||
{
|
||||
m_javaPathDetector->addDetector(std::make_shared<JavaPathDetectorMac>("1.8"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_javaPathDetector->addDetector(std::make_shared<JavaPathDetectorLinux>("1.8"));
|
||||
}
|
||||
m_javaPathDetector = utility::getJavaRuntimePathDetector();
|
||||
addJavaPathDetection(layout, row);
|
||||
|
||||
layout->setRowMinimumHeight(row, 20);
|
||||
@@ -350,7 +336,7 @@ void QtProjectWizzardContentPreferences::javaPathDetectionClicked()
|
||||
void QtProjectWizzardContentPreferences::addJavaPathDetection(QGridLayout* layout, int& row)
|
||||
{
|
||||
std::vector<std::string> detectorNames = m_javaPathDetector->getWorkingDetectorNames();
|
||||
if (!detectorNames.size())
|
||||
if (detectorNames.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user