forked from qt-creator/qt-creator
Because LibraryInitializer has no state it should be fine if it is used like intended. The exception is anyway fatal. Change-Id: I397e5b03e63d69f1468b46a8f333522629f1d882 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
26 lines
544 B
C++
26 lines
544 B
C++
// Copyright (C) 2021 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
#include "sqlitelibraryinitializer.h"
|
|
|
|
#include "sqlitedatabasebackend.h"
|
|
|
|
namespace Sqlite {
|
|
|
|
void LibraryInitializer::initialize()
|
|
{
|
|
static LibraryInitializer initializer;
|
|
}
|
|
|
|
LibraryInitializer::LibraryInitializer()
|
|
{
|
|
DatabaseBackend::initializeSqliteLibrary();
|
|
}
|
|
|
|
LibraryInitializer::~LibraryInitializer() noexcept(false)
|
|
{
|
|
DatabaseBackend::shutdownSqliteLibrary();
|
|
}
|
|
|
|
} // namespace Sqlite
|