[Kstars-devel] KDE/kdeedu/kstars/kstars

Akarsh Simha akarshsimha at gmail.com
Sat May 9 01:07:14 CEST 2009


SVN commit 965453 by asimha:

Removing unnecessary KStars* and KStarsData* pointers passed to SkyMap
constructor and SkyMap::Create()

CCMAIL: kstars-devel at kde.org



 M  +1 -1      kstarsinit.cpp  
 M  +1 -1      main.cpp  
 M  +5 -5      skymap.cpp  
 M  +2 -2      skymap.h  


--- trunk/KDE/kdeedu/kstars/kstars/kstarsinit.cpp #965452:965453
@@ -740,7 +740,7 @@
 
 void KStars::buildGUI() {
     //create the skymap
-    skymap = SkyMap::Create( data(), this );
+    skymap = SkyMap::Create();
     setCentralWidget( skymap );
 
     //Initialize menus, toolbars, and statusbars
--- trunk/KDE/kdeedu/kstars/kstars/main.cpp #965452:965453
@@ -134,7 +134,7 @@
         KSNumbers num( dat->ut().djd() );
         //		dat->initGuides(&num);
 
-        SkyMap *map = SkyMap::Create( dat );
+        SkyMap *map = SkyMap::Create();
         map->resize( w, h );
         QPixmap sky( w, h );
 
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #965452:965453
@@ -66,10 +66,10 @@
 
 SkyMap* SkyMap::pinstance = 0;
 
-SkyMap* SkyMap::Create( KStarsData *_data, KStars *_ks )
+SkyMap* SkyMap::Create()
 {
     if ( pinstance ) delete pinstance;
-    pinstance = new SkyMap( _data, _ks );
+    pinstance = new SkyMap();
     return pinstance;
 }
 
@@ -78,9 +78,9 @@
     return pinstance;
 }
 
-SkyMap::SkyMap( KStarsData *_data, KStars *_ks )
-        : QWidget(_ks), computeSkymap(true), angularDistanceMode(false),
-        ks(_ks), data(_data), pmenu(0), sky(0), sky2(0), IBoxes(0),
+SkyMap::SkyMap()
+    : QWidget( KStars::Instance() ), computeSkymap(true), angularDistanceMode(false),
+      ks( KStars::Instance() ), data( KStarsData::Instance() ), pmenu(0), sky(0), sky2(0), IBoxes(0),
         ClickedObject(0), FocusObject(0), TransientObject(0), sp(0)
 {
     m_Scale = 1.0;
--- trunk/KDE/kdeedu/kstars/kstars/skymap.h #965452:965453
@@ -72,13 +72,13 @@
     *Constructor.  Read stored settings from KConfig object (focus position,
     *zoom factor, sky color, etc.).  Run initPopupMenus().
     */
-    explicit SkyMap( KStarsData *_data, KStars *_ks = 0 );
+    explicit SkyMap();
 
     SkyMap( SkyMap& skyMap );
 
 public:
 
-    static SkyMap* Create( KStarsData *_data, KStars *_ks = 0 );
+    static SkyMap* Create();
 
     static SkyMap* Instance();
 


More information about the Kstars-devel mailing list