SimbadSearcher.cpp   SimbadSearcher.cpp 
skipping to change at line 136 skipping to change at line 136
currentStatus = SimbadLookupErrorOcc ured; currentStatus = SimbadLookupErrorOcc ured;
errorString = q_("Error parsing posi tion"); errorString = q_("Error parsing posi tion");
emit statusChanged(); emit statusChanged();
return; return;
} }
Vec3d v; Vec3d v;
StelUtils::spheToRect(ra, dec, v); StelUtils::spheToRect(ra, dec, v);
line = reply->readLine(); line = reply->readLine();
line.chop(1); // Remove a line break at the end line.chop(1); // Remove a line break at the end
line.replace("NAME " ,""); line.replace("NAME " ,"");
line.replace(" ", " "); // Remove double sp resultPositions[line.simplified()]=v; // Rem
aces ove an extra spaces
resultPositions[line]=v;
} }
line = reply->readLine(); line = reply->readLine();
line.chop(1); // Remove a line break at the end line.chop(1); // Remove a line break at the end
} }
} }
currentStatus = SimbadLookupFinished; currentStatus = SimbadLookupFinished;
emit statusChanged(); emit statusChanged();
} }
skipping to change at line 173 skipping to change at line 172
SimbadSearcher::SimbadSearcher(QObject* parent) : QObject(parent) SimbadSearcher::SimbadSearcher(QObject* parent) : QObject(parent)
{ {
networkMgr = new QNetworkAccessManager(this); networkMgr = new QNetworkAccessManager(this);
} }
// Lookup in Simbad for the passed object name. // Lookup in Simbad for the passed object name.
SimbadLookupReply* SimbadSearcher::lookup(const QString& serverUrl, const Q String& objectName, int maxNbResult, int delayMs) SimbadLookupReply* SimbadSearcher::lookup(const QString& serverUrl, const Q String& objectName, int maxNbResult, int delayMs)
{ {
// Create the Simbad query // Create the Simbad query
QString url(serverUrl); QString url(serverUrl);
url += "simbad/sim-script?script=format object \"%COO(d;A D)\\n%IDLI QString query = "format object \"%COO(d;A D)\\n%IDLIST(1)\"\n";
ST(1)\"\n"; query += QString("set epoch J2000\nset limit %1\n query id ").arg(ma
url += QString("set epoch J2000\nset limit %1\n query id ").arg(maxN xNbResult);
bResult); query += objectName;
url += objectName; QByteArray ba = QUrl::toPercentEncoding(query, "", "");
return new SimbadLookupReply(url, networkMgr, delayMs);
url += "simbad/sim-script?script=";
url += ba.constData();
if (networkMgr->networkAccessible()==QNetworkAccessManager::Accessib
le)
return new SimbadLookupReply(url, networkMgr, delayMs);
else
return NULL;
} }
 End of changes. 2 change blocks. 
9 lines changed or deleted 15 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/