diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxHeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxHeaderPathDetector.cpp index 1822ea5e..46f94171 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/CxxHeaderPathDetector.cpp +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxHeaderPathDetector.cpp @@ -23,5 +23,10 @@ std::vector CxxHeaderPathDetector::getPaths() const } } - return utility::replaceOrAddCxxCompilerHeaderPath(headerSearchPaths); + if (!headerSearchPaths.empty()) + { + headerSearchPaths = utility::replaceOrAddCxxCompilerHeaderPath(headerSearchPaths); + } + + return headerSearchPaths; } diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp index bc212be2..e690d3e8 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp @@ -39,9 +39,10 @@ std::vector CxxVs10To14HeaderPathDetector::getPaths() const if (!headerSearchPaths.empty()) { utility::append(headerSearchPaths, utility::getWindowsSdkHeaderSearchPaths(m_architecture)); + headerSearchPaths = utility::replaceOrAddCxxCompilerHeaderPath(headerSearchPaths); } - return utility::replaceOrAddCxxCompilerHeaderPath(headerSearchPaths); + return headerSearchPaths; } int CxxVs10To14HeaderPathDetector::visualStudioTypeToVersion(const VisualStudioType t) @@ -66,13 +67,13 @@ std::string CxxVs10To14HeaderPathDetector::visualStudioTypeToString(const Visual switch (t) { case VISUAL_STUDIO_2010: - ret += " 2010"; + return ret + " 2010"; case VISUAL_STUDIO_2012: - ret += " 2012"; + return ret + " 2012"; case VISUAL_STUDIO_2013: - ret += " 2013"; + return ret + " 2013"; case VISUAL_STUDIO_2015: - ret += " 2015"; + return ret + " 2015"; } return ret; } @@ -94,6 +95,7 @@ FilePath CxxVs10To14HeaderPathDetector::getVsInstallPathUsingRegistry() const FilePath path(value.toStdWString()); if (path.exists()) { + std::cout << "key worked: " << key.toStdString() << std::endl; return path; } diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp index 1d74eaa1..76791978 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp @@ -51,7 +51,8 @@ std::vector CxxVs15HeaderPathDetector::getPaths() const windowsSdkHeaderSearchPaths = utility::getWindowsSdkHeaderSearchPaths(APPLICATION_ARCHITECTURE_X86_64); } utility::append(headerSearchPaths, windowsSdkHeaderSearchPaths); + headerSearchPaths = utility::replaceOrAddCxxCompilerHeaderPath(headerSearchPaths); } - return utility::replaceOrAddCxxCompilerHeaderPath(headerSearchPaths); + return headerSearchPaths; }