I guess you are just trying to connect the SystemDialog
finished
signal to a the same object's deleteLaters
slot (which doesn't exist).
Try something like the next code, where myObject
might just be this
if you declare your slot in your class.
int connectResult = connect(dialog,
SIGNAL(finished(bb::system::SystemUiResult::Type)),
myObject,
SLOT(deleteLaters()));
Q_ASSERT(connectResult);
Q_RESULT(connectResult);
For more information on how to properly declare your new slot in your class, see the signals and slots documentation.
Note: If you really need to close the application (which is not recommended), I believe you should use Application::instance->requestExit()
to do it properly. If you don't need to do anything else before closing the application, you might directly connect the signal to the requestExit()
slot:
int connectResult = connect(dialog,
SIGNAL(finished(bb::system::SystemUiResult::Type)),
Application::instance,
SLOT(requestExit()));
Q_ASSERT(connectResult);
Q_RESULT(connectResult);