[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kstars/gsoc2012-spacetime] /: Corrected issue in retrieval query
From: Rishab Arora <ra.rishab () gmail ! com>
Date: 2012-09-01 0:00:50
Message-ID: 20120901000050.84E66A60CB () git ! kde ! org
[Download RAW message or body]
Git commit 5173acde6a616bc5dd5bf7a463554a1f67264fef by Rishab Arora.
Committed on 23/08/2012 at 20:25.
Pushed by rishabarora into branch 'gsoc2012-spacetime'.
Corrected issue in retrieval query
M +4 -3 datahandlers/catalogdb.cpp
M +8 -7 kstars/skycomponents/catalogcomponent.cpp
http://commits.kde.org/kstars/5173acde6a616bc5dd5bf7a463554a1f67264fef
diff --git a/datahandlers/catalogdb.cpp b/datahandlers/catalogdb.cpp
index be7b534..f2f018e 100644
--- a/datahandlers/catalogdb.cpp
+++ b/datahandlers/catalogdb.cpp
@@ -608,9 +608,10 @@ void CatalogDB::GetAllObjects(const QString &catalog,
QSqlQuery get_query(skydb_);
get_query.prepare("SELECT Epoch, Type, RA, Dec, Magnitude, Prefix, "
"IDNumber, LongName, MajorAxis, MinorAxis, "
- "PositionAngle, Flux FROM ObjectDesignation NATURAL "
- "JOIN DSO NATURAL JOIN Catalog WHERE Catalog.id = "
- ":catID");
+ "PositionAngle, Flux FROM ObjectDesignation JOIN DSO "
+ "JOIN Catalog WHERE Catalog.id = :catID AND "
+ "ObjectDesignation.id_Catalog = Catalog.id AND "
+ "ObjectDesignation.UID_DSO = DSO.UID");
get_query.bindValue("catID", QString::number(FindCatalog(catalog)));
kWarning() << get_query.lastQuery();
diff --git a/kstars/skycomponents/catalogcomponent.cpp b/kstars/skycomponents/catalogcomponent.cpp
index cdaa6bc..a8fda7d 100644
--- a/kstars/skycomponents/catalogcomponent.cpp
+++ b/kstars/skycomponents/catalogcomponent.cpp
@@ -115,16 +115,17 @@ void CatalogComponent::draw( SkyPainter *skyp ) {
//Draw Custom Catalog objects
foreach ( SkyObject *obj, m_ObjectList ) {
if ( obj->type()==0 ) {
- StarObject *starobj = (StarObject*)obj;
- //FIXME_SKYPAINTER
+ StarObject *starobj = static_cast<StarObject*>(obj);
+ // FIXME SKYPAINTER
skyp->drawPointSource(starobj, starobj->mag(), starobj->spchar() );
} else {
- //FIXME: this PA calc is totally different from the one that was in
- //DeepSkyComponent which is now in SkyPainter .... O_o
+ // FIXME: this PA calc is totally different from the one that was
+ // in DeepSkyComponent which is now in SkyPainter .... O_o
// --hdevalence
- //PA for Deep-Sky objects is 90 + PA because major axis is horizontal at PA=0
- //double pa = 90. + map->findPA( dso, o.x(), o.y() );
- DeepSkyObject *dso = (DeepSkyObject*)obj;
+ // PA for Deep-Sky objects is 90 + PA because major axis is
+ // horizontal at PA=0
+ // double pa = 90. + map->findPA( dso, o.x(), o.y() );
+ DeepSkyObject *dso = static_cast<DeepSkyObject*>(obj);
skyp->drawDeepSkyObject(dso, true);
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic