aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/PySide2/QtCore/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml6
-rw-r--r--sources/pyside2/tests/QtCore/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtCore/quuid_test.py45
4 files changed, 49 insertions, 7 deletions
diff --git a/sources/pyside2/PySide2/QtCore/CMakeLists.txt b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
index 0439f0a5c..f685b61d7 100644
--- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
@@ -10,9 +10,6 @@ else()
set(SPECIFIC_OS_FILES "")
endif()
-# TODO: Fix cycling dependency when generating QDataStream operator<< for QUuid
-set (QtCore_SRC_FIXED_ME ${QtCore_GEN_DIR}/quuid_wrapper.cpp)
-
set(QtCore_SRC
${QtCore_GEN_DIR}/qabstractanimation_wrapper.cpp
${QtCore_GEN_DIR}/qabstracteventdispatcher_timerinfo_wrapper.cpp
@@ -141,6 +138,7 @@ ${QtCore_GEN_DIR}/qtimezone_offsetdata_wrapper.cpp
${QtCore_GEN_DIR}/qtranslator_wrapper.cpp
${QtCore_GEN_DIR}/qurl_wrapper.cpp
${QtCore_GEN_DIR}/qurlquery_wrapper.cpp
+${QtCore_GEN_DIR}/quuid_wrapper.cpp
${QtCore_GEN_DIR}/qvariantanimation_wrapper.cpp
${QtCore_GEN_DIR}/qwaitcondition_wrapper.cpp
${QtCore_GEN_DIR}/qwritelocker_wrapper.cpp
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index dd4433889..d8eb16644 100644
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
@@ -1795,9 +1795,7 @@
<value-type name="OffsetData"/>
</value-type>
- <!-- FIXME QT5: Remove QUuid because cyclic dependency found on overloaddata QUuid(),
- this lead to cyclic dependency in <<(QDataStream &, QUUid) and incorrect QDataStream code generation (Windows only)-->
- <!-- <value-type name="QUuid">
+ <value-type name="QUuid">
<enum-type name="Variant"/>
<enum-type name="Version"/>
<add-function signature="__repr__" return-type="PyObject*">
@@ -1816,7 +1814,7 @@
</insert-template>
</inject-code>
</add-function>
- </value-type> -->
+ </value-type>
<value-type name="QMimeType" since="5.0" />
<object-type name="QMimeDatabase" since="5.0">
diff --git a/sources/pyside2/tests/QtCore/CMakeLists.txt b/sources/pyside2/tests/QtCore/CMakeLists.txt
index b8b0ec143..7dca530e9 100644
--- a/sources/pyside2/tests/QtCore/CMakeLists.txt
+++ b/sources/pyside2/tests/QtCore/CMakeLists.txt
@@ -106,6 +106,7 @@ PYSIDE_TEST(qtimezone_test.py)
PYSIDE_TEST(qtnamespace_test.py)
PYSIDE_TEST(qurl_test.py)
PYSIDE_TEST(qurlquery_test.py)
+PYSIDE_TEST(quuid_test.py)
PYSIDE_TEST(repr_test.py)
PYSIDE_TEST(setprop_on_ctor_test.py)
PYSIDE_TEST(staticMetaObject_test.py)
diff --git a/sources/pyside2/tests/QtCore/quuid_test.py b/sources/pyside2/tests/QtCore/quuid_test.py
new file mode 100644
index 000000000..64183884a
--- /dev/null
+++ b/sources/pyside2/tests/QtCore/quuid_test.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## 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 General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## 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-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QUuid'''
+
+import unittest
+
+from PySide2.QtCore import QUuid
+
+class QUuidTest(unittest.TestCase):
+ def testFromString(self):
+ uuidString = '{fc69b59e-cc34-4436-a43c-ee95d128b8c5}'
+ uuid = QUuid(uuidString)
+ self.assertTrue(not uuid.isNull())
+ self.assertEqual(uuid.toString(), uuidString)
+
+if __name__ == '__main__':
+ unittest.main()