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
Posts: 188
Registered: ‎04-07-2013
My Device: BlackBerry Z10
My Carrier: Telus

QGeoSearchReply emits finished() even if error() has been emitted

// Request reverse geocoding
QGeoSearchReply *reply = searchManager->reverseGeocode( myQGeoCoordinate,
                                                        myQGeoBoundingArea );
bool finished_connected = QObject::connect(reply,
     SIGNAL(finished()),
     this,
     SLOT(readReverseGeocode()));
 
bool error_connected = QObject::connect(reply,
     SIGNAL(error(QGeoSearchReply::Error, QString)),
     this,
     SLOT(reverseGeocodeError(QGeoSearchReply::Error, QString)));
}
 

 Hi, I have a problem with the QGeoSearchReply signals.

 

I tried to cause the error() signal emitted by turning off my internet connection (so that the reverse geocoding will fail).

 

Problem is, everytime after the error() signal emitted, the application will still emit the finished() signal.

 

Is this a bug?

 

Thanks!

jayvdiyk.com
Highlighted
Developer
Posts: 107
Registered: ‎06-12-2012
My Device: Dev Alpha C, Playbook
My Carrier: Loop

Re: QGeoSearchReply emits finished() even if error() has been emitted

This is an expected behavior.

The document clearly states that

void QGeoSearchManager::error

This signal is emitted when an error has been detected in the processing of reply. The QGeoSearchManager::finished() signal will probably follow.

http://doc-snapshot.qt-project.org/qt-mobility/qgeosearchmanager.html
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.