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
Highlighted
Developer
Posts: 139
Registered: ‎05-24-2011
My Device: Z30 running 10.2 and Playbook 4GLTE running OS2.1
My Carrier: rogers
Accepted Solution

MediaPlayer error() not tagged as Qt signal?

Hi,

 

Using the 10.1.0.4828 SDK, and trying to trap MediaPlayer errors.  In Momentics, the line below is flagged as a bug and my slot never gets called.

 

		this->connect(&m_player, SIGNAL(error(bb::multimedia::MediaError::Type mediaError, unsigned int position)), this, SLOT(onPlaybackError()));

 the error is: 

 

MediaPlayer::error(bb::multimedia::MediaError::Type mediaError, unsigned int position) has not been tagged as a Qt signal; make sure all parameter types are fully qualified.

 the app compiles and runs fine, but if there's an error in media playback, my onPlaybackError() function never fires.

 

how do i need to make this signal/slot connection so it works?

 

thx,

 

J

bron: a cron-like scheduler for BlackBerry 10
http://apps.oddelement.com
Developer
Posts: 1,065
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: MediaPlayer error() not tagged as Qt signal?

[ Edited ]

Do not include the parameter names in the connect() function, just the types. Also, your slot must have matching parameters to your signal, even if you don't use them. If they don't the connection will fail.

 

Finally, it is standard practice to save the connect() return value and then test it with Q_ASSERT() so you are alerted to signal/slot connection problems when you run the app. This can save debugging headaches later.


oddboy wrote:

Hi,

 

Using the 10.1.0.4828 SDK, and trying to trap MediaPlayer errors.  In Momentics, the line below is flagged as a bug and my slot never gets called.

 

		this->connect(&m_player, SIGNAL(error(bb::multimedia::MediaError::Type mediaError, unsigned int position)), this, SLOT(onPlaybackError()));

 the error is: 

 

MediaPlayer::error(bb::multimedia::MediaError::Type mediaError, unsigned int position) has not been tagged as a Qt signal; make sure all parameter types are fully qualified.

 the app compiles and runs fine, but if there's an error in media playback, my onPlaybackError() function never fires.

 

how do i need to make this signal/slot connection so it works?

 

thx,

 

J






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 139
Registered: ‎05-24-2011
My Device: Z30 running 10.2 and Playbook 4GLTE running OS2.1
My Carrier: rogers

Re: MediaPlayer error() not tagged as Qt signal?

well, that was easy. thank you!
bron: a cron-like scheduler for BlackBerry 10
http://apps.oddelement.com