[Kde-games-devel] KMahjongg frameworks branch

Frederik Schwarzer schwarzer at kde.org
Tue Nov 17 23:06:15 UTC 2015


Ok, first stumbling block.
While porting to the newer connect() syntax, some calls in GameView 
give me compile errors and I do not see the problem.

diff --git a/GameView.cpp b/GameView.cpp
     // Connections
-    connect(scene(), SIGNAL(selectionChanged()), this, 
SLOT(selectionChanged()));
+    connect(scene, &GameScene::selectionChanged, this, 
&GameView::selectionChanged);


[ 18%] Building CXX object CMakeFiles/kmahjongg.dir/GameView.cpp.o
/home/fs/git/kdegames/kmahjongg/GameView.cpp: In constructor 
‘GameView::GameView(GameScene*, GameData*, QWidget*)’:
/home/fs/git/kdegames/kmahjongg/GameView.cpp:69:83: error: invalid use 
of non-static member function
     connect(scene, &GameScene::selectionChanged, this, 
&GameView::selectionChanged);


Any idea what is missing here? The connect() calls in other Classes at 
least compile fine.

Regards
Frederik


More information about the kde-games-devel mailing list