Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#include <qsqldriverplugin.h>
6#include <qstringlist.h>
7#include "qsql_psql_p.h"
8
10
11using namespace Qt::StringLiterals;
12
14{
15 Q_OBJECT
16 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "psql.json")
17
18public:
20
21 QSqlDriver* create(const QString &) override;
22};
23
24QPSQLDriverPlugin::QPSQLDriverPlugin()
25 : QSqlDriverPlugin()
26{
27}
28
29QSqlDriver* QPSQLDriverPlugin::create(const QString &name)
30{
31 if (name == "QPSQL"_L1)
32 return new QPSQLDriver;
33 return nullptr;
34}
35
36QT_END_NAMESPACE
37
38#include "main.moc"
QSqlDriver * create(const QString &) override
Creates and returns a QSqlDriver object for the driver called key.
Definition main.cpp:29