Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Raestloz
Posts: 87
Registered: ‎02-23-2011
My Device: Z10 STL100-1
My Carrier: Telkomsel
Accepted Solution

Signals not tagged as Qt signals

[ Edited ]

I'm trying to connect the HomeScreen signal wallpaperLockStateChanged, but NDK claims that it's not tagged as Qt signals and when I ran the app anyway, NDK claims no such signal exist.

 

The error is this:

HomeScreen::wallpaperLockStateChanged(bb:: platform::WallpaperLockState::Type wallpaperLockState) has not been tagged as a Qt signal; make sure all parameter types are fully qualified

 

That signal is described here in the official documentation

 

I tried to copy-paste the signal name directly from my browser, no luck.

 

The code in question looks like this:

QObject::connect

(&homeScreen, SIGNAL( wallpaperLockStateChanged(bb:: platform::WallpaperLockState::Type wallpaperLockState) ),

&applicationUI, SLOT( onWallpaperLockStateChanged(bb:: platform::WallpaperLockState::Type wallpaperLockState) ));

 

The slot is defined in applicationui.hpp as a public slot and implemented in the .cpp, currently it simply contains qDebug("AAA");

 

As a side note, I can connect with the lockStateChanged signal just fine.

 

So, what's going on here? Googling for this doesn't yield any answer. The only instance where this kind of error occured was resolved by way of not using the problematic signal altogether

 

 

I'm stumped here

BlackBerry Z10, keeps you flowing
Please use plain text.
Developer
Raestloz
Posts: 87
Registered: ‎02-23-2011
My Device: Z10 STL100-1
My Carrier: Telkomsel

Re: Signals not tagged as Qt signals

Yeah, I'm stupid.

 

The reason it says "no such signal existed" is because I put the arguments along, so instead of this:

QObject::connect

(&homeScreen, SIGNAL( wallpaperLockStateChanged(bb:: platform::WallpaperLockState::Type wallpaperLockState) ),

&applicationUI, SLOT( onWallpaperLockStateChanged(bb:: platform::WallpaperLockState::Type wallpaperLockState) ));

 

I should have put this:

QObject::connect

(&homeScreen, SIGNAL( wallpaperLockStateChanged(bb:: platform::WallpaperLockState::Type) ),

&applicationUI, SLOT( onWallpaperLockStateChanged(bb:: platform::WallpaperLockState::Type) ));

 

Notice the lack of function argument in the second example.

 

I hope this can help some other poor schmuck out there. Also, the NDK should've said that QObject connect doesn't need function arguments, that'd make a lot of more sense

 

BlackBerry Z10, keeps you flowing
Please use plain text.