forked from qt-creator/qt-creator
Clang: Add busy timeout handler to database
You use now a busy timeout of one second. This is preventing the throwing of a exception for a busy time under one second. Change-Id: Iae800a525ad009b594c29883ffb243c1be8b3874 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -43,8 +43,11 @@
|
||||
#include <QTemporaryDir>
|
||||
#include <QTimer>
|
||||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
using ClangBackEnd::ClangPathWatcher;
|
||||
using ClangBackEnd::ConnectionServer;
|
||||
using ClangBackEnd::PchCreator;
|
||||
@@ -109,7 +112,7 @@ int main(int argc, char *argv[])
|
||||
const QString connectionName = arguments[0];
|
||||
const QString databasePath = arguments[1];
|
||||
|
||||
Sqlite::Database database{Utils::PathString{databasePath}};
|
||||
Sqlite::Database database{Utils::PathString{databasePath}, 1000ms};
|
||||
ClangBackEnd::RefactoringDatabaseInitializer<Sqlite::Database> databaseInitializer{database};
|
||||
ClangBackEnd::FilePathCaching filePathCache{database};
|
||||
ClangPathWatcher<QFileSystemWatcher, QTimer> includeWatcher(filePathCache);
|
||||
|
||||
Reference in New Issue
Block a user