forked from blizzard4591/qt5-sqlcipher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmain.cpp
More file actions
31 lines (23 loc) · 667 Bytes
/
smain.cpp
File metadata and controls
31 lines (23 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <qsqldriverplugin.h>
#include <qstringlist.h>
#include "qsql_sqlite_p.h"
QT_BEGIN_NAMESPACE
class QSQLCipherDriverPlugin : public QSqlDriverPlugin {
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "sqlcipher.json")
public:
QSQLCipherDriverPlugin();
QSqlDriver* create(const QString &) Q_DECL_OVERRIDE;
};
QSQLCipherDriverPlugin::QSQLCipherDriverPlugin() : QSqlDriverPlugin() {
//
}
QSqlDriver* QSQLCipherDriverPlugin::create(const QString &name) {
if (name == QLatin1String("QSQLCIPHER")) {
QSQLiteDriver* driver = new QSQLiteDriver();
return driver;
}
return 0;
}
QT_END_NAMESPACE
#include "smain.moc"