Add qtsqlglobal.h and qtsqlglobal_p.h
The new modular configuration system requires one global header per module, that is included by all other files in this module. QtSql already had such a header, but its name (qsql.h) was not in line with what's being used in all other modules. So add a qtsqlglobal.h header, deprecate qsql.h and turn it into a a forwarding header to that new global header file. Change-Id: Ibaeb95b008cf08ba062cbfe8a3f4d3bf79294390 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
8af681c107
commit
7331d22c6f
@ -1,4 +1,6 @@
|
|||||||
HEADERS += kernel/qsql.h \
|
HEADERS += kernel/qtsqlglobal.h \
|
||||||
|
kernel/qtsqlglobal_p.h \
|
||||||
|
kernel/qsql.h \
|
||||||
kernel/qsqlquery.h \
|
kernel/qsqlquery.h \
|
||||||
kernel/qsqldatabase.h \
|
kernel/qsqldatabase.h \
|
||||||
kernel/qsqlfield.h \
|
kernel/qsqlfield.h \
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QtSql/private/qtsqlglobal_p.h>
|
||||||
#include "QtSql/qsqlresult.h"
|
#include "QtSql/qsqlresult.h"
|
||||||
#include "QtSql/private/qsqlresult_p.h"
|
#include "QtSql/private/qsqlresult_p.h"
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
#ifndef QSQLDATABASE_H
|
#ifndef QSQLDATABASE_H
|
||||||
#define QSQLDATABASE_H
|
#define QSQLDATABASE_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtSql/qsql.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
#ifndef QSQLDRIVER_H
|
#ifndef QSQLDRIVER_H
|
||||||
#define QSQLDRIVER_H
|
#define QSQLDRIVER_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qobject.h>
|
#include <QtCore/qobject.h>
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
#include <QtSql/qsql.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QtSql/private/qtsqlglobal_p.h>
|
||||||
#include "private/qobject_p.h"
|
#include "private/qobject_p.h"
|
||||||
#include "qsqldriver.h"
|
#include "qsqldriver.h"
|
||||||
#include "qsqlerror.h"
|
#include "qsqlerror.h"
|
||||||
|
@ -40,9 +40,9 @@
|
|||||||
#ifndef QSQLDRIVERPLUGIN_H
|
#ifndef QSQLDRIVERPLUGIN_H
|
||||||
#define QSQLDRIVERPLUGIN_H
|
#define QSQLDRIVERPLUGIN_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
#include <QtCore/qfactoryinterface.h>
|
#include <QtCore/qfactoryinterface.h>
|
||||||
#include <QtSql/qsql.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
#ifndef QSQLERROR_H
|
#ifndef QSQLERROR_H
|
||||||
#define QSQLERROR_H
|
#define QSQLERROR_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtSql/qsql.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@
|
|||||||
#ifndef QSQLFIELD_H
|
#ifndef QSQLFIELD_H
|
||||||
#define QSQLFIELD_H
|
#define QSQLFIELD_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qvariant.h>
|
#include <QtCore/qvariant.h>
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtSql/qsql.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#ifndef QSQLINDEX_H
|
#ifndef QSQLINDEX_H
|
||||||
#define QSQLINDEX_H
|
#define QSQLINDEX_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtSql/qsqlrecord.h>
|
#include <QtSql/qsqlrecord.h>
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtCore/qvector.h>
|
#include <QtCore/qvector.h>
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QtSql/private/qtsqlglobal_p.h>
|
||||||
#include "QtCore/qvariant.h"
|
#include "QtCore/qvariant.h"
|
||||||
#include "QtSql/qsqldriver.h"
|
#include "QtSql/qsqldriver.h"
|
||||||
#include "QtSql/qsqlerror.h"
|
#include "QtSql/qsqlerror.h"
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#ifndef QSQLQUERY_H
|
#ifndef QSQLQUERY_H
|
||||||
#define QSQLQUERY_H
|
#define QSQLQUERY_H
|
||||||
|
|
||||||
#include <QtSql/qsql.h>
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtSql/qsqldatabase.h>
|
#include <QtSql/qsqldatabase.h>
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
#ifndef QSQLRECORD_H
|
#ifndef QSQLRECORD_H
|
||||||
#define QSQLRECORD_H
|
#define QSQLRECORD_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtSql/qsql.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@
|
|||||||
#ifndef QSQLRESULT_H
|
#ifndef QSQLRESULT_H
|
||||||
#define QSQLRESULT_H
|
#define QSQLRESULT_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qvariant.h>
|
#include <QtCore/qvariant.h>
|
||||||
#include <QtCore/qvector.h>
|
#include <QtCore/qvector.h>
|
||||||
#include <QtSql/qsql.h>
|
|
||||||
|
|
||||||
// for testing:
|
// for testing:
|
||||||
class tst_QSqlQuery;
|
class tst_QSqlQuery;
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QtSql/private/qtsqlglobal_p.h>
|
||||||
#include <QtCore/qpointer.h>
|
#include <QtCore/qpointer.h>
|
||||||
#include "qsqlerror.h"
|
#include "qsqlerror.h"
|
||||||
#include "qsqlresult.h"
|
#include "qsqlresult.h"
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef QSQL_H
|
#ifndef QTSQLGLOBAL_H
|
||||||
#define QSQL_H
|
#define QTSQLGLOBAL_H
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
57
src/sql/kernel/qtsqlglobal_p.h
Normal file
57
src/sql/kernel/qtsqlglobal_p.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of the QtSql module of the Qt Toolkit.
|
||||||
|
**
|
||||||
|
** $QT_BEGIN_LICENSE:LGPL$
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 3 requirements
|
||||||
|
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 2.0 or (at your option) the GNU General
|
||||||
|
** Public license version 3 or any later version approved by the KDE Free
|
||||||
|
** Qt Foundation. The licenses are as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||||
|
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
** $QT_END_LICENSE$
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef QTSQLGLOBAL_P_H
|
||||||
|
#define QTSQLGLOBAL_P_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
|
#include <QtCore/private/qglobal_p.h>
|
||||||
|
|
||||||
|
#endif // QTSQLGLOBAL_P_H
|
@ -40,6 +40,7 @@
|
|||||||
#ifndef QSQLQUERYMODEL_H
|
#ifndef QSQLQUERYMODEL_H
|
||||||
#define QSQLQUERYMODEL_H
|
#define QSQLQUERYMODEL_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtCore/qabstractitemmodel.h>
|
#include <QtCore/qabstractitemmodel.h>
|
||||||
#include <QtSql/qsqldatabase.h>
|
#include <QtSql/qsqldatabase.h>
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QtSql/private/qtsqlglobal_p.h>
|
||||||
#include "private/qabstractitemmodel_p.h"
|
#include "private/qabstractitemmodel_p.h"
|
||||||
#include "QtSql/qsqlerror.h"
|
#include "QtSql/qsqlerror.h"
|
||||||
#include "QtSql/qsqlquery.h"
|
#include "QtSql/qsqlquery.h"
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#ifndef QSQLRELATIONALDELEGATE_H
|
#ifndef QSQLRELATIONALDELEGATE_H
|
||||||
#define QSQLRELATIONALDELEGATE_H
|
#define QSQLRELATIONALDELEGATE_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
|
|
||||||
#ifdef QT_WIDGETS_LIB
|
#ifdef QT_WIDGETS_LIB
|
||||||
|
|
||||||
#include <QtWidgets/qitemdelegate.h>
|
#include <QtWidgets/qitemdelegate.h>
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#ifndef QSQLRELATIONALTABLEMODEL_H
|
#ifndef QSQLRELATIONALTABLEMODEL_H
|
||||||
#define QSQLRELATIONALTABLEMODEL_H
|
#define QSQLRELATIONALTABLEMODEL_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtSql/qsqltablemodel.h>
|
#include <QtSql/qsqltablemodel.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#ifndef QSQLTABLEMODEL_H
|
#ifndef QSQLTABLEMODEL_H
|
||||||
#define QSQLTABLEMODEL_H
|
#define QSQLTABLEMODEL_H
|
||||||
|
|
||||||
|
#include <QtSql/qtsqlglobal.h>
|
||||||
#include <QtSql/qsqldatabase.h>
|
#include <QtSql/qsqldatabase.h>
|
||||||
#include <QtSql/qsqlquerymodel.h>
|
#include <QtSql/qsqlquerymodel.h>
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QtSql/private/qtsqlglobal_p.h>
|
||||||
#include "private/qsqlquerymodel_p.h"
|
#include "private/qsqlquerymodel_p.h"
|
||||||
#include "QtSql/qsqlindex.h"
|
#include "QtSql/qsqlindex.h"
|
||||||
#include "QtCore/qmap.h"
|
#include "QtCore/qmap.h"
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
"QtGui" => {
|
"QtGui" => {
|
||||||
"QGenericPlugin" => "QtGui/QGenericPlugin",
|
"QGenericPlugin" => "QtGui/QGenericPlugin",
|
||||||
"QGenericPluginFactory" => "QtGui/QGenericPluginFactory"
|
"QGenericPluginFactory" => "QtGui/QGenericPluginFactory"
|
||||||
|
},
|
||||||
|
"QtSql" => {
|
||||||
|
"qsql.h" => "QtSql/qtsqlglobal.h"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user