forked from qt-creator/qt-creator
CMake: Add some more categorized logging
Change-Id: I150c63853025539563ef2245e0336e95fda3fdca Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -123,17 +123,22 @@ void BuildDirManager::emitErrorOccured(const QString &message) const
|
|||||||
|
|
||||||
void BuildDirManager::emitReparseRequest() const
|
void BuildDirManager::emitReparseRequest() const
|
||||||
{
|
{
|
||||||
if (m_reparseParameters & REPARSE_URGENT)
|
if (m_reparseParameters & REPARSE_URGENT) {
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "emitting requestReparse";
|
||||||
emit requestReparse();
|
emit requestReparse();
|
||||||
else
|
} else {
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "emitting requestDelayedReparse";
|
||||||
emit requestDelayedReparse();
|
emit requestDelayedReparse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildDirManager::updateReaderType(const BuildDirParameters &p,
|
void BuildDirManager::updateReaderType(const BuildDirParameters &p,
|
||||||
std::function<void()> todo)
|
std::function<void()> todo)
|
||||||
{
|
{
|
||||||
if (!m_reader || !m_reader->isCompatible(p))
|
if (!m_reader || !m_reader->isCompatible(p)) {
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "Creating new reader";
|
||||||
m_reader = BuildDirReader::createReader(p);
|
m_reader = BuildDirReader::createReader(p);
|
||||||
|
}
|
||||||
|
|
||||||
QTC_ASSERT(m_reader, return);
|
QTC_ASSERT(m_reader, return);
|
||||||
|
|
||||||
@@ -220,6 +225,7 @@ bool BuildDirManager::isParsing() const
|
|||||||
|
|
||||||
void BuildDirManager::stopParsingAndClearState()
|
void BuildDirManager::stopParsingAndClearState()
|
||||||
{
|
{
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "stopping parsing run!";
|
||||||
if (m_reader) {
|
if (m_reader) {
|
||||||
disconnect(m_reader.get(), nullptr, this, nullptr);
|
disconnect(m_reader.get(), nullptr, this, nullptr);
|
||||||
m_reader->stop();
|
m_reader->stop();
|
||||||
@@ -231,6 +237,7 @@ void BuildDirManager::stopParsingAndClearState()
|
|||||||
void BuildDirManager::setParametersAndRequestParse(const BuildDirParameters ¶meters,
|
void BuildDirManager::setParametersAndRequestParse(const BuildDirParameters ¶meters,
|
||||||
const int reparseParameters)
|
const int reparseParameters)
|
||||||
{
|
{
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "setting parameters and requesting reparse";
|
||||||
if (!parameters.cmakeTool()) {
|
if (!parameters.cmakeTool()) {
|
||||||
TaskHub::addTask(Task::Error,
|
TaskHub::addTask(Task::Error,
|
||||||
tr("The kit needs to define a CMake tool to parse this project."),
|
tr("The kit needs to define a CMake tool to parse this project."),
|
||||||
@@ -262,6 +269,7 @@ FilePath BuildDirManager::buildDirectory() const
|
|||||||
|
|
||||||
void BuildDirManager::becameDirty()
|
void BuildDirManager::becameDirty()
|
||||||
{
|
{
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "BuildDirManager: becameDirty was triggered.";
|
||||||
if (isParsing() || !buildConfiguration())
|
if (isParsing() || !buildConfiguration())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -310,6 +318,7 @@ bool BuildDirManager::isFilesystemScanRequested() const
|
|||||||
|
|
||||||
void BuildDirManager::parse()
|
void BuildDirManager::parse()
|
||||||
{
|
{
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "parsing!";
|
||||||
QTC_ASSERT(m_parameters.isValid(), return );
|
QTC_ASSERT(m_parameters.isValid(), return );
|
||||||
QTC_ASSERT(m_reader, return);
|
QTC_ASSERT(m_reader, return);
|
||||||
|
|
||||||
@@ -335,6 +344,7 @@ void BuildDirManager::parse()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "Asking reader to parse";
|
||||||
m_reader->parse(reparseParameters & REPARSE_FORCE_CMAKE_RUN,
|
m_reader->parse(reparseParameters & REPARSE_FORCE_CMAKE_RUN,
|
||||||
reparseParameters & REPARSE_FORCE_CONFIGURATION);
|
reparseParameters & REPARSE_FORCE_CONFIGURATION);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -443,8 +443,10 @@ void CMakeBuildConfiguration::clearError(ForceEnabledChanged fec)
|
|||||||
m_error.clear();
|
m_error.clear();
|
||||||
fec = ForceEnabledChanged::True;
|
fec = ForceEnabledChanged::True;
|
||||||
}
|
}
|
||||||
if (fec == ForceEnabledChanged::True)
|
if (fec == ForceEnabledChanged::True) {
|
||||||
|
qCDebug(cmakeBuildConfigurationLog) << "Emitting enabledChanged signal";
|
||||||
emit enabledChanged();
|
emit enabledChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeBuildConfiguration::emitBuildTypeChanged()
|
void CMakeBuildConfiguration::emitBuildTypeChanged()
|
||||||
@@ -502,11 +504,16 @@ CMakeConfig CMakeBuildConfiguration::configurationForCMake() const
|
|||||||
|
|
||||||
void CMakeBuildConfiguration::setError(const QString &message)
|
void CMakeBuildConfiguration::setError(const QString &message)
|
||||||
{
|
{
|
||||||
|
qCDebug(cmakeBuildConfigurationLog) << "Setting error to" << message;
|
||||||
|
QTC_ASSERT(!message.isEmpty(), return );
|
||||||
|
|
||||||
const QString oldMessage = m_error;
|
const QString oldMessage = m_error;
|
||||||
if (m_error != message)
|
if (m_error != message)
|
||||||
m_error = message;
|
m_error = message;
|
||||||
if (oldMessage.isEmpty() && !message.isEmpty())
|
if (oldMessage.isEmpty() != !message.isEmpty()) {
|
||||||
|
qCDebug(cmakeBuildConfigurationLog) << "Emitting enabledChanged signal";
|
||||||
emit enabledChanged();
|
emit enabledChanged();
|
||||||
|
}
|
||||||
emit errorOccured(m_error);
|
emit errorOccured(m_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user