forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/12.0' into qds/dev
Change-Id: I0a598ba1b4d57be361a7a203d0c39e99b5cd5fba
This commit is contained in:
@@ -228,6 +228,7 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) :
|
||||
stagingDir.setSettingsKey(STAGING_DIR_KEY);
|
||||
stagingDir.setLabelText(Tr::tr("Staging directory:"));
|
||||
stagingDir.setDefaultValue(initialStagingDir(kit()));
|
||||
stagingDir.setExpectedKind(PathChooser::Kind::Directory);
|
||||
|
||||
Kit *kit = buildConfiguration()->kit();
|
||||
if (CMakeBuildConfiguration::isIos(kit)) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
#include <cppeditor/cppprojectupdater.h>
|
||||
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/extracompiler.h>
|
||||
#include <projectexplorer/kitaspects.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
@@ -1299,7 +1300,8 @@ void CMakeBuildSystem::wireUpConnections()
|
||||
});
|
||||
|
||||
connect(project(), &Project::projectFileIsDirty, this, [this] {
|
||||
if (buildConfiguration()->isActive() && !isParsing()) {
|
||||
const bool isBuilding = BuildManager::isBuilding(project());
|
||||
if (buildConfiguration()->isActive() && !isParsing() && !isBuilding) {
|
||||
if (settings().autorunCMake()) {
|
||||
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to dirty project file";
|
||||
reparse(CMakeBuildSystem::REPARSE_FORCE_CMAKE_RUN);
|
||||
|
||||
@@ -314,7 +314,9 @@ static void updateCMakeConfigurationWithLocalData(CMakeConfig &cmakeCache,
|
||||
return var == "CMAKE_PREFIX_PATH" || var == "CMAKE_MODULE_PATH";
|
||||
};
|
||||
|
||||
const FilePath projectDir = ProjectTree::currentBuildSystem()->projectDirectory();
|
||||
const FilePath projectDir = ProjectTree::currentBuildSystem()
|
||||
? ProjectTree::currentBuildSystem()->projectDirectory()
|
||||
: currentDir;
|
||||
auto updateDirVariables = [currentDir, projectDir, cmakeCache](QByteArray &value) {
|
||||
value.replace("${CMAKE_CURRENT_SOURCE_DIR}", currentDir.path().toUtf8());
|
||||
value.replace("${CMAKE_CURRENT_LIST_DIR}", currentDir.path().toUtf8());
|
||||
|
||||
@@ -202,22 +202,25 @@ void CMakeParser::flush()
|
||||
if (m_lastTask.isNull())
|
||||
return;
|
||||
|
||||
if (m_lastTask.summary.isEmpty() && !m_lastTask.details.isEmpty())
|
||||
m_lastTask.summary = m_lastTask.details.takeFirst();
|
||||
m_lines += m_lastTask.details.count();
|
||||
Task t = m_lastTask;
|
||||
m_lastTask.clear();
|
||||
|
||||
if (m_callStack) {
|
||||
m_lastTask.file = m_callStack.value().last().file;
|
||||
m_lastTask.line = m_callStack.value().last().line;
|
||||
if (t.summary.isEmpty() && !t.details.isEmpty())
|
||||
t.summary = t.details.takeFirst();
|
||||
m_lines += t.details.count();
|
||||
|
||||
if (m_callStack.has_value() && !m_callStack.value().isEmpty()) {
|
||||
t.file = m_callStack.value().last().file;
|
||||
t.line = m_callStack.value().last().line;
|
||||
|
||||
LinkSpecs specs;
|
||||
m_lastTask.details << QString();
|
||||
m_lastTask.details << Tr::tr("Call stack:");
|
||||
t.details << QString();
|
||||
t.details << Tr::tr("Call stack:");
|
||||
m_lines += 2;
|
||||
|
||||
m_callStack->push_front(m_errorOrWarningLine);
|
||||
|
||||
int offset = m_lastTask.details.join('\n').size();
|
||||
int offset = t.details.join('\n').size();
|
||||
Utils::reverseForeach(m_callStack.value(), [&](const auto &line) {
|
||||
const QString fileAndLine = QString("%1:%2").arg(line.file.path()).arg(line.line);
|
||||
const QString completeLine = QString(" %1%2").arg(fileAndLine).arg(line.function);
|
||||
@@ -228,16 +231,14 @@ void CMakeParser::flush()
|
||||
int(fileAndLine.length()),
|
||||
createLinkTarget(line.file, line.line, -1)});
|
||||
|
||||
m_lastTask.details << completeLine;
|
||||
t.details << completeLine;
|
||||
offset += completeLine.length() - 2;
|
||||
++m_lines;
|
||||
});
|
||||
|
||||
setDetailsFormat(m_lastTask, specs);
|
||||
setDetailsFormat(t, specs);
|
||||
}
|
||||
|
||||
Task t = m_lastTask;
|
||||
m_lastTask.clear();
|
||||
scheduleTask(t, m_lines, 1);
|
||||
m_lines = 0;
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ CMakeManager::CMakeManager()
|
||||
mdebugger->addAction(command, Constants::CMAKE_DEBUGGING_GROUP);
|
||||
connect(m_cmakeDebuggerAction, &QAction::triggered, this, [] {
|
||||
ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE,
|
||||
false);
|
||||
true);
|
||||
});
|
||||
|
||||
connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, [this] {
|
||||
|
||||
@@ -121,6 +121,10 @@ public:
|
||||
m_tooltip += "<br>" + Tr::tr("Detection source: \"%1\"").arg(m_detectionSource);
|
||||
|
||||
m_versionDisplay = cmake.versionDisplay();
|
||||
|
||||
// Make sure to always have the right version in the name for Qt SDK CMake installations
|
||||
if (m_name.startsWith("CMake") && m_name.endsWith("(Qt)"))
|
||||
m_name = QString("CMake %1 (Qt)").arg(m_versionDisplay);
|
||||
}
|
||||
|
||||
CMakeToolTreeItem() = default;
|
||||
|
||||
Reference in New Issue
Block a user