Qt 5.12 deprecation fixes (#1003)
This commit is contained in:
@@ -82,20 +82,14 @@ std::wstring getErrorMessageFromMavenOutput(std::shared_ptr<const TextAccess> ma
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
std::string getMavenArgsString(const FilePath& settingsFilePath)
|
||||
std::vector<std::wstring> getMavenArgs(const FilePath& settingsFilePath)
|
||||
{
|
||||
std::vector<std::string> args;
|
||||
std::vector<std::wstring> args;
|
||||
if (!settingsFilePath.empty() && settingsFilePath.exists())
|
||||
{
|
||||
args.push_back("--settings \"" + settingsFilePath.str() + "\"");
|
||||
args.push_back(L"--settings \"" + settingsFilePath.wstr() + L"\"");
|
||||
}
|
||||
std::string ret = "";
|
||||
for (const std::string& arg: args)
|
||||
{
|
||||
ret += arg + " ";
|
||||
}
|
||||
|
||||
return ret;
|
||||
return args;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -107,9 +101,13 @@ std::wstring mavenGenerateSources(
|
||||
{
|
||||
utility::setJavaHomeVariableIfNotExists();
|
||||
|
||||
auto args = getMavenArgs(settingsFilePath);
|
||||
args.push_back(L"generate-sources");
|
||||
|
||||
std::shared_ptr<TextAccess> outputAccess = TextAccess::createFromString(
|
||||
utility::executeProcessUntilNoOutput(
|
||||
"\"" + mavenPath.str() + "\" " + getMavenArgsString(settingsFilePath) + "generate-sources",
|
||||
mavenPath.wstr(),
|
||||
args,
|
||||
projectDirectoryPath,
|
||||
60000));
|
||||
|
||||
@@ -130,11 +128,15 @@ bool mavenCopyDependencies(
|
||||
{
|
||||
utility::setJavaHomeVariableIfNotExists();
|
||||
|
||||
auto args = getMavenArgs(settingsFilePath);
|
||||
args.push_back(L"dependency:copy-dependencies");
|
||||
args.push_back(L"-DoutputDirectory=" + outputDirectoryPath.wstr());
|
||||
|
||||
std::shared_ptr<TextAccess> outputAccess = TextAccess::createFromString(
|
||||
utility::executeProcessUntilNoOutput(
|
||||
"\"" + mavenPath.str() + "\" " + getMavenArgsString(settingsFilePath) +
|
||||
"dependency:copy-dependencies -DoutputDirectory=" + outputDirectoryPath.str(),
|
||||
projectDirectoryPath,
|
||||
utility::executeProcessUntilNoOutput(
|
||||
mavenPath.wstr(),
|
||||
args,
|
||||
projectDirectoryPath,
|
||||
60000));
|
||||
|
||||
const std::wstring errorMessage = getErrorMessageFromMavenOutput(outputAccess);
|
||||
@@ -159,11 +161,15 @@ std::vector<FilePath> mavenGetAllDirectoriesFromEffectivePom(
|
||||
|
||||
FilePath outputPath = outputDirectoryPath.getConcatenated(FilePath("/effective-pom.xml"));
|
||||
|
||||
auto args = getMavenArgs(settingsFilePath);
|
||||
args.push_back(L"help:effective-pom");
|
||||
args.push_back(L"-Doutput=" + outputPath.wstr());
|
||||
|
||||
std::shared_ptr<TextAccess> outputAccess = TextAccess::createFromString(
|
||||
utility::executeProcessUntilNoOutput(
|
||||
"\"" + mavenPath.str() + "\" " + getMavenArgsString(settingsFilePath) +
|
||||
"help:effective-pom -Doutput=\"" + outputPath.str(),
|
||||
projectDirectoryPath,
|
||||
utility::executeProcessUntilNoOutput(
|
||||
mavenPath.wstr(),
|
||||
args,
|
||||
projectDirectoryPath,
|
||||
60000));
|
||||
|
||||
const std::wstring errorMessage = getErrorMessageFromMavenOutput(outputAccess);
|
||||
|
||||
Reference in New Issue
Block a user