Extract header qdarwinhelpers.h from qglobal.h
Task-number: QTBUG-99313 Change-Id: Ia25270d381de99c5fcbb205d750e7bf86d4438dc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
9ecc119276
commit
0f2079efb8
@ -53,6 +53,7 @@ qt_internal_add_module(Core
|
||||
global/qcompilerdetection.h
|
||||
global/qconstructormacros.h
|
||||
global/qcontainerinfo.h
|
||||
global/qdarwinhelpers.h
|
||||
global/qendian.cpp global/qendian.h global/qendian_p.h
|
||||
global/qenvironmentvariables.cpp global/qenvironmentvariables.h
|
||||
global/qexceptionhandling.cpp global/qexceptionhandling.h
|
||||
|
37
src/corelib/global/qdarwinhelpers.h
Normal file
37
src/corelib/global/qdarwinhelpers.h
Normal file
@ -0,0 +1,37 @@
|
||||
// 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
|
||||
|
||||
#ifndef QTDARWINHELPERS_H
|
||||
#define QTDARWINHELPERS_H
|
||||
|
||||
#if 0
|
||||
#pragma qt_class(QtDarwinHelpers)
|
||||
#pragma qt_sync_stop_processing
|
||||
#endif
|
||||
|
||||
/*
|
||||
Utility macros and inline functions
|
||||
*/
|
||||
|
||||
#ifndef Q_FORWARD_DECLARE_OBJC_CLASS
|
||||
# ifdef __OBJC__
|
||||
# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
|
||||
# else
|
||||
# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) class classname
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_CF_TYPE
|
||||
# define Q_FORWARD_DECLARE_CF_TYPE(type) typedef const struct __ ## type * type ## Ref
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_MUTABLE_CF_TYPE
|
||||
# define Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) typedef struct __ ## type * type ## Ref
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_CG_TYPE
|
||||
#define Q_FORWARD_DECLARE_CG_TYPE(type) typedef const struct type *type ## Ref;
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_MUTABLE_CG_TYPE
|
||||
#define Q_FORWARD_DECLARE_MUTABLE_CG_TYPE(type) typedef struct type *type ## Ref;
|
||||
#endif
|
||||
|
||||
|
||||
#endif // QTDARWINHELPERS_H
|
34
src/corelib/global/qdarwinhelpers.qdoc
Normal file
34
src/corelib/global/qdarwinhelpers.qdoc
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\macro Q_FORWARD_DECLARE_OBJC_CLASS(classname)
|
||||
\since 5.2
|
||||
\relates <QtDarwinHelpers>
|
||||
|
||||
Forward-declares an Objective-C \a classname in a manner such that it can be
|
||||
compiled as either Objective-C or C++.
|
||||
|
||||
This is primarily intended for use in header files that may be included by
|
||||
both Objective-C and C++ source files.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_FORWARD_DECLARE_CF_TYPE(type)
|
||||
\since 5.2
|
||||
\relates <QtDarwinHelpers>
|
||||
|
||||
Forward-declares a Core Foundation \a type. This includes the actual
|
||||
type and the ref type. For example, Q_FORWARD_DECLARE_CF_TYPE(CFString)
|
||||
declares __CFString and CFStringRef.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type)
|
||||
\since 5.2
|
||||
\relates <QtDarwinHelpers>
|
||||
|
||||
Forward-declares a mutable Core Foundation \a type. This includes the actual
|
||||
type and the ref type. For example, Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(CFMutableString)
|
||||
declares __CFMutableString and CFMutableStringRef.
|
||||
*/
|
@ -3560,38 +3560,6 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
||||
\sa Q_DECL_OVERRIDE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_FORWARD_DECLARE_OBJC_CLASS(classname)
|
||||
\since 5.2
|
||||
\relates <QtGlobal>
|
||||
|
||||
Forward-declares an Objective-C \a classname in a manner such that it can be
|
||||
compiled as either Objective-C or C++.
|
||||
|
||||
This is primarily intended for use in header files that may be included by
|
||||
both Objective-C and C++ source files.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_FORWARD_DECLARE_CF_TYPE(type)
|
||||
\since 5.2
|
||||
\relates <QtGlobal>
|
||||
|
||||
Forward-declares a Core Foundation \a type. This includes the actual
|
||||
type and the ref type. For example, Q_FORWARD_DECLARE_CF_TYPE(CFString)
|
||||
declares __CFString and CFStringRef.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type)
|
||||
\since 5.2
|
||||
\relates <QtGlobal>
|
||||
|
||||
Forward-declares a mutable Core Foundation \a type. This includes the actual
|
||||
type and the ref type. For example, Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(CFMutableString)
|
||||
declares __CFMutableString and CFMutableStringRef.
|
||||
*/
|
||||
|
||||
namespace QtPrivate {
|
||||
Q_LOGGING_CATEGORY(lcNativeInterface, "qt.nativeinterface")
|
||||
}
|
||||
|
@ -63,30 +63,6 @@ Q_CORE_EXPORT Q_DECL_CONST_FUNCTION const char *qVersion(void) Q_DECL_NOEXCEPT;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
/*
|
||||
Utility macros and inline functions
|
||||
*/
|
||||
|
||||
#ifndef Q_FORWARD_DECLARE_OBJC_CLASS
|
||||
# ifdef __OBJC__
|
||||
# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
|
||||
# else
|
||||
# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) class classname
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_CF_TYPE
|
||||
# define Q_FORWARD_DECLARE_CF_TYPE(type) typedef const struct __ ## type * type ## Ref
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_MUTABLE_CF_TYPE
|
||||
# define Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) typedef struct __ ## type * type ## Ref
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_CG_TYPE
|
||||
#define Q_FORWARD_DECLARE_CG_TYPE(type) typedef const struct type *type ## Ref;
|
||||
#endif
|
||||
#ifndef Q_FORWARD_DECLARE_MUTABLE_CG_TYPE
|
||||
#define Q_FORWARD_DECLARE_MUTABLE_CG_TYPE(type) typedef struct type *type ## Ref;
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_DARWIN
|
||||
|
||||
// Implemented in qcore_mac_objc.mm
|
||||
@ -141,6 +117,7 @@ QT_END_NAMESPACE
|
||||
|
||||
#include <QtCore/qatomic.h>
|
||||
#include <QtCore/qconstructormacros.h>
|
||||
#include <QtCore/qdarwinhelpers.h>
|
||||
#include <QtCore/qenvironmentvariables.h>
|
||||
#include <QtCore/qexceptionhandling.h>
|
||||
#include <QtCore/qforeach.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user