forked from qt-creator/qt-creator
Give the values of BuildStep::OutputFormat better names
The old ones did not convey their meaning very well. In particular, NormalOutput and MessageOutput were easily confused. Change-Id: Ia0a8c1b1c366ab3f5c59f751b37b8b1f68f6831d Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -133,7 +133,7 @@ bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
|
|
||||||
if (bc->buildType() != ProjectExplorer::BuildConfiguration::Release)
|
if (bc->buildType() != ProjectExplorer::BuildConfiguration::Release)
|
||||||
emit addOutput(tr("Warning: Signing a debug or profile package."),
|
emit addOutput(tr("Warning: Signing a debug or profile package."),
|
||||||
BuildStep::ErrorMessageOutput);
|
OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
|
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
|
||||||
@@ -143,7 +143,7 @@ bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
int minSDKForKit = AndroidManager::minimumSDK(target()->kit());
|
int minSDKForKit = AndroidManager::minimumSDK(target()->kit());
|
||||||
if (AndroidManager::minimumSDK(target()) < minSDKForKit) {
|
if (AndroidManager::minimumSDK(target()) < minSDKForKit) {
|
||||||
emit addOutput(tr("The API level set for the APK is less than the minimum required by the kit."
|
emit addOutput(tr("The API level set for the APK is less than the minimum required by the kit."
|
||||||
"\nThe minimum API level required by the kit is %1.").arg(minSDKForKit), ErrorOutput);
|
"\nThe minimum API level required by the kit is %1.").arg(minSDKForKit), OutputFormat::Stderr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,18 +143,18 @@ bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
m_androiddeployqtArgs.clear();
|
m_androiddeployqtArgs.clear();
|
||||||
|
|
||||||
if (AndroidManager::checkForQt51Files(project()->projectDirectory()))
|
if (AndroidManager::checkForQt51Files(project()->projectDirectory()))
|
||||||
emit addOutput(tr("Found old folder \"android\" in source directory. Qt 5.2 does not use that folder by default."), ErrorOutput);
|
emit addOutput(tr("Found old folder \"android\" in source directory. Qt 5.2 does not use that folder by default."), OutputFormat::Stderr);
|
||||||
|
|
||||||
m_targetArch = AndroidManager::targetArch(target());
|
m_targetArch = AndroidManager::targetArch(target());
|
||||||
if (m_targetArch.isEmpty()) {
|
if (m_targetArch.isEmpty()) {
|
||||||
emit addOutput(tr("No Android arch set by the .pro file."), ErrorOutput);
|
emit addOutput(tr("No Android arch set by the .pro file."), OutputFormat::Stderr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidBuildApkStep *androidBuildApkStep
|
AndroidBuildApkStep *androidBuildApkStep
|
||||||
= AndroidGlobal::buildStep<AndroidBuildApkStep>(target()->activeBuildConfiguration());
|
= AndroidGlobal::buildStep<AndroidBuildApkStep>(target()->activeBuildConfiguration());
|
||||||
if (!androidBuildApkStep) {
|
if (!androidBuildApkStep) {
|
||||||
emit addOutput(tr("Cannot find the android build step."), ErrorOutput);
|
emit addOutput(tr("Cannot find the android build step."), OutputFormat::Stderr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
if (m_useAndroiddeployqt) {
|
if (m_useAndroiddeployqt) {
|
||||||
Utils::FileName tmp = AndroidManager::androidQtSupport(target())->androiddeployqtPath(target());
|
Utils::FileName tmp = AndroidManager::androidQtSupport(target())->androiddeployqtPath(target());
|
||||||
if (tmp.isEmpty()) {
|
if (tmp.isEmpty()) {
|
||||||
emit addOutput(tr("Cannot find the androiddeployqt tool."), ErrorOutput);
|
emit addOutput(tr("Cannot find the androiddeployqt tool."), OutputFormat::Stderr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("--input"));
|
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("--input"));
|
||||||
tmp = AndroidManager::androidQtSupport(target())->androiddeployJsonPath(target());
|
tmp = AndroidManager::androidQtSupport(target())->androiddeployJsonPath(target());
|
||||||
if (tmp.isEmpty()) {
|
if (tmp.isEmpty()) {
|
||||||
emit addOutput(tr("Cannot find the androiddeploy Json file."), ErrorOutput);
|
emit addOutput(tr("Cannot find the androiddeploy Json file."), OutputFormat::Stderr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, tmp.toString());
|
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, tmp.toString());
|
||||||
@@ -284,11 +284,11 @@ AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::runDeploy(QFutureInter
|
|||||||
if (m_uninstallPreviousPackageRun) {
|
if (m_uninstallPreviousPackageRun) {
|
||||||
const QString packageName = AndroidManager::packageName(m_manifestName);
|
const QString packageName = AndroidManager::packageName(m_manifestName);
|
||||||
if (packageName.isEmpty()) {
|
if (packageName.isEmpty()) {
|
||||||
emit addOutput(tr("Cannot find the package name."), ErrorOutput);
|
emit addOutput(tr("Cannot find the package name."), OutputFormat::Stderr);
|
||||||
return Failure;
|
return Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit addOutput(tr("Uninstall previous package %1.").arg(packageName), MessageOutput);
|
emit addOutput(tr("Uninstall previous package %1.").arg(packageName), OutputFormat::NormalMessage);
|
||||||
runCommand(m_adbPath,
|
runCommand(m_adbPath,
|
||||||
AndroidDeviceInfo::adbSelector(m_serialNumber)
|
AndroidDeviceInfo::adbSelector(m_serialNumber)
|
||||||
<< QLatin1String("uninstall") << packageName);
|
<< QLatin1String("uninstall") << packageName);
|
||||||
@@ -320,7 +320,7 @@ AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::runDeploy(QFutureInter
|
|||||||
|
|
||||||
emit addOutput(tr("Starting: \"%1\" %2")
|
emit addOutput(tr("Starting: \"%1\" %2")
|
||||||
.arg(QDir::toNativeSeparators(m_command), args),
|
.arg(QDir::toNativeSeparators(m_command), args),
|
||||||
BuildStep::MessageOutput);
|
BuildStep::OutputFormat::NormalMessage);
|
||||||
|
|
||||||
while (!m_process->waitForFinished(200)) {
|
while (!m_process->waitForFinished(200)) {
|
||||||
if (m_process->state() == QProcess::NotRunning)
|
if (m_process->state() == QProcess::NotRunning)
|
||||||
@@ -351,13 +351,13 @@ AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::runDeploy(QFutureInter
|
|||||||
|
|
||||||
if (exitStatus == QProcess::NormalExit && exitCode == 0) {
|
if (exitStatus == QProcess::NormalExit && exitCode == 0) {
|
||||||
emit addOutput(tr("The process \"%1\" exited normally.").arg(m_command),
|
emit addOutput(tr("The process \"%1\" exited normally.").arg(m_command),
|
||||||
BuildStep::MessageOutput);
|
BuildStep::OutputFormat::NormalMessage);
|
||||||
} else if (exitStatus == QProcess::NormalExit) {
|
} else if (exitStatus == QProcess::NormalExit) {
|
||||||
emit addOutput(tr("The process \"%1\" exited with code %2.")
|
emit addOutput(tr("The process \"%1\" exited with code %2.")
|
||||||
.arg(m_command, QString::number(exitCode)),
|
.arg(m_command, QString::number(exitCode)),
|
||||||
BuildStep::ErrorMessageOutput);
|
BuildStep::OutputFormat::ErrorMessage);
|
||||||
} else {
|
} else {
|
||||||
emit addOutput(tr("The process \"%1\" crashed.").arg(m_command), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("The process \"%1\" crashed.").arg(m_command), BuildStep::OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exitCode == 0 && exitStatus == QProcess::NormalExit) {
|
if (exitCode == 0 && exitStatus == QProcess::NormalExit) {
|
||||||
@@ -428,7 +428,7 @@ void AndroidDeployQtStep::run(QFutureInterface<bool> &fi)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit addOutput(tr("Pulling files necessary for debugging."), MessageOutput);
|
emit addOutput(tr("Pulling files necessary for debugging."), OutputFormat::NormalMessage);
|
||||||
|
|
||||||
QString localAppProcessFile = QString::fromLatin1("%1/app_process").arg(m_buildDirectory);
|
QString localAppProcessFile = QString::fromLatin1("%1/app_process").arg(m_buildDirectory);
|
||||||
QFile::remove(localAppProcessFile);
|
QFile::remove(localAppProcessFile);
|
||||||
@@ -446,7 +446,7 @@ void AndroidDeployQtStep::run(QFutureInterface<bool> &fi)
|
|||||||
returnValue = Failure;
|
returnValue = Failure;
|
||||||
emit addOutput(tr("Package deploy: Failed to pull \"%1\" to \"%2\".")
|
emit addOutput(tr("Package deploy: Failed to pull \"%1\" to \"%2\".")
|
||||||
.arg(m_appProcessBinaries.join(QLatin1String("\", \"")))
|
.arg(m_appProcessBinaries.join(QLatin1String("\", \"")))
|
||||||
.arg(localAppProcessFile), ErrorMessageOutput);
|
.arg(localAppProcessFile), OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
runCommand(m_adbPath,
|
runCommand(m_adbPath,
|
||||||
@@ -461,10 +461,10 @@ void AndroidDeployQtStep::runCommand(const QString &program, const QStringList &
|
|||||||
{
|
{
|
||||||
Utils::SynchronousProcess buildProc;
|
Utils::SynchronousProcess buildProc;
|
||||||
buildProc.setTimeoutS(2 * 60);
|
buildProc.setTimeoutS(2 * 60);
|
||||||
emit addOutput(tr("Package deploy: Running command \"%1 %2\".").arg(program).arg(arguments.join(QLatin1Char(' '))), BuildStep::MessageOutput);
|
emit addOutput(tr("Package deploy: Running command \"%1 %2\".").arg(program).arg(arguments.join(QLatin1Char(' '))), BuildStep::OutputFormat::NormalMessage);
|
||||||
Utils::SynchronousProcessResponse response = buildProc.run(program, arguments);
|
Utils::SynchronousProcessResponse response = buildProc.run(program, arguments);
|
||||||
if (response.result != Utils::SynchronousProcessResponse::Finished || response.exitCode != 0)
|
if (response.result != Utils::SynchronousProcessResponse::Finished || response.exitCode != 0)
|
||||||
emit addOutput(response.exitMessage(program, 2 * 60), BuildStep::ErrorMessageOutput);
|
emit addOutput(response.exitMessage(program, 2 * 60), BuildStep::OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidDeviceInfo AndroidDeployQtStep::deviceInfo() const
|
AndroidDeviceInfo AndroidDeployQtStep::deviceInfo() const
|
||||||
@@ -489,7 +489,7 @@ void AndroidDeployQtStep::processReadyReadStdOutput(DeployErrorCode &errorCode)
|
|||||||
|
|
||||||
void AndroidDeployQtStep::stdOutput(const QString &line)
|
void AndroidDeployQtStep::stdOutput(const QString &line)
|
||||||
{
|
{
|
||||||
emit addOutput(line, BuildStep::NormalOutput, BuildStep::DontAppendNewline);
|
emit addOutput(line, BuildStep::OutputFormat::Stdout, BuildStep::DontAppendNewline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidDeployQtStep::processReadyReadStdError(DeployErrorCode &errorCode)
|
void AndroidDeployQtStep::processReadyReadStdError(DeployErrorCode &errorCode)
|
||||||
@@ -504,7 +504,7 @@ void AndroidDeployQtStep::processReadyReadStdError(DeployErrorCode &errorCode)
|
|||||||
|
|
||||||
void AndroidDeployQtStep::stdError(const QString &line)
|
void AndroidDeployQtStep::stdError(const QString &line)
|
||||||
{
|
{
|
||||||
emit addOutput(line, BuildStep::ErrorOutput, BuildStep::DontAppendNewline);
|
emit addOutput(line, BuildStep::OutputFormat::Stderr, BuildStep::DontAppendNewline);
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::parseDeployErrors(QString &deployOutputLine) const
|
AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::parseDeployErrors(QString &deployOutputLine) const
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ void AutogenStep::run(QFutureInterface<bool> &fi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_runAutogen) {
|
if (!m_runAutogen) {
|
||||||
emit addOutput(tr("Configuration unchanged, skipping autogen step."), BuildStep::MessageOutput);
|
emit addOutput(tr("Configuration unchanged, skipping autogen step."), BuildStep::OutputFormat::NormalMessage);
|
||||||
reportRunResult(fi, true);
|
reportRunResult(fi, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ void AutoreconfStep::run(QFutureInterface<bool> &fi)
|
|||||||
m_runAutoreconf = true;
|
m_runAutoreconf = true;
|
||||||
|
|
||||||
if (!m_runAutoreconf) {
|
if (!m_runAutoreconf) {
|
||||||
emit addOutput(tr("Configuration unchanged, skipping autoreconf step."), BuildStep::MessageOutput);
|
emit addOutput(tr("Configuration unchanged, skipping autoreconf step."), BuildStep::OutputFormat::NormalMessage);
|
||||||
reportRunResult(fi, true);
|
reportRunResult(fi, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ void ConfigureStep::run(QFutureInterface<bool>& fi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_runConfigure) {
|
if (!m_runConfigure) {
|
||||||
emit addOutput(tr("Configuration unchanged, skipping configure step."), BuildStep::MessageOutput);
|
emit addOutput(tr("Configuration unchanged, skipping configure step."), BuildStep::OutputFormat::NormalMessage);
|
||||||
reportRunResult(fi, true);
|
reportRunResult(fi, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,10 +237,10 @@ void CMakeBuildStep::run(QFutureInterface<bool> &fi)
|
|||||||
|
|
||||||
bool mustDelay = false;
|
bool mustDelay = false;
|
||||||
if (bc->persistCMakeState()) {
|
if (bc->persistCMakeState()) {
|
||||||
emit addOutput(tr("Persisting CMake state..."), BuildStep::MessageOutput);
|
emit addOutput(tr("Persisting CMake state..."), BuildStep::OutputFormat::NormalMessage);
|
||||||
mustDelay = true;
|
mustDelay = true;
|
||||||
} else if (bc->updateCMakeStateBeforeBuild()) {
|
} else if (bc->updateCMakeStateBeforeBuild()) {
|
||||||
emit addOutput(tr("Running CMake in preparation to build..."), BuildStep::MessageOutput);
|
emit addOutput(tr("Running CMake in preparation to build..."), BuildStep::OutputFormat::NormalMessage);
|
||||||
mustDelay = true;
|
mustDelay = true;
|
||||||
} else {
|
} else {
|
||||||
mustDelay = false;
|
mustDelay = false;
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ bool IosDeployStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
m_deviceType = runConfig->deviceType();
|
m_deviceType = runConfig->deviceType();
|
||||||
} else {
|
} else {
|
||||||
emit addOutput(tr("Error: no device available, deploy failed."),
|
emit addOutput(tr("Error: no device available, deploy failed."),
|
||||||
BuildStep::ErrorMessageOutput);
|
BuildStep::OutputFormat::ErrorMessage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -210,7 +210,7 @@ void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
|||||||
TaskHub::addTask(Task::Warning,
|
TaskHub::addTask(Task::Warning,
|
||||||
tr("The Info.plist might be incorrect."),
|
tr("The Info.plist might be incorrect."),
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
emit addOutput(msg, BuildStep::ErrorMessageOutput);
|
emit addOutput(msg, BuildStep::OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildStepConfigWidget *IosDeployStep::createConfigWidget()
|
BuildStepConfigWidget *IosDeployStep::createConfigWidget()
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ private:
|
|||||||
QString deviceId() const;
|
QString deviceId() const;
|
||||||
QString appBundle() const;
|
QString appBundle() const;
|
||||||
void raiseError(const QString &error);
|
void raiseError(const QString &error);
|
||||||
void writeOutput(const QString &text, OutputFormat = MessageOutput);
|
void writeOutput(const QString &text, OutputFormat = OutputFormat::NormalMessage);
|
||||||
void checkProvisioningProfile();
|
void checkProvisioningProfile();
|
||||||
|
|
||||||
TransferStatus m_transferStatus;
|
TransferStatus m_transferStatus;
|
||||||
|
|||||||
@@ -63,24 +63,24 @@ bool NimCompilerCleanStep::init(QList<const BuildStep *> &)
|
|||||||
void NimCompilerCleanStep::run(QFutureInterface<bool> &fi)
|
void NimCompilerCleanStep::run(QFutureInterface<bool> &fi)
|
||||||
{
|
{
|
||||||
if (!m_buildDir.exists()) {
|
if (!m_buildDir.exists()) {
|
||||||
emit addOutput(tr("Build directory \"%1\" does not exist.").arg(m_buildDir.toUserOutput()), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("Build directory \"%1\" does not exist.").arg(m_buildDir.toUserOutput()), BuildStep::OutputFormat::ErrorMessage);
|
||||||
reportRunResult(fi, false);
|
reportRunResult(fi, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!removeCacheDirectory()) {
|
if (!removeCacheDirectory()) {
|
||||||
emit addOutput(tr("Failed to delete the cache directory."), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("Failed to delete the cache directory."), BuildStep::OutputFormat::ErrorMessage);
|
||||||
reportRunResult(fi, false);
|
reportRunResult(fi, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!removeOutFilePath()) {
|
if (!removeOutFilePath()) {
|
||||||
emit addOutput(tr("Failed to delete the out file."), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("Failed to delete the out file."), BuildStep::OutputFormat::ErrorMessage);
|
||||||
reportRunResult(fi, false);
|
reportRunResult(fi, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit addOutput(tr("Clean step completed successfully."), BuildStep::MessageOutput);
|
emit addOutput(tr("Clean step completed successfully."), BuildStep::OutputFormat::NormalMessage);
|
||||||
reportRunResult(fi, true);
|
reportRunResult(fi, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ IOutputParser *AbstractProcessStep::outputParser() const
|
|||||||
void AbstractProcessStep::emitFaultyConfigurationMessage()
|
void AbstractProcessStep::emitFaultyConfigurationMessage()
|
||||||
{
|
{
|
||||||
emit addOutput(tr("Configuration is faulty. Check the Issues view for details."),
|
emit addOutput(tr("Configuration is faulty. Check the Issues view for details."),
|
||||||
BuildStep::MessageOutput);
|
BuildStep::OutputFormat::NormalMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AbstractProcessStep::ignoreReturnValue()
|
bool AbstractProcessStep::ignoreReturnValue()
|
||||||
@@ -173,7 +173,7 @@ void AbstractProcessStep::run(QFutureInterface<bool> &fi)
|
|||||||
if (!wd.mkpath(wd.absolutePath())) {
|
if (!wd.mkpath(wd.absolutePath())) {
|
||||||
emit addOutput(tr("Could not create directory \"%1\"")
|
emit addOutput(tr("Could not create directory \"%1\"")
|
||||||
.arg(QDir::toNativeSeparators(wd.absolutePath())),
|
.arg(QDir::toNativeSeparators(wd.absolutePath())),
|
||||||
BuildStep::ErrorMessageOutput);
|
BuildStep::OutputFormat::ErrorMessage);
|
||||||
reportRunResult(fi, false);
|
reportRunResult(fi, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ void AbstractProcessStep::processStarted()
|
|||||||
emit addOutput(tr("Starting: \"%1\" %2")
|
emit addOutput(tr("Starting: \"%1\" %2")
|
||||||
.arg(QDir::toNativeSeparators(m_param.effectiveCommand()),
|
.arg(QDir::toNativeSeparators(m_param.effectiveCommand()),
|
||||||
m_param.prettyArguments()),
|
m_param.prettyArguments()),
|
||||||
BuildStep::MessageOutput);
|
BuildStep::OutputFormat::NormalMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -255,13 +255,13 @@ void AbstractProcessStep::processFinished(int exitCode, QProcess::ExitStatus sta
|
|||||||
QString command = QDir::toNativeSeparators(m_param.effectiveCommand());
|
QString command = QDir::toNativeSeparators(m_param.effectiveCommand());
|
||||||
if (status == QProcess::NormalExit && exitCode == 0) {
|
if (status == QProcess::NormalExit && exitCode == 0) {
|
||||||
emit addOutput(tr("The process \"%1\" exited normally.").arg(command),
|
emit addOutput(tr("The process \"%1\" exited normally.").arg(command),
|
||||||
BuildStep::MessageOutput);
|
BuildStep::OutputFormat::NormalMessage);
|
||||||
} else if (status == QProcess::NormalExit) {
|
} else if (status == QProcess::NormalExit) {
|
||||||
emit addOutput(tr("The process \"%1\" exited with code %2.")
|
emit addOutput(tr("The process \"%1\" exited with code %2.")
|
||||||
.arg(command, QString::number(m_process->exitCode())),
|
.arg(command, QString::number(m_process->exitCode())),
|
||||||
BuildStep::ErrorMessageOutput);
|
BuildStep::OutputFormat::ErrorMessage);
|
||||||
} else {
|
} else {
|
||||||
emit addOutput(tr("The process \"%1\" crashed.").arg(command), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("The process \"%1\" crashed.").arg(command), BuildStep::OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ void AbstractProcessStep::processStartupFailed()
|
|||||||
emit addOutput(tr("Could not start process \"%1\" %2")
|
emit addOutput(tr("Could not start process \"%1\" %2")
|
||||||
.arg(QDir::toNativeSeparators(m_param.effectiveCommand()),
|
.arg(QDir::toNativeSeparators(m_param.effectiveCommand()),
|
||||||
m_param.prettyArguments()),
|
m_param.prettyArguments()),
|
||||||
BuildStep::ErrorMessageOutput);
|
BuildStep::OutputFormat::ErrorMessage);
|
||||||
m_timer.stop();
|
m_timer.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ void AbstractProcessStep::stdOutput(const QString &line)
|
|||||||
{
|
{
|
||||||
if (m_outputParserChain)
|
if (m_outputParserChain)
|
||||||
m_outputParserChain->stdOutput(line);
|
m_outputParserChain->stdOutput(line);
|
||||||
emit addOutput(line, BuildStep::NormalOutput, BuildStep::DontAppendNewline);
|
emit addOutput(line, BuildStep::OutputFormat::Stdout, BuildStep::DontAppendNewline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractProcessStep::processReadyReadStdError()
|
void AbstractProcessStep::processReadyReadStdError()
|
||||||
@@ -337,7 +337,7 @@ void AbstractProcessStep::stdError(const QString &line)
|
|||||||
{
|
{
|
||||||
if (m_outputParserChain)
|
if (m_outputParserChain)
|
||||||
m_outputParserChain->stdError(line);
|
m_outputParserChain->stdError(line);
|
||||||
emit addOutput(line, BuildStep::ErrorOutput, BuildStep::DontAppendNewline);
|
emit addOutput(line, BuildStep::OutputFormat::Stderr, BuildStep::DontAppendNewline);
|
||||||
}
|
}
|
||||||
|
|
||||||
QFutureInterface<bool> *AbstractProcessStep::futureInterface() const
|
QFutureInterface<bool> *AbstractProcessStep::futureInterface() const
|
||||||
|
|||||||
@@ -225,14 +225,14 @@ void BuildManager::finish()
|
|||||||
QString time = format.toString(QLatin1String("h:mm:ss"));
|
QString time = format.toString(QLatin1String("h:mm:ss"));
|
||||||
if (time.startsWith(QLatin1String("0:")))
|
if (time.startsWith(QLatin1String("0:")))
|
||||||
time.remove(0, 2); // Don't display zero hours
|
time.remove(0, 2); // Don't display zero hours
|
||||||
m_instance->addToOutputWindow(tr("Elapsed time: %1.") .arg(time), BuildStep::MessageOutput);
|
m_instance->addToOutputWindow(tr("Elapsed time: %1.") .arg(time), BuildStep::OutputFormat::NormalMessage);
|
||||||
|
|
||||||
QApplication::alert(ICore::mainWindow(), 3000);
|
QApplication::alert(ICore::mainWindow(), 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildManager::emitCancelMessage()
|
void BuildManager::emitCancelMessage()
|
||||||
{
|
{
|
||||||
m_instance->addToOutputWindow(tr("Canceled build/deployment."), BuildStep::ErrorMessageOutput);
|
m_instance->addToOutputWindow(tr("Canceled build/deployment."), BuildStep::OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildManager::clearBuildQueue()
|
void BuildManager::clearBuildQueue()
|
||||||
@@ -338,7 +338,7 @@ void BuildManager::addToOutputWindow(const QString &string, BuildStep::OutputFor
|
|||||||
BuildStep::OutputNewlineSetting newlineSettings)
|
BuildStep::OutputNewlineSetting newlineSettings)
|
||||||
{
|
{
|
||||||
QString stringToWrite;
|
QString stringToWrite;
|
||||||
if (format == BuildStep::MessageOutput || format == BuildStep::ErrorMessageOutput) {
|
if (format == BuildStep::OutputFormat::NormalMessage || format == BuildStep::OutputFormat::ErrorMessage) {
|
||||||
stringToWrite = QTime::currentTime().toString();
|
stringToWrite = QTime::currentTime().toString();
|
||||||
stringToWrite += QLatin1String(": ");
|
stringToWrite += QLatin1String(": ");
|
||||||
}
|
}
|
||||||
@@ -381,13 +381,13 @@ void BuildManager::nextBuildQueue()
|
|||||||
Target *t = d->m_currentBuildStep->target();
|
Target *t = d->m_currentBuildStep->target();
|
||||||
const QString projectName = d->m_currentBuildStep->project()->displayName();
|
const QString projectName = d->m_currentBuildStep->project()->displayName();
|
||||||
const QString targetName = t->displayName();
|
const QString targetName = t->displayName();
|
||||||
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::ErrorOutput);
|
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::OutputFormat::Stderr);
|
||||||
const QList<Task> kitTasks = t->kit()->validate();
|
const QList<Task> kitTasks = t->kit()->validate();
|
||||||
if (!kitTasks.isEmpty()) {
|
if (!kitTasks.isEmpty()) {
|
||||||
addToOutputWindow(tr("The kit %1 has configuration issues which might be the root cause for this problem.")
|
addToOutputWindow(tr("The kit %1 has configuration issues which might be the root cause for this problem.")
|
||||||
.arg(targetName), BuildStep::ErrorOutput);
|
.arg(targetName), BuildStep::OutputFormat::Stderr);
|
||||||
}
|
}
|
||||||
addToOutputWindow(tr("When executing step \"%1\"").arg(d->m_currentBuildStep->displayName()), BuildStep::ErrorOutput);
|
addToOutputWindow(tr("When executing step \"%1\"").arg(d->m_currentBuildStep->displayName()), BuildStep::OutputFormat::Stderr);
|
||||||
// NBS TODO fix in qtconcurrent
|
// NBS TODO fix in qtconcurrent
|
||||||
d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100, tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName));
|
d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100, tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName));
|
||||||
|
|
||||||
@@ -432,13 +432,13 @@ void BuildManager::nextStep()
|
|||||||
if (d->m_currentBuildStep->project() != d->m_previousBuildStepProject) {
|
if (d->m_currentBuildStep->project() != d->m_previousBuildStepProject) {
|
||||||
const QString projectName = d->m_currentBuildStep->project()->displayName();
|
const QString projectName = d->m_currentBuildStep->project()->displayName();
|
||||||
addToOutputWindow(tr("Running steps for project %1...")
|
addToOutputWindow(tr("Running steps for project %1...")
|
||||||
.arg(projectName), BuildStep::MessageOutput);
|
.arg(projectName), BuildStep::OutputFormat::NormalMessage);
|
||||||
d->m_previousBuildStepProject = d->m_currentBuildStep->project();
|
d->m_previousBuildStepProject = d->m_currentBuildStep->project();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->m_skipDisabled) {
|
if (d->m_skipDisabled) {
|
||||||
addToOutputWindow(tr("Skipping disabled step %1.")
|
addToOutputWindow(tr("Skipping disabled step %1.")
|
||||||
.arg(d->m_currentBuildStep->displayName()), BuildStep::MessageOutput);
|
.arg(d->m_currentBuildStep->displayName()), BuildStep::OutputFormat::NormalMessage);
|
||||||
nextBuildQueue();
|
nextBuildQueue();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -471,7 +471,7 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names,
|
|||||||
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEPLOYMENT);
|
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
|
|
||||||
foreach (const QString &str, preambleMessage)
|
foreach (const QString &str, preambleMessage)
|
||||||
addToOutputWindow(str, BuildStep::MessageOutput, BuildStep::DontAppendNewline);
|
addToOutputWindow(str, BuildStep::OutputFormat::NormalMessage, BuildStep::DontAppendNewline);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<const BuildStep *> earlierSteps;
|
QList<const BuildStep *> earlierSteps;
|
||||||
@@ -496,8 +496,8 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names,
|
|||||||
// print something for the user
|
// print something for the user
|
||||||
const QString projectName = bs->project()->displayName();
|
const QString projectName = bs->project()->displayName();
|
||||||
const QString targetName = bs->target()->displayName();
|
const QString targetName = bs->target()->displayName();
|
||||||
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::ErrorOutput);
|
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::OutputFormat::Stderr);
|
||||||
addToOutputWindow(tr("When executing step \"%1\"").arg(bs->displayName()), BuildStep::ErrorOutput);
|
addToOutputWindow(tr("When executing step \"%1\"").arg(bs->displayName()), BuildStep::OutputFormat::Stderr);
|
||||||
|
|
||||||
// disconnect the buildsteps again
|
// disconnect the buildsteps again
|
||||||
for (int j = 0; j <= i; ++j)
|
for (int j = 0; j <= i; ++j)
|
||||||
|
|||||||
@@ -72,7 +72,11 @@ public:
|
|||||||
Target *target() const;
|
Target *target() const;
|
||||||
Project *project() const;
|
Project *project() const;
|
||||||
|
|
||||||
enum OutputFormat { NormalOutput, ErrorOutput, MessageOutput, ErrorMessageOutput };
|
enum class OutputFormat {
|
||||||
|
Stdout, Stderr, // These are for forwarded output from external tools
|
||||||
|
NormalMessage, ErrorMessage // These are for messages from Creator itself
|
||||||
|
};
|
||||||
|
|
||||||
enum OutputNewlineSetting { DoAppendNewline, DontAppendNewline };
|
enum OutputNewlineSetting { DoAppendNewline, DontAppendNewline };
|
||||||
|
|
||||||
static void reportRunResult(QFutureInterface<bool> &fi, bool success);
|
static void reportRunResult(QFutureInterface<bool> &fi, bool success);
|
||||||
|
|||||||
@@ -254,18 +254,18 @@ void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputForma
|
|||||||
Theme *theme = Utils::creatorTheme();
|
Theme *theme = Utils::creatorTheme();
|
||||||
QTextCharFormat textFormat;
|
QTextCharFormat textFormat;
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case BuildStep::NormalOutput:
|
case BuildStep::OutputFormat::Stdout:
|
||||||
textFormat.setForeground(theme->color(Theme::TextColorNormal));
|
textFormat.setForeground(theme->color(Theme::TextColorNormal));
|
||||||
textFormat.setFontWeight(QFont::Normal);
|
textFormat.setFontWeight(QFont::Normal);
|
||||||
break;
|
break;
|
||||||
case BuildStep::ErrorOutput:
|
case BuildStep::OutputFormat::Stderr:
|
||||||
textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
|
textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
|
||||||
textFormat.setFontWeight(QFont::Normal);
|
textFormat.setFontWeight(QFont::Normal);
|
||||||
break;
|
break;
|
||||||
case BuildStep::MessageOutput:
|
case BuildStep::OutputFormat::NormalMessage:
|
||||||
textFormat.setForeground(theme->color(Theme::OutputPanes_MessageOutput));
|
textFormat.setForeground(theme->color(Theme::OutputPanes_MessageOutput));
|
||||||
break;
|
break;
|
||||||
case BuildStep::ErrorMessageOutput:
|
case BuildStep::OutputFormat::ErrorMessage:
|
||||||
textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
|
textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
|
||||||
textFormat.setFontWeight(QFont::Bold);
|
textFormat.setFontWeight(QFont::Bold);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ bool DeviceCheckBuildStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
Core::Id deviceTypeId = DeviceTypeKitInformation::deviceTypeId(target()->kit());
|
Core::Id deviceTypeId = DeviceTypeKitInformation::deviceTypeId(target()->kit());
|
||||||
IDeviceFactory *factory = IDeviceFactory::find(deviceTypeId);
|
IDeviceFactory *factory = IDeviceFactory::find(deviceTypeId);
|
||||||
if (!factory || !factory->canCreate()) {
|
if (!factory || !factory->canCreate()) {
|
||||||
emit addOutput(tr("No device configured."), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("No device configured."), BuildStep::OutputFormat::ErrorMessage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,13 +64,13 @@ bool DeviceCheckBuildStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
QMessageBox::Yes|QMessageBox::No);
|
QMessageBox::Yes|QMessageBox::No);
|
||||||
msgBox.setDefaultButton(QMessageBox::Yes);
|
msgBox.setDefaultButton(QMessageBox::Yes);
|
||||||
if (msgBox.exec() == QMessageBox::No) {
|
if (msgBox.exec() == QMessageBox::No) {
|
||||||
emit addOutput(tr("No device configured."), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("No device configured."), BuildStep::OutputFormat::ErrorMessage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
IDevice::Ptr newDevice = factory->create(deviceTypeId);
|
IDevice::Ptr newDevice = factory->create(deviceTypeId);
|
||||||
if (newDevice.isNull()) {
|
if (newDevice.isNull()) {
|
||||||
emit addOutput(tr("No device configured."), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("No device configured."), BuildStep::OutputFormat::ErrorMessage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ void OutputParserTester::testOutputMangling(const QString &input,
|
|||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
childParser()->outputAdded(input, BuildStep::NormalOutput);
|
childParser()->outputAdded(input, BuildStep::OutputFormat::Stdout);
|
||||||
|
|
||||||
QCOMPARE(m_receivedOutput, output);
|
QCOMPARE(m_receivedOutput, output);
|
||||||
QVERIFY(m_receivedStdErrChildLine.isNull());
|
QVERIFY(m_receivedStdErrChildLine.isNull());
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ void QbsBuildStep::handleProgress(int value)
|
|||||||
void QbsBuildStep::handleCommandDescriptionReport(const QString &highlight, const QString &message)
|
void QbsBuildStep::handleCommandDescriptionReport(const QString &highlight, const QString &message)
|
||||||
{
|
{
|
||||||
Q_UNUSED(highlight);
|
Q_UNUSED(highlight);
|
||||||
emit addOutput(message, NormalOutput);
|
emit addOutput(message, OutputFormat::Stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsBuildStep::handleProcessResultReport(const qbs::ProcessResult &result)
|
void QbsBuildStep::handleProcessResultReport(const qbs::ProcessResult &result)
|
||||||
@@ -370,15 +370,15 @@ void QbsBuildStep::handleProcessResultReport(const qbs::ProcessResult &result)
|
|||||||
|
|
||||||
QString commandline = result.executableFilePath() + QLatin1Char(' ')
|
QString commandline = result.executableFilePath() + QLatin1Char(' ')
|
||||||
+ Utils::QtcProcess::joinArgs(result.arguments());
|
+ Utils::QtcProcess::joinArgs(result.arguments());
|
||||||
addOutput(commandline, NormalOutput);
|
addOutput(commandline, OutputFormat::Stdout);
|
||||||
|
|
||||||
foreach (const QString &line, result.stdErr()) {
|
foreach (const QString &line, result.stdErr()) {
|
||||||
m_parser->stdError(line);
|
m_parser->stdError(line);
|
||||||
addOutput(line, ErrorOutput);
|
addOutput(line, OutputFormat::Stderr);
|
||||||
}
|
}
|
||||||
foreach (const QString &line, result.stdOut()) {
|
foreach (const QString &line, result.stdOut()) {
|
||||||
m_parser->stdOutput(line);
|
m_parser->stdOutput(line);
|
||||||
addOutput(line, NormalOutput);
|
addOutput(line, OutputFormat::Stdout);
|
||||||
}
|
}
|
||||||
m_parser->flush();
|
m_parser->flush();
|
||||||
}
|
}
|
||||||
@@ -390,7 +390,7 @@ void QbsBuildStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type, con
|
|||||||
Utils::FileName::fromString(file), line,
|
Utils::FileName::fromString(file), line,
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
|
ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
|
||||||
emit addTask(task, 1);
|
emit addTask(task, 1);
|
||||||
emit addOutput(message, NormalOutput);
|
emit addOutput(message, OutputFormat::Stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QbsBuildStep::buildVariant() const
|
QString QbsBuildStep::buildVariant() const
|
||||||
@@ -480,7 +480,7 @@ void QbsBuildStep::build()
|
|||||||
QString error;
|
QString error;
|
||||||
m_job = qbsProject()->build(options, m_products, error);
|
m_job = qbsProject()->build(options, m_products, error);
|
||||||
if (!m_job) {
|
if (!m_job) {
|
||||||
emit addOutput(error, ErrorMessageOutput);
|
emit addOutput(error, OutputFormat::ErrorMessage);
|
||||||
reportRunResult(*m_fi, false);
|
reportRunResult(*m_fi, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ void QbsCleanStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type, con
|
|||||||
Utils::FileName::fromString(file), line,
|
Utils::FileName::fromString(file), line,
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
|
ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
|
||||||
emit addTask(task, 1);
|
emit addTask(task, 1);
|
||||||
emit addOutput(message, NormalOutput);
|
emit addOutput(message, OutputFormat::Stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsCleanStep::setDryRun(bool dr)
|
void QbsCleanStep::setDryRun(bool dr)
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ void QbsInstallStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type,
|
|||||||
Utils::FileName::fromString(file), line,
|
Utils::FileName::fromString(file), line,
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
|
ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
|
||||||
emit addTask(task, 1);
|
emit addTask(task, 1);
|
||||||
emit addOutput(message, NormalOutput);
|
emit addOutput(message, OutputFormat::Stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsInstallStep::setInstallRoot(const QString &ir)
|
void QbsInstallStep::setInstallRoot(const QString &ir)
|
||||||
|
|||||||
@@ -103,9 +103,9 @@ void AndroidPackageInstallationStep::run(QFutureInterface<bool> &fi)
|
|||||||
foreach (const QString &dir, m_androidDirsToClean) {
|
foreach (const QString &dir, m_androidDirsToClean) {
|
||||||
Utils::FileName androidDir = Utils::FileName::fromString(dir);
|
Utils::FileName androidDir = Utils::FileName::fromString(dir);
|
||||||
if (!dir.isEmpty() && androidDir.exists()) {
|
if (!dir.isEmpty() && androidDir.exists()) {
|
||||||
emit addOutput(tr("Removing directory %1").arg(dir), MessageOutput);
|
emit addOutput(tr("Removing directory %1").arg(dir), OutputFormat::NormalMessage);
|
||||||
if (!Utils::FileUtils::removeRecursively(androidDir, &error)) {
|
if (!Utils::FileUtils::removeRecursively(androidDir, &error)) {
|
||||||
emit addOutput(error, ErrorOutput);
|
emit addOutput(error, OutputFormat::Stderr);
|
||||||
reportRunResult(fi, false);
|
reportRunResult(fi, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ Utils::FileName QmakeAndroidBuildApkStep::androidPackageSourceDir() const
|
|||||||
bool QmakeAndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
bool QmakeAndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
||||||
{
|
{
|
||||||
if (AndroidManager::checkForQt51Files(project()->projectDirectory()))
|
if (AndroidManager::checkForQt51Files(project()->projectDirectory()))
|
||||||
emit addOutput(tr("Found old folder \"android\" in source directory. Qt 5.2 does not use that folder by default."), ErrorOutput);
|
emit addOutput(tr("Found old folder \"android\" in source directory. Qt 5.2 does not use that folder by default."), OutputFormat::Stderr);
|
||||||
|
|
||||||
if (!AndroidBuildApkStep::init(earlierSteps))
|
if (!AndroidBuildApkStep::init(earlierSteps))
|
||||||
return false;
|
return false;
|
||||||
@@ -221,7 +221,7 @@ bool QmakeAndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
void QmakeAndroidBuildApkStep::run(QFutureInterface<bool> &fi)
|
void QmakeAndroidBuildApkStep::run(QFutureInterface<bool> &fi)
|
||||||
{
|
{
|
||||||
if (m_skipBuilding) {
|
if (m_skipBuilding) {
|
||||||
emit addOutput(tr("No application .pro file found, not building an APK."), BuildStep::ErrorMessageOutput);
|
emit addOutput(tr("No application .pro file found, not building an APK."), BuildStep::OutputFormat::ErrorMessage);
|
||||||
reportRunResult(fi, true);
|
reportRunResult(fi, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -247,7 +247,7 @@ void QmakeAndroidBuildApkStep::processStarted()
|
|||||||
emit addOutput(tr("Starting: \"%1\" %2")
|
emit addOutput(tr("Starting: \"%1\" %2")
|
||||||
.arg(QDir::toNativeSeparators(m_command),
|
.arg(QDir::toNativeSeparators(m_command),
|
||||||
m_argumentsPasswordConcealed),
|
m_argumentsPasswordConcealed),
|
||||||
BuildStep::MessageOutput);
|
BuildStep::OutputFormat::NormalMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::BuildStepConfigWidget *QmakeAndroidBuildApkStep::createConfigWidget()
|
ProjectExplorer::BuildStepConfigWidget *QmakeAndroidBuildApkStep::createConfigWidget()
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ void MakeStep::run(QFutureInterface<bool> & fi)
|
|||||||
|
|
||||||
if (!QFileInfo::exists(m_makeFileToCheck)) {
|
if (!QFileInfo::exists(m_makeFileToCheck)) {
|
||||||
if (!ignoreReturnValue())
|
if (!ignoreReturnValue())
|
||||||
emit addOutput(tr("Cannot find Makefile. Check your build settings."), BuildStep::MessageOutput);
|
emit addOutput(tr("Cannot find Makefile. Check your build settings."), BuildStep::OutputFormat::NormalMessage);
|
||||||
const bool success = ignoreReturnValue();
|
const bool success = ignoreReturnValue();
|
||||||
reportRunResult(fi, success);
|
reportRunResult(fi, success);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ void QMakeStep::run(QFutureInterface<bool> &fi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_needToRunQMake) {
|
if (!m_needToRunQMake) {
|
||||||
emit addOutput(tr("Configuration unchanged, skipping qmake step."), BuildStep::MessageOutput);
|
emit addOutput(tr("Configuration unchanged, skipping qmake step."), BuildStep::OutputFormat::NormalMessage);
|
||||||
reportRunResult(fi, true);
|
reportRunResult(fi, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ void AbstractPackagingStep::raiseError(const QString &errorMessage)
|
|||||||
Task task = Task(Task::Error, errorMessage, Utils::FileName(), -1,
|
Task task = Task(Task::Error, errorMessage, Utils::FileName(), -1,
|
||||||
Constants::TASK_CATEGORY_DEPLOYMENT);
|
Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
emit addTask(task);
|
emit addTask(task);
|
||||||
emit addOutput(errorMessage, BuildStep::ErrorOutput);
|
emit addOutput(errorMessage, BuildStep::OutputFormat::Stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractPackagingStep::raiseWarning(const QString &warningMessage)
|
void AbstractPackagingStep::raiseWarning(const QString &warningMessage)
|
||||||
@@ -177,7 +177,7 @@ void AbstractPackagingStep::raiseWarning(const QString &warningMessage)
|
|||||||
Task task = Task(Task::Warning, warningMessage, Utils::FileName(), -1,
|
Task task = Task(Task::Warning, warningMessage, Utils::FileName(), -1,
|
||||||
Constants::TASK_CATEGORY_DEPLOYMENT);
|
Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
emit addTask(task);
|
emit addTask(task);
|
||||||
emit addOutput(warningMessage, ErrorMessageOutput);
|
emit addOutput(warningMessage, OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ bool AbstractRemoteLinuxDeployStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
deployService()->setTarget(target());
|
deployService()->setTarget(target());
|
||||||
const bool canDeploy = initInternal(&error);
|
const bool canDeploy = initInternal(&error);
|
||||||
if (!canDeploy)
|
if (!canDeploy)
|
||||||
emit addOutput(tr("Cannot deploy: %1").arg(error), ErrorMessageOutput);
|
emit addOutput(tr("Cannot deploy: %1").arg(error), OutputFormat::ErrorMessage);
|
||||||
return canDeploy;
|
return canDeploy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,8 @@ void AbstractRemoteLinuxDeployStep::cancel()
|
|||||||
if (d->hasError)
|
if (d->hasError)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit addOutput(tr("User requests deployment to stop; cleaning up."), MessageOutput);
|
emit addOutput(tr("User requests deployment to stop; cleaning up."),
|
||||||
|
OutputFormat::NormalMessage);
|
||||||
d->hasError = true;
|
d->hasError = true;
|
||||||
deployService()->stop();
|
deployService()->stop();
|
||||||
}
|
}
|
||||||
@@ -127,7 +128,7 @@ RemoteLinuxDeployConfiguration *AbstractRemoteLinuxDeployStep::deployConfigurati
|
|||||||
|
|
||||||
void AbstractRemoteLinuxDeployStep::handleProgressMessage(const QString &message)
|
void AbstractRemoteLinuxDeployStep::handleProgressMessage(const QString &message)
|
||||||
{
|
{
|
||||||
emit addOutput(message, MessageOutput);
|
emit addOutput(message, OutputFormat::NormalMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployStep::handleErrorMessage(const QString &message)
|
void AbstractRemoteLinuxDeployStep::handleErrorMessage(const QString &message)
|
||||||
@@ -135,7 +136,7 @@ void AbstractRemoteLinuxDeployStep::handleErrorMessage(const QString &message)
|
|||||||
ProjectExplorer::Task task = Task(Task::Error, message, Utils::FileName(), -1,
|
ProjectExplorer::Task task = Task(Task::Error, message, Utils::FileName(), -1,
|
||||||
Constants::TASK_CATEGORY_DEPLOYMENT);
|
Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
emit addTask(task, 1); // TODO correct?
|
emit addTask(task, 1); // TODO correct?
|
||||||
emit addOutput(message, ErrorMessageOutput);
|
emit addOutput(message, OutputFormat::ErrorMessage);
|
||||||
d->hasError = true;
|
d->hasError = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,27 +145,27 @@ void AbstractRemoteLinuxDeployStep::handleWarningMessage(const QString &message)
|
|||||||
ProjectExplorer::Task task = Task(Task::Warning, message, Utils::FileName(), -1,
|
ProjectExplorer::Task task = Task(Task::Warning, message, Utils::FileName(), -1,
|
||||||
Constants::TASK_CATEGORY_DEPLOYMENT);
|
Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
emit addTask(task, 1); // TODO correct?
|
emit addTask(task, 1); // TODO correct?
|
||||||
emit addOutput(message, ErrorMessageOutput);
|
emit addOutput(message, OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployStep::handleFinished()
|
void AbstractRemoteLinuxDeployStep::handleFinished()
|
||||||
{
|
{
|
||||||
if (d->hasError)
|
if (d->hasError)
|
||||||
emit addOutput(tr("Deploy step failed."), ErrorMessageOutput);
|
emit addOutput(tr("Deploy step failed."), OutputFormat::ErrorMessage);
|
||||||
else
|
else
|
||||||
emit addOutput(tr("Deploy step finished."), MessageOutput);
|
emit addOutput(tr("Deploy step finished."), OutputFormat::NormalMessage);
|
||||||
disconnect(deployService(), 0, this, 0);
|
disconnect(deployService(), 0, this, 0);
|
||||||
reportRunResult(d->future, !d->hasError);
|
reportRunResult(d->future, !d->hasError);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployStep::handleStdOutData(const QString &data)
|
void AbstractRemoteLinuxDeployStep::handleStdOutData(const QString &data)
|
||||||
{
|
{
|
||||||
emit addOutput(data, NormalOutput, DontAppendNewline);
|
emit addOutput(data, OutputFormat::Stdout, DontAppendNewline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployStep::handleStdErrData(const QString &data)
|
void AbstractRemoteLinuxDeployStep::handleStdErrData(const QString &data)
|
||||||
{
|
{
|
||||||
emit addOutput(data, ErrorOutput, DontAppendNewline);
|
emit addOutput(data, OutputFormat::Stderr, DontAppendNewline);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
|||||||
@@ -175,9 +175,9 @@ void TarPackageCreationStep::run(QFutureInterface<bool> &fi)
|
|||||||
|
|
||||||
setPackagingFinished(success);
|
setPackagingFinished(success);
|
||||||
if (success)
|
if (success)
|
||||||
emit addOutput(tr("Packaging finished successfully."), MessageOutput);
|
emit addOutput(tr("Packaging finished successfully."), OutputFormat::NormalMessage);
|
||||||
else
|
else
|
||||||
emit addOutput(tr("Packaging failed."), ErrorMessageOutput);
|
emit addOutput(tr("Packaging failed."), OutputFormat::ErrorMessage);
|
||||||
|
|
||||||
connect(BuildManager::instance(), &BuildManager::buildQueueFinished,
|
connect(BuildManager::instance(), &BuildManager::buildQueueFinished,
|
||||||
this, &TarPackageCreationStep::deployFinished);
|
this, &TarPackageCreationStep::deployFinished);
|
||||||
@@ -236,9 +236,9 @@ void TarPackageCreationStep::addNeededDeploymentFiles(
|
|||||||
|
|
||||||
bool TarPackageCreationStep::doPackage(QFutureInterface<bool> &fi)
|
bool TarPackageCreationStep::doPackage(QFutureInterface<bool> &fi)
|
||||||
{
|
{
|
||||||
emit addOutput(tr("Creating tarball..."), MessageOutput);
|
emit addOutput(tr("Creating tarball..."), OutputFormat::NormalMessage);
|
||||||
if (!m_packagingNeeded) {
|
if (!m_packagingNeeded) {
|
||||||
emit addOutput(tr("Tarball up to date, skipping packaging."), MessageOutput);
|
emit addOutput(tr("Tarball up to date, skipping packaging."), OutputFormat::NormalMessage);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ bool TarPackageCreationStep::doPackage(QFutureInterface<bool> &fi)
|
|||||||
foreach (const DeployableFile &d, m_files) {
|
foreach (const DeployableFile &d, m_files) {
|
||||||
if (d.remoteDirectory().isEmpty()) {
|
if (d.remoteDirectory().isEmpty()) {
|
||||||
emit addOutput(tr("No remote path specified for file \"%1\", skipping.")
|
emit addOutput(tr("No remote path specified for file \"%1\", skipping.")
|
||||||
.arg(d.localFilePath().toUserOutput()), ErrorMessageOutput);
|
.arg(d.localFilePath().toUserOutput()), OutputFormat::ErrorMessage);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QFileInfo fileInfo = d.localFilePath().toFileInfo();
|
QFileInfo fileInfo = d.localFilePath().toFileInfo();
|
||||||
@@ -307,7 +307,8 @@ bool TarPackageCreationStep::appendFile(QFile &tarFile, const QFileInfo &fileInf
|
|||||||
|
|
||||||
const int chunkSize = 1024*1024;
|
const int chunkSize = 1024*1024;
|
||||||
|
|
||||||
emit addOutput(tr("Adding file \"%1\" to tarball...").arg(nativePath), MessageOutput);
|
emit addOutput(tr("Adding file \"%1\" to tarball...").arg(nativePath),
|
||||||
|
OutputFormat::NormalMessage);
|
||||||
|
|
||||||
// TODO: Wasteful. Work with fixed-size buffer.
|
// TODO: Wasteful. Work with fixed-size buffer.
|
||||||
while (!file.atEnd() && file.error() == QFile::NoError && tarFile.error() == QFile::NoError) {
|
while (!file.atEnd() && file.error() == QFile::NoError && tarFile.error() == QFile::NoError) {
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ void WinRtPackageDeploymentStep::raiseError(const QString &errorMessage)
|
|||||||
ProjectExplorer::Task task = Task(Task::Error, errorMessage, Utils::FileName(), -1,
|
ProjectExplorer::Task task = Task(Task::Error, errorMessage, Utils::FileName(), -1,
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
emit addTask(task, 1);
|
emit addTask(task, 1);
|
||||||
emit addOutput(errorMessage, BuildStep::ErrorMessageOutput);
|
emit addOutput(errorMessage, BuildStep::OutputFormat::ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinRtPackageDeploymentStep::raiseWarning(const QString &warningMessage)
|
void WinRtPackageDeploymentStep::raiseWarning(const QString &warningMessage)
|
||||||
@@ -249,7 +249,7 @@ void WinRtPackageDeploymentStep::raiseWarning(const QString &warningMessage)
|
|||||||
ProjectExplorer::Task task = Task(Task::Warning, warningMessage, Utils::FileName(), -1,
|
ProjectExplorer::Task task = Task(Task::Warning, warningMessage, Utils::FileName(), -1,
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
emit addTask(task, 1);
|
emit addTask(task, 1);
|
||||||
emit addOutput(warningMessage, BuildStep::MessageOutput);
|
emit addOutput(warningMessage, BuildStep::OutputFormat::NormalMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WinRtPackageDeploymentStep::fromMap(const QVariantMap &map)
|
bool WinRtPackageDeploymentStep::fromMap(const QVariantMap &map)
|
||||||
|
|||||||
Reference in New Issue
Block a user