diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index da3e52c6..51589ee5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -123,7 +123,7 @@ if(CUTTER_ENABLE_PYTHON_BINDINGS) add_custom_command(OUTPUT ${BINDINGS_SOURCE} COMMAND Shiboken2::shiboken2 --project-file="${BINDINGS_BUILD_DIR}/bindings.txt" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/bindings/bindings.xml" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/bindings/bindings.xml" "${BINDINGS_BUILD_DIR}/bindings.txt" IMPLICIT_DEPENDS CXX "${CMAKE_CURRENT_SOURCE_DIR}/bindings/bindings.h" COMMENT "Generating Python bindings with shiboken2") else() diff --git a/src/bindings/bindings.h b/src/bindings/bindings.h index 6a202e54..bde099fb 100644 --- a/src/bindings/bindings.h +++ b/src/bindings/bindings.h @@ -2,6 +2,8 @@ #ifndef CUTTER_BINDINGS_H #define CUTTER_BINDINGS_H +#define QT_ANNOTATE_ACCESS_SPECIFIER(a) __attribute__((annotate(#a))) + #include "../core/Cutter.h" #include "../common/Configuration.h" #include "../core/MainWindow.h" diff --git a/src/plugins/sample-python/sample_python.py b/src/plugins/sample-python/sample_python.py index 9a864c68..34eb208a 100644 --- a/src/plugins/sample-python/sample_python.py +++ b/src/plugins/sample-python/sample_python.py @@ -1,7 +1,7 @@ import cutter -from PySide2.QtCore import QObject, SIGNAL, Qt +from PySide2.QtCore import Qt from PySide2.QtWidgets import QAction, QVBoxLayout, QLabel, QWidget, QSizePolicy, QPushButton @@ -30,8 +30,8 @@ class FortuneWidget(cutter.CutterDockWidget): layout.addWidget(button) layout.setAlignment(button, Qt.AlignHCenter) - QObject.connect(cutter.core(), SIGNAL("seekChanged(RVA)"), self.generate_fortune) - QObject.connect(button, SIGNAL("clicked()"), self.generate_fortune) + button.clicked.connect(self.generate_fortune) + cutter.core().seekChanged.connect(self.generate_fortune) self.show()