diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-27 07:44:20 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-27 09:35:50 +0000 |
| commit | ac2eb96b1983aa09f2d95a060b5dc31df228f33d (patch) | |
| tree | 86d3e257bbeebfef2205bde61c16b6f80b556e9e /sources/pyside2/tests/pysidetest | |
| parent | d3ee9402ebc0abcf973ea8a7f4268c9f6aacd364 (diff) | |
libpyside: Fix deprecation warnings about constructing a QVariant from a type id
Build the QVariant from the QMetaType, fixing warning like:
libpyside/pysidemetafunction.cpp:186:64: warning: ‘Type’ is deprecated: Use QMetaType::Type instead. [-Wdeprecated-declarations]
/libpyside/pysidemetafunction.cpp:186:77: warning: ‘QVariant::QVariant(QVariant::Type)’ is deprecated: Use the constructor taking a QMetaType instead. [-Wdeprecated-declarations]
Change-Id: I5c9c4d775ef58ecf17326c112c5130c43fe1a09b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests/pysidetest')
| -rw-r--r-- | sources/pyside2/tests/pysidetest/testobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside2/tests/pysidetest/testobject.h b/sources/pyside2/tests/pysidetest/testobject.h index 41a97a0db..c31a2ab73 100644 --- a/sources/pyside2/tests/pysidetest/testobject.h +++ b/sources/pyside2/tests/pysidetest/testobject.h @@ -55,7 +55,7 @@ class PYSIDETEST_API TestObject : public QObject Q_OBJECT public: static void createApp() { int argc=0; new QApplication(argc, 0); }; - static int checkType(const QVariant& var) { return (int)var.type(); } + static int checkType(const QVariant& var) { return var.metaType().id(); } TestObject(int idValue, QObject* parent = 0) : QObject(parent), m_idValue(idValue) {} int idValue() const { return m_idValue; } |
