From 267dd9133d76d466c0f940e7286dc9ba03bac18e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 16 Sep 2016 14:37:16 +0200 Subject: Clean up building of bootstrap lib and tools Add a qconfig-bootstrap.h, which contains all the defines required to build the bootstrapped tools. This will be required anyway when moving more code over to use QT_CONFIG(foo) instead of QT_NO_FOO. Change-Id: I783d0aa0100b9190fe2d422bee4a95b05720aebe Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- src/corelib/global/qconfig-bootstrapped.h | 95 +++++++++++++++++++++++++++++++ src/corelib/global/qglobal.h | 4 +- 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 src/corelib/global/qconfig-bootstrapped.h (limited to 'src/corelib') diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h new file mode 100644 index 0000000000..38b0cf2abf --- /dev/null +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtCore 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$ +** +****************************************************************************/ + +// +// 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. +// +// Despite its file name, this really is not a public header. +// It is an implementation detail of the private bootstrap library. +// + +#if 0 +// silence syncqt warnings +#pragma qt_sync_skip_header_check +#pragma qt_sync_stop_processing +#endif + +#ifdef QT_BOOTSTRAPPED + +#ifndef QT_NO_EXCEPTIONS +#define QT_NO_EXCEPTIONS +#endif + +#define QT_NO_USING_NAMESPACE +#define QT_NO_DEPRECATED + +#define QT_CRYPTOGRAPHICHASH_ONLY_SHA1 +#define QT_NO_DATASTREAM +#define QT_NO_LIBRARY +#define QT_FEATURE_library -1 +#define QT_NO_QOBJECT +#define QT_NO_SYSTEMLOCALE +#define QT_NO_THREAD +#define QT_NO_TRANSLATION +#define QT_FEATURE_translation -1 +#define QT_NO_GEOM_VARIANT + +#if defined(QT_BUILD_QMAKE) || defined(QT_BUILD_CONFIGURE) +#define QT_NO_COMPRESS +#define QT_JSON_READONLY +#define QT_NO_TEXTCODEC +#define QT_FEATURE_textcodec -1 +#else +#define QT_FEATURE_textcodec 1 +#define QT_NO_CODECS +#define QT_FEATURE_codecs -1 +#endif + +#if defined(QT_BUILD_QMAKE) +#define QT_NO_STANDARDPATHS +#endif + +#endif // QT_BOOTSTRAPPED diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index dd8b6110b3..8b67f0d3ef 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -56,7 +56,9 @@ */ #define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) -#ifndef QT_BOOTSTRAPPED +#ifdef QT_BOOTSTRAPPED +#include +#else #include #include #endif -- cgit v1.2.3