aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.cpp
blob: 9819c2adcc418243956b061f4ce90b4082eed0b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "projectstorage.h"

#include <sqlitedatabase.h>

namespace QmlDesigner {

#ifdef ENABLE_PROJECT_STORAGE_TRACING
namespace {
NanotraceHR::TraceFile traceFile{"projectstorage.json"};

thread_local auto eventQueueData = NanotraceHR::makeEventQueueData<NanotraceHR::StringViewTraceEvent, 1000>(
    traceFile);
thread_local NanotraceHR::EventQueue<NanotraceHR::StringViewTraceEvent> eventQueue = eventQueueData;
} // namespace

NanotraceHR::Category<NanotraceHR::StringViewTraceEvent> projectStorageCategory{"project storage"_t,
                                                                                eventQueue};
#endif
} // namespace QmlDesigner

template class QmlDesigner::ProjectStorage<Sqlite::Database>;