From 00b22e40fe63654cd17c3e3347bc96ef47d67923 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 20 Feb 2017 12:27:37 +0100 Subject: [PATCH] QMake build step: Add missing error messages Print error messages whenever initialization of the QMake build step fails. Change-Id: Id39795219ec74591a78b8db4d0a381e072261f51 Reviewed-by: Leena Miettinen Reviewed-by: Tobias Hunger --- src/plugins/qmakeprojectmanager/qmakestep.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index e20fe2f3853..50f99b1e453 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -192,8 +192,10 @@ bool QMakeStep::init(QList &earlierSteps) QmakeBuildConfiguration *qmakeBc = qmakeBuildConfiguration(); const BaseQtVersion *qtVersion = QtKitInformation::qtVersion(target()->kit()); - if (!qtVersion) + if (!qtVersion) { + emit addOutput(tr("No Qt version configured."), BuildStep::OutputFormat::ErrorMessage); return false; + } QString workingDirectory; @@ -207,8 +209,12 @@ bool QMakeStep::init(QList &earlierSteps) m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0)); if (m_runMakeQmake) { m_makeExecutable = makeCommand(); - if (m_makeExecutable.isEmpty()) + if (m_makeExecutable.isEmpty()) { + emit addOutput(tr("Could not determine which \"make\" command to run. " + "Check the \"make\" step in the build configuration."), + BuildStep::OutputFormat::ErrorMessage); return false; + } m_makeArguments = makeArguments(); } else { m_makeExecutable.clear();