m_ui, SLOT(gpsTimeout()));
connect(m_gps, SIGNAL(error(QString)),
- m_ui, SLOT(gpsError(QString))); // todo...
+ this, SLOT(error(QString)));
connect(m_gps, SIGNAL(position(QPointF,qreal)),
this, SLOT(saveGPSPosition(QPointF)));
parameters.append(PUBLISH);
parameters.append(EQUAL_MARK);
parameters.append(PUBLISH_TRUE);
- }
- else if(publish.compare(PUBLISH_FALSE) == 0) {
+ } else if(publish.compare(PUBLISH_FALSE) == 0) {
parameters.append(AMBERSAND_MARK);
parameters.append(PUBLISH);
parameters.append(EQUAL_MARK);
if (reply->error()) {
emit error(reply->errorString());
- }
- else {
+ } else {
qint64 max = reply->size();
QByteArray replyArray = reply->read(max);
qDebug() << "Reply from: " << url << "reply " << replyArray;
if(replyArray == ERROR_LAT.toAscii()) {
qDebug() << "Error: " << ERROR_LAT;
emit error(UPDATE_FAILED);
- }
- else if(replyArray == ERROR_LON.toAscii()) {
+ } else if(replyArray == ERROR_LON.toAscii()) {
qDebug() << "Error: " << ERROR_LON;
emit error(UPDATE_FAILED);
- }
- else if(replyArray.contains(ERROR_SESSION.toAscii())) {
+ } else if(replyArray.contains(ERROR_SESSION.toAscii())) {
qDebug() << "Error: " << ERROR_SESSION;
emit error(SESSION_EXPIRED);
- }
- else if(replyArray.startsWith(OPENING_BRACE_MARK.toAscii())) {
+ } else if(replyArray.startsWith(OPENING_BRACE_MARK.toAscii())) {
qDebug() << "JSON string";
parseUserData(replyArray);
- }
- else if(replyArray.isEmpty()) {
+ } else if(replyArray.isEmpty()) {
if(url.toString().contains(UPDATE_LOCATION.toAscii())) {
emit updateWasSuccessful();
- }
- else {
+ } else {
// session credentials are invalid
emit error(SESSION_EXPIRED);
}
- }
- else {
+ } else {
// Street address ready
QString address = QString::fromUtf8(replyArray);
emit reverseGeoReady(address);
void drawOwnLocationCrosshair(int width, int height);
/**
- * @brief Slot for gps error.
- *
- * @param message error message
- */
- void gpsError(const QString &message);
-
- /**
* @brief Slot for gps timeout.
*
* Called when request timeout occurs.