2 * Http client Connects application to server.
4 * @author Tiina Kivilinna-Korhola <tiina.kivilinna-korhola@fudeco.com>
5 * @author Olavi Pulkkinen <olavi.pulkkinen@fudeco.com>
6 * @author Toni Jussila <toni.jussila@fudeco.com>
7 * @copyright (c) 2010 Speed Freak team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 #include <QMessageBox>
14 #include "httpclient.h"
15 #include "mainwindow.h"
18 *@brief Constructor, connects object to GUI
19 *@param Pointer to carmainwindow, which is temporarily used during development
21 HttpClient::HttpClient(MainWindow *myCarw)
23 qDebug() << "__HttpClient";
25 netManager = new QNetworkAccessManager();
26 myXmlwriter = new XmlWriter();
27 myXmlreader = new XmlReader();
28 connect(myXmlreader, SIGNAL(userInfo(QStringList*)), this, SLOT(sendUsersInfo(QStringList*)));
34 HttpClient::~HttpClient()
36 qDebug() << "__~HttpClient" ;
45 *@brief Sends registration information to the server in xml format.
46 *Reads user name, password and emaol address from resuldialogs internal variables.
48 void HttpClient::requestRegistration()
50 qDebug() << "_requestRegistration" ;
51 qDebug() << myMainw->settingsDialog->getRegUserName() << "+" << myMainw->settingsDialog->getRegPassword() << "+" << myMainw->settingsDialog->getRegEmail();
53 QBuffer *regbuffer = new QBuffer();
54 QUrl qurl("http://www.speedfreak-app.com/users/register");
55 QNetworkRequest request(qurl);
56 qDebug() << qurl.toString();
57 QNetworkReply *currentDownload;
59 regbuffer->open(QBuffer::ReadWrite);
60 myXmlwriter->writeRegistering(regbuffer,
61 myMainw->settingsDialog->getRegUserName(),
62 myMainw->settingsDialog->getRegPassword(),
63 myMainw->settingsDialog->getRegEmail(),
65 qDebug() << "carmainwindow: regbuffer->data(): " << regbuffer->data();
67 currentDownload = netManager->post(request, ("xml=" + regbuffer->data()));
68 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfRegistration()));
69 //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
72 if(myMainw->settingsDialog)
73 myMainw->settingsDialog->setLabelInfoToUser("Reguesting registration from server");
79 *@brief Sends result(s) to the server in xml format.
80 *Send authentication information in the header.
82 void HttpClient::sendResultXml(QString category, double result)
84 qDebug() << "_sendResultXml";
87 QBuffer *xmlbuffer = new QBuffer();
89 QUrl qurl("http://www.speedfreak-app.com/results/update/" + category);
91 qDebug() << qurl.toString();
92 QNetworkRequest request(qurl);
93 QNetworkReply *currentDownload;
95 xmlbuffer->open(QBuffer::ReadWrite);
96 myXmlwriter->writeResult(xmlbuffer, result);
97 qDebug() << "carmainwindow: xmlbuffer->data(): " << xmlbuffer->data();
99 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
100 credentials = "Basic " + credentials.toAscii().toBase64();
101 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
103 currentDownload = netManager->post(request, ("xml=" + xmlbuffer->data()));
104 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfResult()));
105 //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
108 if(myMainw->accstart->accRealTimeDialog->resultDialog)
109 myMainw->accstart->accRealTimeDialog->resultDialog->setLabelInfoToUser("Sending result to server");
115 * @brief Sends route to the server in xml format.
116 * Send authentication information in the header.
117 * @param QString filename
118 * @param int 1(send to server) or 0(no send)
119 * @todo Check destination URL.
121 void HttpClient::sendRouteXml(QString oldName, QString newName, int i)
123 qDebug() << "_sendRouteXml";
125 //QString filename = "/home/user/MyDocs/speedfreak/route/route.xml";
126 qDebug() << "__old:" + oldName;
127 QString filename = newName; //+ ".xml";
131 qDebug() << "_rename xml";
133 qDebug() << "__new:" + filename;
134 qDebug() << dir.rename(oldName, filename);
139 qDebug() << "_send route";
140 QFile file(filename);
141 if (!file.open(QFile::ReadOnly))
143 qDebug() << "_sendRouteXml file.open() fail";
147 QUrl qurl("http://speedfreak-app.com/update/route");
148 qDebug() << qurl.toString();
149 QNetworkRequest request(qurl);
150 QNetworkReply *currentDownload;
152 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
153 credentials = "Basic " + credentials.toAscii().toBase64();
154 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
156 currentDownload = netManager->post(request, ("xml=" + file.readAll()));
157 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfRoute()));
158 //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
161 if(myMainw->routeSaveDialog->routeDialog)
162 myMainw->routeSaveDialog->routeDialog->setLabelInfoToUser("Sending route to server");
169 *@brief Request the Top10List of certain category from the server.
170 *Send authentication information in the header.
171 *@param Category of results.
172 *@param Limit, the number of results.
174 void HttpClient::requestTopList(QString category, QString limit)
176 qDebug() << "_requestTopList";
177 qDebug() << category;
179 QString urlBase = "http://www.speedfreak-app.com/results/list/";
180 QUrl qurl(urlBase + category + "/" + limit);
181 qDebug() << qurl.toString();
182 QNetworkRequest request(qurl);
183 QNetworkReply *currentDownload;
185 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
186 credentials = "Basic " + credentials.toAscii().toBase64();
187 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
189 currentDownload = netManager->post(request, ("data=" ));
190 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfToplist()));
191 //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
194 if(myMainw->topResultDialog)
195 myMainw->topResultDialog->setLabelInfoToUser("Reguesting top10 list from server");
199 *@brief Request categories list from the server.
200 *Send authentication information in the header.
202 void HttpClient::requestCategories()
204 qDebug() << "_requestCategories" ;
205 QUrl qurl("http://www.speedfreak-app.com/results/categories");
207 qDebug() << qurl.toString();
208 QNetworkRequest request(qurl);
209 QNetworkReply *currentDownload;
211 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
212 credentials = "Basic " + credentials.toAscii().toBase64();
213 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
215 currentDownload = netManager->post(request, ("data=" ));
216 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfCategories()));
217 //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
220 if(myMainw->topResultDialog)
221 myMainw->topResultDialog->setLabelInfoToUser("Reguesting categories from server");
225 *@brief Check that username and password exist on the server.
226 *Send authentication information in the header.
228 void HttpClient::checkLogin()
230 qDebug() << "_checkLogin";
232 QUrl qurl("http://www.speedfreak-app.com/users/login");
233 qDebug() << qurl.toString();
235 QNetworkRequest request(qurl);
236 QNetworkReply *currentDownload;
238 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
239 credentials = "Basic " + credentials.toAscii().toBase64();
240 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
242 currentDownload = netManager->post(request, ("data=" ));
243 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfLogin()));
244 //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
247 if(myMainw->settingsDialog)
248 myMainw->settingsDialog->setLabelInfoToUser("Checking login validity from server");
252 *@brief React to servers responce after result has been sent.
254 void HttpClient::ackOfResult()
256 qDebug() << "_ackOfResult";
259 if(myMainw->accstart->accRealTimeDialog->resultDialog)
260 myMainw->accstart->accRealTimeDialog->resultDialog->setLabelInfoToUser("");
262 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
264 QNetworkReply::NetworkError errorcode;
265 errorcode = reply->error();
267 qDebug() << "errorcode:" << errorcode << reply->errorString();
270 if(myMainw->accstart->accRealTimeDialog->resultDialog)
271 QMessageBox::about(myMainw->accstart->accRealTimeDialog->resultDialog, "Server reply to result sending ",reply->errorString());
272 if(myMainw->accstart->accRealTimeDialog->resultDialog)
273 myMainw->accstart->accRealTimeDialog->resultDialog->setLabelInfoToUser("Error");
274 if(myMainw->accstart->accRealTimeDialog->resultDialog)
275 myMainw->accstart->accRealTimeDialog->resultDialog->setSendServerButtonEnabled();
278 //qDebug() << "errorcode:" << errorcode << reply->errorString();
281 if(myMainw->accstart->accRealTimeDialog->resultDialog)
282 QMessageBox::about(myMainw->accstart->accRealTimeDialog->resultDialog, "Server reply to result sending", "Result received " + reply->readAll());
283 if(myMainw->accstart->accRealTimeDialog->resultDialog)
284 myMainw->accstart->accRealTimeDialog->resultDialog->setLabelInfoToUser("Result received");
289 *@brief React to servers responce after route has been sent.
291 void HttpClient::ackOfRoute()
293 qDebug() << "_ackOfRoute";
295 if(myMainw->routeSaveDialog->routeDialog)
296 myMainw->routeSaveDialog->routeDialog->setLabelInfoToUser("");
298 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
300 QNetworkReply::NetworkError errorcode;
301 errorcode = reply->error();
303 qDebug() << "errorcode:" << errorcode << reply->errorString();
304 if(myMainw->routeSaveDialog->routeDialog)
305 QMessageBox::about(myMainw->routeSaveDialog->routeDialog, "Server reply to route sending ",reply->errorString());
306 if(myMainw->routeSaveDialog->routeDialog)
307 myMainw->routeSaveDialog->routeDialog->setSendServerButtonEnabled();
310 qDebug() << "errorcode:" << errorcode << reply->errorString();
311 if(myMainw->routeSaveDialog->routeDialog)
312 QMessageBox::about(myMainw->routeSaveDialog->routeDialog, "Server reply to route sending", "Route received " + reply->readAll());
317 *@brief React to servers responce after registration has been sent.
318 *@todo Implement consequencies of reply.
320 void HttpClient::ackOfRegistration()
322 qDebug() << "_ackOfRegistration";
324 if(myMainw->settingsDialog)
325 myMainw->settingsDialog->setLabelInfoToUser("");
327 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
329 QNetworkReply::NetworkError errorcode;
330 errorcode = reply->error();
332 qDebug() << "errorcode:" << errorcode << reply->errorString();
333 if(myMainw->settingsDialog)
334 QMessageBox::about(myMainw->settingsDialog, "Server reply to registration",reply->readAll());
337 qDebug() << "errorcode=0" << errorcode << reply->errorString();
338 if(myMainw->settingsDialog)
340 QMessageBox::about(myMainw->settingsDialog, "Server reply to registration", "User registration " + reply->readAll());
341 myMainw->settingsDialog->clearRegisterLineEdits();
347 *@brief React to servers responce after request for categories has been sent.
349 void HttpClient::ackOfCategories()
351 qDebug() << "_ackOfCategories";
353 if(myMainw->topResultDialog)
354 myMainw->topResultDialog->setLabelInfoToUser("");
356 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
357 myXmlreader->xmlReadCategories(reply);
359 QNetworkReply::NetworkError errorcode;
360 errorcode = reply->error();
362 qDebug() << "errorcode:" << errorcode << reply->errorString();
363 //QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting categories",reply->errorString());
364 if(myMainw->topResultDialog)
365 myMainw->topResultDialog->setLabelInfoToUser("You're not logged! Please register or log in.");
368 //qDebug() << "errorcode:" << errorcode << reply->errorString();
369 //QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting categories ", "OK");
370 if(myMainw->topResultDialog)
371 myMainw->topResultDialog->setLabelInfoToUser("");
376 *@brief React to servers responce after request of TopList in certain category has been sent.
378 void HttpClient::ackOfLogin()
380 qDebug() << "_ackOffLogin";
382 if(myMainw->settingsDialog)
383 myMainw->settingsDialog->setLabelInfoToUser("");
385 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
387 QNetworkReply::NetworkError errorcode;
388 errorcode = reply->error();
391 qDebug() << "errorcode:" << errorcode << reply->errorString();
392 if(myMainw->settingsDialog)
394 QMessageBox::about(myMainw->settingsDialog, "Server does not recognize your username. Please registrate.",reply->errorString());
395 myMainw->settingsDialog->usernameOk(false);
400 qDebug() << "errorcode:" << errorcode << reply->errorString();
401 if(myMainw->settingsDialog)
402 QMessageBox::about(myMainw->settingsDialog, "Server reply to login", "User login " + reply->readAll());
403 // here signal emit to mainwindow for username setting to main panel
405 if( myMainw->settingsDialog)
407 myMainw->settingsDialog->usernameOk(true);
408 myMainw->settingsDialog->close();
414 *@brief Reports errors, when server has sent error signal.
416 void HttpClient::errorFromServer(QNetworkReply::NetworkError errorcode)
418 qDebug() << "_errorFromServer";
419 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
422 qDebug() << "errorcode:" << errorcode;
423 //Note that errors are already reported on other each functions for server communication
424 //QMessageBox::about(myMainw, "Server reported an error", reply->errorString());
427 qDebug() << "errorcode:" << errorcode << reply->errorString();
428 qDebug() << reply->readAll();
433 *@brief React to servers responce after request of TopList in certain category has been sent.
435 void HttpClient::ackOfToplist()
437 qDebug() << "_ackOfToplist";
438 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
439 myXmlreader->xmlReadTop10Results(reply,myMainw->settingsDialog->getUserName());
441 QNetworkReply::NetworkError errorcode;
442 errorcode = reply->error();
444 qDebug() << "errorcode:" << errorcode << reply->errorString();
446 if(myMainw->topResultDialog)
448 //QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting top 10 list",reply->errorString());
449 myMainw->topResultDialog->setLabelInfoToUser("No results ;(");
453 qDebug() << "errorcode:" << errorcode << reply->errorString();
455 if(myMainw->topResultDialog)
457 //QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting top 10 list", "OK " + reply->readAll());
458 myMainw->topResultDialog->setLabelInfoToUser("");
464 * This function sends profile to the server in xml format.
465 * Send authentication information in the header.
467 void HttpClient::sendProfileXml()
469 qDebug() << "_sendProfileXml";
471 QString userName = myMainw->settingsDialog->getUserName();
472 QString filename = userName + "_profile.xml";
473 QFile file(filename);
474 if (!file.open(QFile::ReadWrite | QFile::Text))
476 qDebug() << "_xmlWrite fail";
479 myXmlwriter->writeProfileXmlFile(&file, userName,
480 myMainw->settingsDialog->profileDialog->getManufacturer(),
481 myMainw->settingsDialog->profileDialog->getType(),
482 myMainw->settingsDialog->profileDialog->getModel(),
483 myMainw->settingsDialog->profileDialog->getDescription(),
484 myMainw->settingsDialog->profileDialog->getPicture());
487 if(myMainw->settingsDialog->profileDialog)
488 myMainw->settingsDialog->profileDialog->setLabelInfoToUser("Profile saved to phone");
490 // Send xml to server
491 /*QUrl qurl("http://speedfreak-app.com/api/profile");
492 QNetworkRequest request(qurl);
493 qDebug() << qurl.toString();
494 QNetworkReply *currentDownload;
496 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
497 credentials = "Basic " + credentials.toAscii().toBase64();
498 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
500 currentDownload = netManager->post(request, ("xml=" + file.readAll()));
501 bool error = connect(currentDownload, SIGNAL(finished()), this, SLOT(ackOfProfile()));*/
505 // Send picture to server
506 /*if(myMainw->settingsDialog->profileDialog->getPicture() != "" && error == false)
508 QFile pictureFile( myMainw->settingsDialog->profileDialog->getPicture() );
509 if (!pictureFile.open(QIODevice::ReadOnly))
511 qDebug() << "__picture read fail";
514 currentDownload = netManager->post(request, pictureFile.readAll());
515 connect(currentDownload, SIGNAL(finished()), this, SLOT(ackOfSendingPicture()));
521 * This slot function react to servers responce after request of profile has been sent.
523 bool HttpClient::ackOfProfile()
525 qDebug() << "__ackOfProfile";
526 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
527 QNetworkReply::NetworkError errorcode;
528 errorcode = reply->error();
530 qDebug() << "errorcode:" << errorcode << reply->errorString();
532 if(myMainw->settingsDialog->profileDialog)
534 //QMessageBox::about(myMainw->settingsDialog->profileDialog, "Server reply to requesting profile",reply->errorString());
535 myMainw->settingsDialog->profileDialog->setLabelInfoToUser("Profile save to server - fail");
540 qDebug() << "errorcode:" << errorcode << reply->errorString();
542 if(myMainw->settingsDialog->profileDialog)
544 //QMessageBox::about(myMainw->settingsDialog->profileDialog, "Server reply to requesting profile", "OK " + reply->readAll());
545 myMainw->settingsDialog->profileDialog->setLabelInfoToUser("Profile saved to server");
551 * This slot function react to servers responce after request of picture has been sent.
553 void HttpClient::ackOfSendingPicture()
555 qDebug() << "__ackOfSendingPicture";
556 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
557 QNetworkReply::NetworkError errorcode;
558 errorcode = reply->error();
560 qDebug() << "errorcode:" << errorcode << reply->errorString();
562 if(myMainw->settingsDialog->profileDialog)
564 //QMessageBox::about(myMainw->settingsDialog->profileDialog, "Server reply to requesting picture",reply->errorString());
565 myMainw->settingsDialog->profileDialog->setLabelInfoToUser("Picture save to server - fail");
569 qDebug() << "errorcode:" << errorcode << reply->errorString();
571 if(myMainw->settingsDialog->profileDialog)
573 //QMessageBox::about(myMainw->settingsDialog->profileDialog, "Server reply to requesting picture", "OK " + reply->readAll());
574 myMainw->settingsDialog->profileDialog->setLabelInfoToUser("Picture saved to server");
580 *@brief Request the user information of certain user from the server.
581 *Send authentication information in the header.
582 *@param username which information we want.
584 void HttpClient::requestUserInfo(QString username)
586 qDebug() << "_requestUsersInfo" ;
588 QUrl qurl("http://speedfreak-app.com/users/info/" + username);
589 qDebug() << qurl.toString();
590 QNetworkRequest request(qurl);
591 QNetworkReply *currentDownload;
593 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
594 credentials = "Basic " + credentials.toAscii().toBase64();
595 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
597 currentDownload = netManager->post(request, ("data=" ));
598 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfUserInfo()));
600 //qDebug() << "requestUserInfo";
605 *@brief React to servers responce after request the user information of certain user.
607 void HttpClient::ackOfUserInfo()
609 qDebug() << "ackUserInfo";
610 /*QString fileName = "user.xml";
611 QFile file(fileName);
612 //file.setFileName( "routetemp.xml");
613 if (!file.open(QFile::ReadOnly))
615 qDebug() << "_xmlShow fail";
619 myXmlreader->xmlReadUserInfo(&file);
622 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
623 myXmlreader->xmlReadUserInfo(reply);
625 //for(int i = 0; i < myXmlreader->usersList->count(); i++)
627 // myMainw->settingsDialog->sendUsernameToUsersDialog(myXmlreader->usersList->at(i));
632 *@brief Request the users list of all users from the server.
633 *Send authentication information in the header.
635 void HttpClient::requestUsers()
637 qDebug() << "_requestUsers" ;
639 QUrl qurl("http://www.speedfreak-app.com/users/list_all");
640 qDebug() << qurl.toString();
641 QNetworkRequest request(qurl);
642 QNetworkReply *currentDownload;
644 QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
645 credentials = "Basic " + credentials.toAscii().toBase64();
646 request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
648 currentDownload = netManager->post(request, ("data=" ));
649 connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfUsers()));
652 //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
655 //if(myMainw->topResultDialog)
656 //myMainw->topResultDialog->setLabelInfoToUser("Reguesting categories from server");
662 *@brief React to servers responce after request the users list of all users.
664 void HttpClient::ackOfUsers()
666 qDebug() << "ackUsers";
667 /* QString fileName = "jtn.xml";
668 QFile file(fileName);
669 //file.setFileName( "routetemp.xml");
670 if (!file.open(QFile::ReadOnly))
672 qDebug() << "_xmlShow fail";
676 myXmlreader->xmlReadUsers(&file);
679 for(int i = 0; i < myXmlreader->usersList->count(); i++)
681 myMainw->settingsDialog->sendUsernameToUsersDialog(myXmlreader->usersList->at(i));
684 qDebug() << "ackUsers";
686 //if(myMainw->topResultDialog)
687 // myMainw->topResultDialog->setLabelInfoToUser("");
689 QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
690 myXmlreader->xmlReadUsers(reply);
692 for(int i = 0; i < myXmlreader->usersList->count(); i++)
694 myMainw->usersDialog->appendUserToList(myXmlreader->usersList->at(i));
696 /* QNetworkReply::NetworkError errorcode;
697 errorcode = reply->error();
699 qDebug() << "errorcode:" << errorcode << reply->errorString();
700 //QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting categories",reply->errorString());
701 if(myMainw->topResultDialog)
702 myMainw->topResultDialog->setLabelInfoToUser("You're not logged! Please register or log in.");
705 qDebug() << "errorcode:" << errorcode << reply->errorString();
706 //QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting categories ", "OK");
707 if(myMainw->topResultDialog)
708 myMainw->topResultDialog->setLabelInfoToUser("");
713 * This slot function called when userInfo signal is emitted from xmlreader.
714 *@param usersInfo includes information from certain user.
716 void HttpClient::sendUsersInfo(QStringList* usersInfo)
718 myMainw->usersDialog->setUserInfo(usersInfo);