qsqldriverplugin.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/sql/kernel/qsqldriverplugin.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the QtSql module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34#include "qsqldriverplugin.h"-
35-
36QT_BEGIN_NAMESPACE-
37-
38/*!-
39 \class QSqlDriverPlugin-
40 \brief The QSqlDriverPlugin class provides an abstract base for custom QSqlDriver plugins.-
41-
42 \ingroup plugins-
43 \inmodule QtSql-
44-
45 The SQL driver plugin is a simple plugin interface that makes it-
46 easy to create your own SQL driver plugins that can be loaded-
47 dynamically by Qt.-
48-
49 Writing a SQL plugin is achieved by subclassing this base class,-
50 reimplementing the pure virtual function create(), and-
51 exporting the class with the Q_PLUGIN_METADATA() macro. See the SQL-
52 plugins that come with Qt for example implementations (in the-
53 \c{plugins/src/sqldrivers} subdirectory of the source-
54 distribution).-
55-
56 The json file containing the metadata for the plugin contains a list of-
57 keys indicating the supported sql drivers-
58-
59 \code-
60 { "Keys": [ "mysqldriver" ] }-
61 \endcode-
62-
63 \sa {How to Create Qt Plugins}-
64*/-
65-
66/*!-
67 \fn QSqlDriver *QSqlDriverPlugin::create(const QString& key)-
68-
69 Creates and returns a QSqlDriver object for the driver called \a-
70 key. The driver key is usually the class name of the required-
71 driver. Keys are case sensitive.-
72-
73 \sa {How to Create Qt Plugins}-
74*/-
75-
76/*!-
77 Constructs a SQL driver plugin and sets the parent to \a parent.-
78 This is invoked automatically by the moc generated code that exports the plugin.-
79*/-
80-
81QSqlDriverPlugin::QSqlDriverPlugin(QObject *parent)-
82 : QObject(parent)-
83{-
84}
executed 10 times by 8 tests: end of block
Executed by:
  • tst_QItemModel
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
10
85-
86/*!-
87 Destroys the SQL driver plugin.-
88-
89 You never have to call this explicitly. Qt destroys a plugin-
90 automatically when it is no longer used.-
91*/-
92QSqlDriverPlugin::~QSqlDriverPlugin()-
93{-
94}-
95-
96QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9