Skip to content

Commit 4f5149d

Browse files
committed
Fix Qt and Python keyword conflict
1 parent 831d12f commit 4f5149d

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

include/hpp/plot/graph-widget.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ class GraphWidget : public QWidget {
5959

6060
~GraphWidget();
6161

62-
public slots:
62+
public Q_SLOTS:
6363
void updateGraph();
6464
void updateEdges();
6565
void saveDotFile();
6666

67-
protected slots:
67+
protected Q_SLOTS:
6868
virtual void nodeContextMenu(QGVNode* node);
6969
virtual void nodeDoubleClick(QGVNode* node);
7070
virtual void edgeContextMenu(QGVEdge* edge);

include/hpp/plot/hpp-manipulation-graph.hh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ class GraphAction : public QAction {
5252
public:
5353
GraphAction(HppManipulationGraphWidget* parent);
5454

55-
signals:
55+
Q_SIGNALS:
5656
void activated(hpp::ID id);
5757

58-
private slots:
58+
private Q_SLOTS:
5959
void transferSignal();
6060

6161
private:
@@ -83,22 +83,22 @@ class HppManipulationGraphWidget : public GraphWidget {
8383
protected:
8484
void fillScene();
8585

86-
public slots:
86+
public Q_SLOTS:
8787
void updateStatistics();
8888
void showNodeOfConfiguration(const hpp::floatSeq& cfg);
8989
void displayNodeConstraint(hpp::ID id);
9090
void displayEdgeConstraint(hpp::ID id);
9191
void displayEdgeTargetConstraint(hpp::ID id);
9292

93-
protected slots:
93+
protected Q_SLOTS:
9494
virtual void nodeContextMenu(QGVNode* node);
9595
virtual void nodeDoubleClick(QGVNode* node);
9696
virtual void edgeContextMenu(QGVEdge* edge);
9797
virtual void edgeDoubleClick(QGVEdge* edge);
9898

9999
void selectionChanged();
100100

101-
private slots:
101+
private Q_SLOTS:
102102
void startStopUpdateStats(bool start);
103103

104104
private:

include/hpp/plot/hpp-native-graph.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class HppNativeGraphWidget : public GraphWidget {
7777
/// \param edgeId The ID of the edge to highlight, or -1 to clear
7878
void highlightEdge(long edgeId);
7979

80-
public slots:
80+
public Q_SLOTS:
8181
/// \brief Display detailed state constraints in the constraint panel
8282
void displayStateConstraints(std::size_t id);
8383

@@ -92,7 +92,7 @@ class HppNativeGraphWidget : public GraphWidget {
9292
/// Reads nodes and edges directly from the C++ graph structure
9393
void fillScene() override;
9494

95-
protected slots:
95+
protected Q_SLOTS:
9696
virtual void nodeContextMenu(QGVNode* node);
9797
virtual void nodeDoubleClick(QGVNode* node);
9898
virtual void edgeContextMenu(QGVEdge* edge);

src/pyhpp_plot/graph_viewer.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@
3535
#include <hpp/manipulation/graph/graph.hh>
3636
#include <hpp/plot/hpp-native-graph.hh>
3737

38+
// Workaround for Qt/Python keyword conflict (Python 3.13+)
39+
#undef slots
40+
#undef signals
41+
#undef emit
42+
43+
#include <boost/python.hpp>
44+
#include <boost/python/extract.hpp>
45+
3846
namespace bp = boost::python;
3947

4048
namespace {

0 commit comments

Comments
 (0)