ClangCodeModel: Add debug output to soft assert

I saw this getting triggered recently, and would like to see more
information if it happens again.

Change-Id: I1c616b8126b8b5eea3709a97124968e9e706aaf3
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-09-01 16:01:46 +02:00
parent cd2e164b7d
commit 22823b2190

View File

@@ -69,6 +69,7 @@
#include <QMenu>
#include <QTextBlock>
#include <QTimer>
#include <QtDebug>
using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal;
@@ -376,7 +377,7 @@ ClangdClient *ClangModelManagerSupport::clientForProject(
&& c->state() != Client::ShutdownRequested
&& c->state() != Client::Shutdown;
});
QTC_CHECK(clients.size() <= 1);
QTC_ASSERT(clients.size() <= 1, qDebug() << project << clients.size());
return clients.empty() ? nullptr : qobject_cast<ClangdClient *>(clients.first());
}