forked from qt-creator/qt-creator
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:
@@ -69,6 +69,7 @@
|
|||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QTextBlock>
|
#include <QTextBlock>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QtDebug>
|
||||||
|
|
||||||
using namespace ClangCodeModel;
|
using namespace ClangCodeModel;
|
||||||
using namespace ClangCodeModel::Internal;
|
using namespace ClangCodeModel::Internal;
|
||||||
@@ -376,7 +377,7 @@ ClangdClient *ClangModelManagerSupport::clientForProject(
|
|||||||
&& c->state() != Client::ShutdownRequested
|
&& c->state() != Client::ShutdownRequested
|
||||||
&& c->state() != Client::Shutdown;
|
&& 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());
|
return clients.empty() ? nullptr : qobject_cast<ClangdClient *>(clients.first());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user