[Kde-games-devel] KMahjongg frameworks branch

Ian Wadham iandw.au at gmail.com
Tue Nov 17 23:13:52 UTC 2015


On 18/11/2015, at 10:06 AM, Frederik Schwarzer wrote:
> 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);

Do you still need the full signature?  &GameScene::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
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel



More information about the kde-games-devel mailing list