qstringfwd.h: don't include qglobal.h

qstringfwd.h is supposed to be a lean header, dragging in all of
qglobal.h perverts the purpose.

This also helps with certain circular-dependency issues that
appeared when attempting to use this header in other low-level
headers.

Amends abe3b4c9b947de5e55085b37840e0d1d6f3aae42.

[ChangeLog][Potentially Source-Incompatible Changes][QtCore] The
qstringfwd.h header no longer includes qglobal.h. A
backwards-compatible fix is to include qglobal.h yourself instead of
relying on the transitive include.

Pick-to: 6.5
Change-Id: I1726fccfd13b3a058abaf800c1bbf02c320143a4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 5def8ff180c67f288bdc6e3c05b96940aeae37c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e076767bfd150da155d7eb6073a5f86024ed1471)
This commit is contained in:
Marc Mutz 2024-12-12 11:32:49 +01:00 committed by Qt Cherry-pick Bot
parent 6eef35abce
commit f9b65770a1

View File

@ -1,7 +1,8 @@
// 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>
#include <QtCore/qtconfigmacros.h>
#include <QtCore/qtversionchecks.h>
#ifndef QSTRINGFWD_H
#define QSTRINGFWD_H