ClangCodeModel: Use a configurable timeout in the tests

Change-Id: Ie3923217f79a72d2774aaa2a499144c3191cb478
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2020-10-16 13:43:54 +02:00
parent 30f21bcf01
commit 3ff8c42431
3 changed files with 17 additions and 13 deletions

View File

@@ -58,10 +58,11 @@
#include <QThread>
using namespace ClangBackEnd;
using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal;
using namespace ProjectExplorer;
namespace ClangCodeModel {
namespace Internal {
static Q_LOGGING_CATEGORY(debug, "qtc.clangcodemodel.batch", QtWarningMsg);
static int timeOutFromEnvironmentVariable()
@@ -78,7 +79,7 @@ static int timeOutFromEnvironmentVariable()
return intervalAsInt;
}
static int timeOutInMs()
int timeOutInMs()
{
static int timeOut = timeOutFromEnvironmentVariable();
return timeOut;
@@ -747,9 +748,6 @@ bool BatchFileParser::parseLine(const QString &line)
} // anonymous namespace
namespace ClangCodeModel {
namespace Internal {
static QString applySubstitutions(const QString &filePath, const QString &text)
{
const QString dirPath = QFileInfo(filePath).absolutePath();