Move QFunctionPointer typedef to a separate header

Task-number: QTBUG-99313
Task-number: QTBUG-106154
Change-Id: I8c62e5c2c2f80d5ce1d4dce69eebbe7d1ebbfd52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Ivan Solovev 2022-09-30 12:28:19 +02:00
parent 0b791f6a90
commit d7cca67352
5 changed files with 34 additions and 12 deletions

View File

@ -59,6 +59,7 @@ qt_internal_add_module(Core
global/qflags.h
global/qfloat16.cpp global/qfloat16.h
global/qforeach.h
global/qfunctionpointer.h
global/qglobal.cpp global/qglobal.h global/qglobal_p.h
global/qglobalstatic.h
global/qhooks.cpp global/qhooks_p.h

View File

@ -0,0 +1,23 @@
// 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 QFUNCTIONPOINTER_H
#define QFUNCTIONPOINTER_H
#include <QtCore/qtconfigmacros.h>
#if 0
#pragma qt_class(QFunctionPointer)
#endif
#if defined(__cplusplus)
QT_BEGIN_NAMESPACE
typedef void (*QFunctionPointer)();
QT_END_NAMESPACE
#endif // __cplusplus
#endif // QFUNCTIONPOINTER_H

View File

@ -0,0 +1,9 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*! \typedef QFunctionPointer
\relates <QFunctionPointer>
This is a typedef for \c{void (*)()}, a pointer to a function that takes
no arguments and returns void.
*/

View File

@ -166,13 +166,6 @@ using namespace Qt::StringLiterals;
\sa <QtAlgorithms>, QSysInfo
*/
/*! \typedef QFunctionPointer
\relates <QFunctionPointer>
This is a typedef for \c{void (*)()}, a pointer to a function that takes
no arguments and returns void.
*/
/*
Dijkstra's bisection algorithm to find the square root of an integer.
Deliberately not exported as part of the Qt API, but used in both

View File

@ -50,11 +50,6 @@ QT_BEGIN_NAMESPACE
#if defined(__cplusplus)
#if 0
#pragma qt_class(QFunctionPointer)
#endif
typedef void (*QFunctionPointer)();
#if !defined(Q_UNIMPLEMENTED)
# define Q_UNIMPLEMENTED() qWarning("Unimplemented code.")
#endif
@ -92,6 +87,7 @@ QT_END_NAMESPACE
#include <QtCore/qdarwinhelpers.h>
#include <QtCore/qexceptionhandling.h>
#include <QtCore/qforeach.h>
#include <QtCore/qfunctionpointer.h>
#include <QtCore/qglobalstatic.h>
#include <QtCore/qmalloc.h>
#include <QtCore/qminmax.h>