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
Regular Contributor
Posts: 76
Registered: ‎06-14-2013
My Device: Z10
My Carrier: PosteMobile

SystemProgressDialog: Signal finished(bb::system::SystemUiResult::Type) never called

[ Edited ]

Hi.

 

I'm having problems to connect a signal from a SystemProgressDialog object to QThread derived class object.

The connect call it's:

    connect(SpinningWheelDialog , SIGNAL(finished(bb::systemSmiley FrustratedystemUiResult::Type) ) , this , SLOT(terminateNotification(bb::systemSmiley FrustratedystemUiResult::Type) ) );

 

The SpinningWheelDialog object is a SystemProgressDialog;
The class this is the QThread derived one and the connect it's invoked in the constructor of this class.

There are no error both at compilation and runtime, so i suppose the code is correct. It simply doesn't work. When a button is clicked the Dialog disappear but the slot method is not called.

 

I want the thread to be terminated when the Dialog is closed or destroyed.

Any help is appreciated.


Running OS: 10.1.0.273
API level: 10.1

Developer
Posts: 134
Registered: ‎04-12-2013
My Device: BB Z10
My Carrier: Telenor

Re: SystemProgressDialog: Signal finished(bb::system::SystemUiResult::Type) never called

Does your .h file contain this line?

 

private slots:
	void terminateNotificaion(....));

 

Please like this if you are answered.
Regular Contributor
Posts: 76
Registered: ‎06-14-2013
My Device: Z10
My Carrier: PosteMobile

Re: SystemProgressDialog: Signal finished(bb::system::SystemUiResult::Type) never called

This is what my .hpp contains:

 

public slots:

 

void terminateNotification(bb::system:Smiley FrustratedystemUiResult::Type TypeValue);

 

Is it a problem to declare the slot as "public" ?

Developer
Posts: 134
Registered: ‎04-12-2013
My Device: BB Z10
My Carrier: Telenor

Re: SystemProgressDialog: Signal finished(bb::system::SystemUiResult::Type) never called

of course No.. Smiley Happy 

 

Where and when is the signal "finished" emitted?

Please like this if you are answered.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: SystemProgressDialog: Signal finished(bb::system::SystemUiResult::Type) never called

Just a quick note that you shouldn't be deriving QThread any more (not saying this is the problem)...

 

http://developer.blackberry.com/native/documentation/cascades/dev/fundamentals/#joh1349117594567


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: SystemProgressDialog: Signal finished(bb::system::SystemUiResult::Type) never called

I take it you've checked the connection...

 

bool result = connect(SpinningWheelDialog , SIGNAL(finished(bb::systemystemUiResult::Type) ) , this , SLOT(terminateNotification(bb::systemystemUiResult::Type) ) );

 

Q_ASSERT(result);

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Regular Contributor
Posts: 76
Registered: ‎06-14-2013
My Device: Z10
My Carrier: PosteMobile

Re: SystemProgressDialog: Signal finished(bb::system::SystemUiResult::Type) never called

" Where and when is the signal "finished" emitted? "

 

I don't know smjose i think you should ask it to a BB framework developer. The finished signal is supposed to be called when the Dialog is closed or canceled, i saw the use of this signal here:

http://developer.blackberry.com/native/documentation/cascades/ui/dialogs_toasts/system_dialogs.html

I have checked with an if statement if the connect fail (the Q_ASSERT give me problem of freeze).

However the result value is true and indeed there are no error on the console relating signals or slots.