From 772b459cbeead82fda12e7d59a33f57c0cebbc72 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 7 Nov 2017 16:23:22 +0100 Subject: voidptr.cpp: Assign bool directly Fix MVC warning: voidptr.cpp(90): warning C4804: '>': unsafe use of type 'bool' in operation Change-Id: I690becd76320d843e79a56ea792b65fa4cc9a498 Reviewed-by: Alexandru Croitor --- sources/shiboken2/libshiboken/voidptr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/shiboken2/libshiboken/voidptr.cpp b/sources/shiboken2/libshiboken/voidptr.cpp index ad2a57358..7997839e4 100644 --- a/sources/shiboken2/libshiboken/voidptr.cpp +++ b/sources/shiboken2/libshiboken/voidptr.cpp @@ -87,7 +87,7 @@ int SbkVoidPtrObject_init(PyObject *self, PyObject *args, PyObject *kwds) SbkVoidPtrObject *sbkOther = reinterpret_cast(addressObject); sbkSelf->cptr = sbkOther->cptr; sbkSelf->size = sbkOther->size; - sbkSelf->isWritable = sbkOther->isWritable > 0 ? true : false; + sbkSelf->isWritable = sbkOther->isWritable; } // Shiboken::Object wrapper. else if (Shiboken::Object::checkType(addressObject)) { -- cgit v1.2.3 From 187f6caf08a015f3fad67813ca5206cdb826982e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 8 Nov 2017 09:56:52 +0100 Subject: Build QtConcurrent and QtScripttools with MSVC, too Change-Id: I38e8c16c0602b5dbf71dbe3a872630104fabfdb0 Reviewed-by: Alexandru Croitor --- sources/pyside2/CMakeLists.txt | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt index c4b97e860..d7d17f27d 100644 --- a/sources/pyside2/CMakeLists.txt +++ b/sources/pyside2/CMakeLists.txt @@ -255,12 +255,7 @@ COLLECT_MODULE_IF_FOUND(PrintSupport essential) COLLECT_MODULE_IF_FOUND(Sql essential) COLLECT_MODULE_IF_FOUND(Network essential) COLLECT_MODULE_IF_FOUND(Test essential) -if(NOT MSVC) - # right now this does not build on windows - COLLECT_MODULE_IF_FOUND(Concurrent essential) -else() - set(DISABLE_QtConcurrent 1) -ENDIF() +COLLECT_MODULE_IF_FOUND(Concurrent essential) if(UNIX AND NOT APPLE) COLLECT_MODULE_IF_FOUND(X11Extras essential) endif() @@ -280,12 +275,7 @@ COLLECT_MODULE_IF_FOUND(Qml opt) COLLECT_MODULE_IF_FOUND(Quick opt) COLLECT_MODULE_IF_FOUND(QuickWidgets opt) COLLECT_MODULE_IF_FOUND(Script opt) -if(NOT MSVC) - # right now this does not build on windows - COLLECT_MODULE_IF_FOUND(ScriptTools opt) -else() - set(DISABLE_QtScriptTools 1) -ENDIF() +COLLECT_MODULE_IF_FOUND(ScriptTools opt) COLLECT_MODULE_IF_FOUND(Svg opt) find_package(Qt5UiTools) if(Qt5UiTools_FOUND) -- cgit v1.2.3 From fa1c97fc2a7f25fe178b0c180b56f78ac00bc4c9 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 3 Nov 2017 14:08:27 +0100 Subject: Remove sys.path manipulations from test The sys.path hack is no longer necessary because we pass a proper PYTHONPATH from the CMakeLists file to the test wrapper. Change-Id: Ie9ad8802e64cf7c9ffec16ae55777d5d23654662 Reviewed-by: Friedemann Kleint --- .../pyside2/tests/QtWidgets/qstandarditemmodel_test.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py b/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py index 2e9d260a3..6ab60e730 100644 --- a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py +++ b/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py @@ -32,18 +32,14 @@ import sys from PySide2.QtGui import QStandardItemModel, QStandardItem from PySide2.QtWidgets import QWidget try: - # the normal call with installed PySide2 + # The normal import statement when PySide2 is installed. from PySide2 import shiboken2 as shiboken except ImportError: - try: - # When running make test on macOS, shiboken2 is not part of the PySide2 module, - # so it needs to be imported as a standalone module. - import shiboken2 as shiboken - except ImportError: - # sys.path is set a bit weird during tests, so we help a little to find shiboken2. - sys.path.append("../../..") - # the special call with testrunner.py - from shiboken2.shibokenmodule import shiboken2 as shiboken + # When running make test in shiboken build dir, or when running testrunner.py, + # shiboken2 is not part of the PySide2 module, so it needs to be imported as a standalone + # module. + import shiboken2 as shiboken + from helper import UsesQApplication -- cgit v1.2.3