File indexing completed on 2024-06-09 05:02:46
0001 /* 0002 SPDX-FileCopyrightText: 2016 The Qt Company Ltd. 0003 Contact: https://www.qt.io/licensing/ 0004 0005 This file is part of the plugins of the Qt Toolkit. 0006 0007 SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KFQF-Accepted-GPL OR LicenseRef-Qt-Commercial 0008 0009 */ 0010 0011 #include <qsqldriverplugin.h> 0012 #include <qstringlist.h> 0013 #include "qsql_sqlite_p.h" 0014 0015 QT_BEGIN_NAMESPACE 0016 0017 class QSQLCipherDriverPlugin : public QSqlDriverPlugin 0018 { 0019 Q_OBJECT 0020 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "sqlcipher.json") 0021 0022 public: 0023 QSQLCipherDriverPlugin(); 0024 0025 QSqlDriver* create(const QString &) Q_DECL_OVERRIDE; 0026 }; 0027 0028 QSQLCipherDriverPlugin::QSQLCipherDriverPlugin() 0029 : QSqlDriverPlugin() 0030 { 0031 } 0032 0033 QSqlDriver* QSQLCipherDriverPlugin::create(const QString &name) 0034 { 0035 if (name == QLatin1String("QSQLCIPHER")) { 0036 QSQLiteDriver* driver = new QSQLiteDriver(); 0037 return driver; 0038 } 0039 return 0; 0040 } 0041 0042 QT_END_NAMESPACE 0043 0044 #include "smain.moc"