summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
b266e59)
Fix the mixing of tabs and 4 space indents in all source files.
Bug-AGL: SPEC-2880
Change-Id: Ib02b5b9d2c65f252ba9b981be6fed23e8c111e66
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
/* memorize the text which gave this result: */
currentSearchedText = lineEdit.text();
/* memorize the text which gave this result: */
currentSearchedText = lineEdit.text();
- if (reply->error() == QNetworkReply::NoError)
- {
- // we only handle this callback if it matches the last search request:
- if (reply != pSearchReply)
- {
- TRACE_INFO("this reply is already too late (or about a different network request)");
- mutex.unlock();
- return;
- }
-
- buflen = reply->read(buf, BIG_BUFFER_SIZE-1);
- buf[buflen] = '\0';
-
- if (buflen == 0)
- {
- mutex.unlock();
- return;
- }
-
-
-
- currentIndex = 0;
- Businesses.clear();
- ParseJsonBusinessList(buf, Businesses);
- DisplayResultList(true);
- FillResultList(Businesses);
+ if (reply->error() == QNetworkReply::NoError)
+ {
+ // we only handle this callback if it matches the last search request:
+ if (reply != pSearchReply)
+ {
+ TRACE_INFO("this reply is already too late (or about a different network request)");
+ mutex.unlock();
+ return;
+ }
+
+ buflen = reply->read(buf, BIG_BUFFER_SIZE-1);
+ buf[buflen] = '\0';
+
+ if (buflen == 0)
+ {
+ mutex.unlock();
+ return;
+ }
+
+
+
+ currentIndex = 0;
+ Businesses.clear();
+ ParseJsonBusinessList(buf, Businesses);
+ DisplayResultList(true);
+ FillResultList(Businesses);
- fprintf(stderr,"POI: reply error network please check to poikey and system time (adjusted?)\n");
+ fprintf(stderr,"POI: reply error network please check to poikey and system time (adjusted?)\n");
/* Then, send a HTTP request to get the token and wait for answer (synchronously): */
/* Then, send a HTTP request to get the token and wait for answer (synchronously): */
- token = AppSecret;
- return 0;
+ token = AppSecret;
+ return 0;
}
int MainApp::StartMonitoringUserInput()
}
int MainApp::StartMonitoringUserInput()
int FillResultList(std::vector<Business> & list, int focusIndex = 0);
void SetWayPoints(uint32_t myRoute);
int FillResultList(std::vector<Business> & list, int focusIndex = 0);
void SetWayPoints(uint32_t myRoute);
- naviapi::Navicore naviapi;
+ naviapi::Navicore naviapi;
QNetworkAccessManager networkManager;
QPushButton searchBtn;
QLineEdit lineEdit;
QNetworkAccessManager networkManager;
QPushButton searchBtn;
QLineEdit lineEdit;
public:
void getAllSessions_reply(const std::map< uint32_t, std::string >& allSessions);
public:
void getAllSessions_reply(const std::map< uint32_t, std::string >& allSessions);
- void getPosition_reply(std::map< int32_t, naviapi::variant > position);
- void getAllRoutes_reply(std::vector< uint32_t > allRoutes);
- void createRoute_reply(uint32_t routeHandle);
+ void getPosition_reply(std::map< int32_t, naviapi::variant > position);
+ void getAllRoutes_reply(std::vector< uint32_t > allRoutes);
+ void createRoute_reply(uint32_t routeHandle);
private slots:
void searchBtnClicked();
private slots:
void searchBtnClicked();
void SyncDrawHandler(json_object *object)
{
void SyncDrawHandler(json_object *object)
{
- qwm->endDraw(graphic_role);
+ qwm->endDraw(graphic_role);
}
void TapShortcutHandler(json_object *object)
}
void TapShortcutHandler(json_object *object)
QString credentialsFile(DEFAULT_CREDENTIALS_FILE);
qwm = new QLibWindowmanager();
hs = new LibHomeScreen();
QString credentialsFile(DEFAULT_CREDENTIALS_FILE);
qwm = new QLibWindowmanager();
hs = new LibHomeScreen();
- graphic_role = QString("poi");
+ graphic_role = QString("poi");
- QString pt = QString(argv[1]);
- int port = pt.toInt();
- QString secret = QString(argv[2]);
- std::string token = secret.toStdString();
+ QString pt = QString(argv[1]);
+ int port = pt.toInt();
+ QString secret = QString(argv[2]);
+ std::string token = secret.toStdString();
if (qwm->init(port, secret) != 0) {
exit(EXIT_FAILURE);
if (qwm->init(port, secret) != 0) {
exit(EXIT_FAILURE);
- qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, SyncDrawHandler);
+ qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, SyncDrawHandler);
- hs->init(port, token.c_str());
+ hs->init(port, token.c_str());
- hs->set_event_handler(LibHomeScreen::Event_TapShortcut, TapShortcutHandler);
+ hs->set_event_handler(LibHomeScreen::Event_TapShortcut, TapShortcutHandler);
//force setting
mainapp->setInfoScreen(true);
//force setting
mainapp->setInfoScreen(true);
if (mainapp->StartMonitoringUserInput() < 0)
return -1;
if (mainapp->StartMonitoringUserInput() < 0)
return -1;
- qwm->activateWindow(graphic_role);
+ qwm->activateWindow(graphic_role);
/* main loop: */
return a.exec();
/* main loop: */
return a.exec();