Merge remote-tracking branch 'origin/4.12'

Change-Id: I3e7049da2c3da6f784e3cb3407c22ada556e5d24
This commit is contained in:
Eike Ziller
2020-02-26 08:35:05 +01:00
419 changed files with 18939 additions and 2729 deletions

View File

@@ -158,7 +158,7 @@ bool CMakeBuildStep::init()
QTC_ASSERT(bc, return false);
if (!bc->isEnabled()) {
emit addTask(BuildSystemTask(Task::Error,
tr("CMakeProjectManager::CMakeBuildStep")));
tr("The build configuration is currently disabled.")));
canInit = false;
}

View File

@@ -26,6 +26,7 @@
#include "cmakebuildsystem.h"
#include "cmakebuildconfiguration.h"
#include "cmakekitinformation.h"
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
#include "cmakeprojectnodes.h"
@@ -204,10 +205,13 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
connect(project(), &Project::projectFileIsDirty, this, [this]() {
if (m_buildConfiguration->isActive()) {
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to dirty project file";
m_buildDirManager
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
BuildDirManager::REPARSE_DEFAULT);
const auto cmake = CMakeKitAspect::cmakeTool(m_buildConfiguration->target()->kit());
if (cmake && cmake->isAutoRun()) {
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to dirty project file";
m_buildDirManager.setParametersAndRequestParse(BuildDirParameters(
m_buildConfiguration),
BuildDirManager::REPARSE_DEFAULT);
}
}
});
@@ -269,7 +273,7 @@ QStringList CMakeBuildSystem::filesGeneratedFrom(const QString &sourceFile) cons
QDir srcDirRoot = QDir(project.toString());
QString relativePath = srcDirRoot.relativeFilePath(baseDirectory.toString());
QDir buildDir = QDir(target()->activeBuildConfiguration()->buildDirectory().toString());
QDir buildDir = QDir(buildConfiguration()->buildDirectory().toString());
QString generatedFilePath = buildDir.absoluteFilePath(relativePath);
if (fi.suffix() == "ui") {

View File

@@ -368,7 +368,6 @@ private:
// Disable help button in titlebar on windows:
Qt::WindowFlags flags = changeDialog->windowFlags();
flags &= ~Qt::WindowContextHelpButtonHint;
flags |= Qt::MSWindowsFixedSizeDialogHint;
changeDialog->setWindowFlags(flags);

View File

@@ -63,18 +63,7 @@ using namespace FileApiDetails;
// FileApiReader:
// --------------------------------------------------------------------
FileApiReader::FileApiReader()
{
connect(Core::EditorManager::instance(),
&Core::EditorManager::aboutToSave,
this,
[this](const Core::IDocument *document) {
if (m_cmakeFiles.contains(document->filePath())) {
qCDebug(cmakeFileApiMode) << "FileApiReader: DIRTY SIGNAL";
emit dirty();
}
});
}
FileApiReader::FileApiReader() {}
FileApiReader::~FileApiReader()
{

View File

@@ -207,8 +207,15 @@ void ServerMode::connectToServer()
auto socket = new QLocalSocket(m_cmakeProcess.get());
connect(socket, &QLocalSocket::readyRead, this, &ServerMode::handleRawCMakeServerData);
connect(socket, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error),
this, [this, socket]() {
constexpr void (QLocalSocket::*LocalSocketErrorFunction)(QLocalSocket::LocalSocketError)
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
= &QLocalSocket::error;
#else
= &QLocalSocket::errorOccurred;
#endif
connect(socket, LocalSocketErrorFunction, this, [this, socket]() {
reportError(socket->errorString());
m_cmakeSocket = nullptr;
socket->disconnect();

View File

@@ -73,12 +73,6 @@ const int MAX_PROGRESS = 1400;
ServerModeReader::ServerModeReader()
{
connect(Core::EditorManager::instance(), &Core::EditorManager::aboutToSave,
this, [this](const Core::IDocument *document) {
if (m_cmakeFiles.contains(document->filePath()))
emit dirty();
});
connect(&m_parser, &CMakeParser::addOutput,
this, [](const QString &m) { Core::MessageManager::write(m); });
connect(&m_parser, &CMakeParser::addTask, this, [this](const Task &t) {
@@ -466,10 +460,9 @@ void ServerModeReader::handleProgress(int min, int cur, int max, const QString &
void ServerModeReader::handleSignal(const QString &signal, const QVariantMap &data)
{
Q_UNUSED(signal)
Q_UNUSED(data)
// CMake on Windows sends false dirty signals on each edit (QTCREATORBUG-17944)
if (!HostOsInfo::isWindowsHost() && signal == "dirty")
emit dirty();
// We do not need to act on fileChanged signals nor on dirty signals!
}
void ServerModeReader::handleServerConnected()