aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysidesignal.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/libpyside/pysidesignal.h')
-rw-r--r--sources/pyside6/libpyside/pysidesignal.h70
1 files changed, 23 insertions, 47 deletions
diff --git a/sources/pyside6/libpyside/pysidesignal.h b/sources/pyside6/libpyside/pysidesignal.h
index 9127c81aa..589fc2c92 100644
--- a/sources/pyside6/libpyside/pysidesignal.h
+++ b/sources/pyside6/libpyside/pysidesignal.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $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$
-**
-****************************************************************************/
+// Copyright (C) 2020 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 PYSIDE_SIGNAL_H
#define PYSIDE_SIGNAL_H
@@ -55,8 +19,8 @@ QT_END_NAMESPACE
extern "C"
{
- extern PYSIDE_API PyTypeObject *PySideSignalTypeF(void);
- extern PYSIDE_API PyTypeObject *PySideSignalInstanceTypeF(void);
+ extern PYSIDE_API PyTypeObject *PySideSignal_TypeF(void);
+ extern PYSIDE_API PyTypeObject *PySideSignalInstance_TypeF(void);
// Internal object
struct PYSIDE_API PySideSignal;
@@ -66,11 +30,11 @@ extern "C"
{
PyObject_HEAD
PySideSignalInstancePrivate *d;
+ bool deleted;
};
}; // extern "C"
-namespace PySide {
-namespace Signal {
+namespace PySide::Signal {
/**
* This function checks for the PySideSignal type.
@@ -128,6 +92,18 @@ PYSIDE_API PyObject *getObject(PySideSignalInstance *signal);
**/
PYSIDE_API const char *getSignature(PySideSignalInstance *signal);
+struct EmitterData
+{
+ QObject *emitter = nullptr;
+ int methodIndex = -1;
+};
+
+/// A convenience to retrieve the emitter data from a signal instance
+///
+/// @param signal The Signal object
+/// @return Data structure
+PYSIDE_API EmitterData getEmitterData(PySideSignalInstance *signal);
+
/**
* This function is used to retrieve the signal signature
*
@@ -159,7 +135,8 @@ PYSIDE_API bool checkQtSignal(const char *signature);
* @param encodeName Used to specify if the returned signature will be encoded with Qt signal/slot style
* @return Return the callback signature
**/
-PYSIDE_API QString getCallbackSignature(const char *signal, QObject *receiver, PyObject *callback, bool encodeName);
+PYSIDE_API QByteArray getCallbackSignature(const char *signal, QObject *receiver,
+ PyObject *callback, bool encodeName);
/**
* This function parses the signature and then returns a list of argument types.
@@ -169,10 +146,9 @@ PYSIDE_API QString getCallbackSignature(const char *signal, QObject *receiver, P
* @return Return true if this is a Qt Signal, otherwise return false
* @todo replace return type by QList<QByteArray>
**/
-QStringList getArgsFromSignature(const char *signature,
- bool *isShortCircuit = nullptr);
+QByteArrayList getArgsFromSignature(const char *signature,
+ bool *isShortCircuit = nullptr);
-} // namespace Signal
-} // namespace PySide
+} // namespace PySide::Signal
#endif