aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-10-05 09:44:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-10-06 11:32:18 +0200
commitdc11b2d45959ebd4a088dcd7dbcc24a1753a62b3 (patch)
treeada1434d65cec2021df1d88f74a3d1608c4757ef
parent738d19531112c48b20d69f54ae0a66c15edb79b5 (diff)
libshiboken/libpyside: Fix special functions
Pick-to: 6.6 Task-number: PYSIDE-2479 Change-Id: I6df19d487be7087f17e37bea3ea30a66e9b24ed7 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--sources/pyside6/libpyside/globalreceiverv2.h2
-rw-r--r--sources/pyside6/libpyside/pysideclassdecorator.cpp1
-rw-r--r--sources/pyside6/libpyside/pysideclassdecorator_p.h5
-rw-r--r--sources/pyside6/libpyside/pysideproperty.cpp1
-rw-r--r--sources/pyside6/libpyside/pysideproperty_p.h5
-rw-r--r--sources/pyside6/libpyside/signalmanager.cpp3
-rw-r--r--sources/pyside6/libpyside/signalmanager.h3
-rw-r--r--sources/shiboken6/libshiboken/basewrapper_p.h6
8 files changed, 25 insertions, 1 deletions
diff --git a/sources/pyside6/libpyside/globalreceiverv2.h b/sources/pyside6/libpyside/globalreceiverv2.h
index 256c798ef..0e78b9fee 100644
--- a/sources/pyside6/libpyside/globalreceiverv2.h
+++ b/sources/pyside6/libpyside/globalreceiverv2.h
@@ -48,6 +48,8 @@ size_t qHash(const GlobalReceiverKey &k, size_t seed = 0);
class GlobalReceiverV2 : public QObject
{
public:
+ Q_DISABLE_COPY_MOVE(GlobalReceiverV2)
+
/// Create a GlobalReceiver object that will call 'callback'
/// @param callback A Python callable object (can be a method or not)
explicit GlobalReceiverV2(PyObject *callback, QObject *receiver = nullptr);
diff --git a/sources/pyside6/libpyside/pysideclassdecorator.cpp b/sources/pyside6/libpyside/pysideclassdecorator.cpp
index 1085153d9..39b35025b 100644
--- a/sources/pyside6/libpyside/pysideclassdecorator.cpp
+++ b/sources/pyside6/libpyside/pysideclassdecorator.cpp
@@ -11,6 +11,7 @@
namespace PySide::ClassDecorator {
+DecoratorPrivate::DecoratorPrivate() noexcept = default;
DecoratorPrivate::~DecoratorPrivate() = default;
DecoratorPrivate *DecoratorPrivate::getPrivate(PyObject *o)
diff --git a/sources/pyside6/libpyside/pysideclassdecorator_p.h b/sources/pyside6/libpyside/pysideclassdecorator_p.h
index 9a1dfc8a2..3e4ad7515 100644
--- a/sources/pyside6/libpyside/pysideclassdecorator_p.h
+++ b/sources/pyside6/libpyside/pysideclassdecorator_p.h
@@ -8,6 +8,8 @@
#include <sbkpython.h>
+#include <QtCore/qtclasshelpermacros.h>
+
#include <array>
#include <string>
@@ -18,6 +20,8 @@ namespace PySide::ClassDecorator {
class PYSIDE_API DecoratorPrivate
{
public:
+ Q_DISABLE_COPY_MOVE(DecoratorPrivate)
+
virtual ~DecoratorPrivate();
/// Virtual function which is passed the decorated class type
@@ -41,6 +45,7 @@ protected:
/// Check mode for the arguments of the call operator
enum class CheckMode { None, WrappedType, QObjectType };
+ DecoratorPrivate() noexcept;
static DecoratorPrivate *getPrivate(PyObject *o);
/// Helper for checking the arguments of the call operator
diff --git a/sources/pyside6/libpyside/pysideproperty.cpp b/sources/pyside6/libpyside/pysideproperty.cpp
index 88679130d..2658b5f03 100644
--- a/sources/pyside6/libpyside/pysideproperty.cpp
+++ b/sources/pyside6/libpyside/pysideproperty.cpp
@@ -86,6 +86,7 @@ PyTypeObject *PySideProperty_TypeF(void)
return type;
}
+PySidePropertyPrivate::PySidePropertyPrivate() noexcept = default;
PySidePropertyPrivate::~PySidePropertyPrivate() = default;
PyObject *PySidePropertyPrivate::getValue(PyObject *source)
diff --git a/sources/pyside6/libpyside/pysideproperty_p.h b/sources/pyside6/libpyside/pysideproperty_p.h
index 963320644..10cb3ce87 100644
--- a/sources/pyside6/libpyside/pysideproperty_p.h
+++ b/sources/pyside6/libpyside/pysideproperty_p.h
@@ -10,6 +10,7 @@
#include <pysidemacros.h>
#include <QtCore/QByteArray>
+#include <QtCore/qtclasshelpermacros.h>
#include <QtCore/QMetaObject>
struct PySideProperty;
@@ -17,6 +18,10 @@ struct PySideProperty;
class PYSIDE_API PySidePropertyPrivate
{
public:
+
+ Q_DISABLE_COPY_MOVE(PySidePropertyPrivate)
+
+ PySidePropertyPrivate() noexcept;
virtual ~PySidePropertyPrivate();
virtual void metaCall(PyObject *source, QMetaObject::Call call, void **args);
diff --git a/sources/pyside6/libpyside/signalmanager.cpp b/sources/pyside6/libpyside/signalmanager.cpp
index 96567901c..4ed39dd5a 100644
--- a/sources/pyside6/libpyside/signalmanager.cpp
+++ b/sources/pyside6/libpyside/signalmanager.cpp
@@ -201,6 +201,9 @@ using namespace PySide;
struct SignalManager::SignalManagerPrivate
{
+ Q_DISABLE_COPY_MOVE(SignalManagerPrivate)
+
+ SignalManagerPrivate() noexcept = default;
~SignalManagerPrivate() { clear(); }
void deleteGobalReceiver(const QObject *gr);
diff --git a/sources/pyside6/libpyside/signalmanager.h b/sources/pyside6/libpyside/signalmanager.h
index 3c5bd9822..df47c33b6 100644
--- a/sources/pyside6/libpyside/signalmanager.h
+++ b/sources/pyside6/libpyside/signalmanager.h
@@ -52,8 +52,9 @@ PYSIDE_API QDataStream &operator>>(QDataStream& in, PyObjectWrapper& myObj);
class PYSIDE_API SignalManager
{
- Q_DISABLE_COPY(SignalManager)
public:
+ Q_DISABLE_COPY_MOVE(SignalManager)
+
using QmlMetaCallErrorHandler = std::optional<int>(*)(QObject *object);
static SignalManager& instance();
diff --git a/sources/shiboken6/libshiboken/basewrapper_p.h b/sources/shiboken6/libshiboken/basewrapper_p.h
index e59647aad..526bf9fa3 100644
--- a/sources/shiboken6/libshiboken/basewrapper_p.h
+++ b/sources/shiboken6/libshiboken/basewrapper_p.h
@@ -49,6 +49,12 @@ extern "C"
*/
struct SbkObjectPrivate
{
+ SbkObjectPrivate() noexcept = default;
+ SbkObjectPrivate(const SbkObjectPrivate &) = delete;
+ SbkObjectPrivate(SbkObjectPrivate &&o) = delete;
+ SbkObjectPrivate &operator=(const SbkObjectPrivate &) = delete;
+ SbkObjectPrivate &operator=(SbkObjectPrivate &&o) = delete;
+
/// Pointer to the C++ class.
void ** cptr;
/// True when Python is responsible for freeing the used memory.