Do not include qglobal.h into the new headers
Several new headers were extracted from qglobal.h in scope of QTBUG-99313. This commit makes sure that none of them actually includes qglobal.h. As those files are new, it should be safe to introduce this change, as it shouldn't have any impact on the user code. This patch also modifies the autogenerated module exports header to include qglobal.h before the include guard. This is needed to prevent circular dependencies which result in Q_<MODULE>_EXPORT being undefined. Task-number: QTBUG-107046 Change-Id: I8d998792fd8129173d9ec811557e7d7604282813 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f03f830e71
commit
9d1e928512
@ -1,11 +1,11 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef @header_base_name_upper@_H
|
||||
#define @header_base_name_upper@_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(QT_SHARED) || !defined(QT_STATIC)
|
||||
# if defined(QT_BUILD_@module_define_infix@_LIB)
|
||||
# define Q_@module_define_infix@_EXPORT Q_DECL_EXPORT
|
||||
|
@ -4,7 +4,11 @@
|
||||
#ifndef QMALLOC_H
|
||||
#define QMALLOC_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qcompilerdetection.h>
|
||||
#include <QtCore/qtconfigmacros.h>
|
||||
#include <QtCore/qtcoreexports.h>
|
||||
|
||||
#include <cstddef> // size_t
|
||||
|
||||
#if 0
|
||||
#pragma qt_class(QtMalloc)
|
||||
|
@ -4,7 +4,8 @@
|
||||
#ifndef QTENVIRONMENTVARIABLES_H
|
||||
#define QTENVIRONMENTVARIABLES_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qtconfigmacros.h>
|
||||
#include <QtCore/qtcoreexports.h>
|
||||
#include <QtCore/qtdeprecationmarkers.h>
|
||||
|
||||
#if 0
|
||||
@ -16,6 +17,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QByteArray;
|
||||
class QByteArrayView;
|
||||
class QString;
|
||||
|
||||
Q_CORE_EXPORT QByteArray qgetenv(const char *varName);
|
||||
// need it as two functions because QString is only forward-declared here
|
||||
|
@ -4,7 +4,8 @@
|
||||
#ifndef QTTRANSLATION_H
|
||||
#define QTTRANSLATION_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qtconfigmacros.h> // QT_NO_TRANSLATION should be defined here as well
|
||||
#include <QtCore/qtcoreexports.h>
|
||||
|
||||
#if 0
|
||||
#pragma qt_class(QtTranslation)
|
||||
@ -13,6 +14,8 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QString;
|
||||
|
||||
#define QT_TR_NOOP(x) x
|
||||
#define QT_TR_NOOP_UTF8(x) x
|
||||
#define QT_TRANSLATE_NOOP(scope, x) x
|
||||
|
Loading…
x
Reference in New Issue
Block a user