Fix Bindings of Signals (Fix #1482) (#1530)

This commit is contained in:
Florian Märkl 2019-05-13 13:55:02 +02:00 committed by GitHub
parent 170d77e62c
commit 65b5f78a59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -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()

View File

@ -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"

View File

@ -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()