summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-25 12:36:47 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-25 12:36:47 (GMT)
commit98e1b54d748440b139c47725de0c77b1bafb0588 (patch)
treeb876278728699ead14978064514540d677f92403
parentac6e68f39b1b0eaf31c31f05f6c78a8793b0b0ca (diff)
Remove DSSUrl and SDSSUrl; use KSDssDownloader::getDSSURL() instead.
-rw-r--r--kstars/tools/observinglist.cpp9
-rw-r--r--kstars/tools/observinglist.h2
2 files changed, 4 insertions, 7 deletions
diff --git a/kstars/tools/observinglist.cpp b/kstars/tools/observinglist.cpp
index f4b15ac..522a5f3 100644
--- a/kstars/tools/observinglist.cpp
+++ b/kstars/tools/observinglist.cpp
@@ -1182,10 +1182,6 @@ void ObservingList::downloadReady( bool success ) {
}
void ObservingList::setCurrentImage( const SkyObject *o ) {
- // TODO: Remove code duplication -- we have the same stuff
- // implemented in SkyMap::slotDSS in skymap.cpp; must try to
- // de-duplicate as much as possible.
-
CurrentImage = "Image_" + o->name().remove(' ');
ThumbImage = "thumb-" + o->name().toLower().remove(' ') + ".png";
if( o->name() == "star" ) {
@@ -1196,7 +1192,7 @@ void ObservingList::setCurrentImage( const SkyObject *o ) {
CurrentImage = CurrentImage.remove('+').remove('-') + decsgn;
}
CurrentImagePath = KSPaths::locate( QStandardPaths::GenericDataLocation , CurrentImage );
- DSSUrl = KSDssDownloader::getDSSURL( o );
+ // DSSUrl = KSDssDownloader::getDSSURL( o );
// QString UrlPrefix("http://casjobs.sdss.org/ImgCutoutDR6/getjpeg.aspx?"); // FIXME: Upgrade to use SDSS Data Release 9 / 10. DR6 is well outdated.
// QString UrlSuffix("&scale=1.0&width=600&height=600&opt=GST&query=SR(10,20)");
@@ -1220,7 +1216,8 @@ void ObservingList::slotSaveAllImages() {
continue; // FIXME: Why would we have null objects? But appears that we do.
setCurrentImage( o );
QString img( CurrentImagePath );
- QUrl url( ( Options::obsListPreferDSS() ) ? DSSUrl : SDSSUrl );
+ // QUrl url( ( Options::obsListPreferDSS() ) ? DSSUrl : SDSSUrl ); // FIXME: We have removed SDSS support!
+ QUrl url( KSDssDownloader::getDSSURL( o ) );
if( ! o->isSolarSystem() )//TODO find a way for adding support for solar system images
saveImage( url, img, o );
}
diff --git a/kstars/tools/observinglist.h b/kstars/tools/observinglist.h
index 82d7a57..7d8ac2b 100644
--- a/kstars/tools/observinglist.h
+++ b/kstars/tools/observinglist.h
@@ -384,7 +384,7 @@ private:
QList<SkyObject*> m_WishList, m_SessionList;
SkyObject *LogObject, *m_CurrentObject;
bool isModified, bIsLarge, sessionView, dss, singleSelection, showScope, noSelection;
- QString m_listFileName, CurrentImage, DSSUrl, SDSSUrl, ThumbImage, CurrentImagePath;
+ QString m_listFileName, CurrentImage, ThumbImage, CurrentImagePath;
KStarsDateTime dt;
GeoLocation *geo;
QStandardItemModel *m_WishListModel, *m_SessionModel;