forked from qt-creator/qt-creator
Do not try to build in Qt4 makestep without a tool chain
Reviewed-by: dt
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
#include <projectexplorer/buildsteplist.h>
|
#include <projectexplorer/buildsteplist.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
@@ -129,6 +130,14 @@ bool MakeStep::fromMap(const QVariantMap &map)
|
|||||||
bool MakeStep::init()
|
bool MakeStep::init()
|
||||||
{
|
{
|
||||||
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
|
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
|
||||||
|
|
||||||
|
if (!bc->toolChain()) {
|
||||||
|
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
|
||||||
|
tr("Qt Creator needs a tool chain set up to build. Please configure a tool chain in Project mode."),
|
||||||
|
QString(), -1,
|
||||||
|
QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
|
||||||
|
}
|
||||||
|
|
||||||
ProjectExplorer::ProcessParameters *pp = processParameters();
|
ProjectExplorer::ProcessParameters *pp = processParameters();
|
||||||
pp->setMacroExpander(bc->macroExpander());
|
pp->setMacroExpander(bc->macroExpander());
|
||||||
|
|
||||||
@@ -205,6 +214,20 @@ void MakeStep::run(QFutureInterface<bool> & fi)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Warn on common error conditions:
|
||||||
|
bool canContinue = true;
|
||||||
|
foreach (const ProjectExplorer::Task &t, m_tasks) {
|
||||||
|
addTask(t);
|
||||||
|
if (t.type == ProjectExplorer::Task::Error)
|
||||||
|
canContinue = false;
|
||||||
|
}
|
||||||
|
if (!canContinue) {
|
||||||
|
emit addOutput(tr("Configuration is faulty, please check the Build Issues view for details."), BuildStep::MessageOutput);
|
||||||
|
fi.reportResult(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
AbstractProcessStep::run(fi);
|
AbstractProcessStep::run(fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include <projectexplorer/abstractprocessstep.h>
|
#include <projectexplorer/abstractprocessstep.h>
|
||||||
#include <projectexplorer/buildstep.h>
|
#include <projectexplorer/buildstep.h>
|
||||||
|
#include <projectexplorer/task.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -116,6 +117,7 @@ private:
|
|||||||
bool m_clean;
|
bool m_clean;
|
||||||
QString m_userArgs;
|
QString m_userArgs;
|
||||||
QString m_makeCmd;
|
QString m_makeCmd;
|
||||||
|
QList<ProjectExplorer::Task> m_tasks;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MakeStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
class MakeStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||||
|
Reference in New Issue
Block a user