[Kstars-devel] KDE/kdeedu/kstars/kstars
Prakash Mohan
prak902000 at gmail.com
Sat Aug 22 07:28:31 CEST 2009
SVN commit 1014246 by prakash:
Avoid passing of a signleton class' instance. Fixing a crash in the Observing list popup menu. There however seems to be a problem with the KStars::Instance() function, needs some investigation it returs a NULL pointer at times.
CCMAIL: kstars-devel at kde.org, akarshsimha at gmail.com, alexey.skladnoy at gmail.com
M +3 -2 obslistpopupmenu.cpp
M +1 -1 obslistpopupmenu.h
M +1 -1 tools/observinglist.cpp
--- trunk/KDE/kdeedu/kstars/kstars/obslistpopupmenu.cpp #1014245:1014246
@@ -26,14 +26,15 @@
#include <config-kstars.h>
-ObsListPopupMenu::ObsListPopupMenu( KStars *_ks )
- : KMenu( _ks ), ks(_ks)
+ObsListPopupMenu::ObsListPopupMenu()
+ : KMenu( 0 )
{}
ObsListPopupMenu::~ObsListPopupMenu() { }
void ObsListPopupMenu::initPopupMenu( bool showAddToSession, bool showCenter, bool showDetails, bool showScope, bool showRemove, bool showLinks, bool sessionView ) {
+ ks = KStars::Instance();
clear();
//Insert item for adding the object to the session view
if( showAddToSession )
--- trunk/KDE/kdeedu/kstars/kstars/obslistpopupmenu.h #1014245:1014246
@@ -38,7 +38,7 @@
Q_OBJECT
public:
/**Default constructor*/
- ObsListPopupMenu( KStars *_ks);
+ ObsListPopupMenu();
/**Destructor (empty)*/
~ObsListPopupMenu();
--- trunk/KDE/kdeedu/kstars/kstars/tools/observinglist.cpp #1014245:1014246
@@ -100,7 +100,7 @@
sessionView = false;
nativeSave = true;
FileName = "";
- pmenu = new ObsListPopupMenu( KStars::Instance() );
+ pmenu = new ObsListPopupMenu();
//Set up the Table Views
m_Model = new QStandardItemModel( 0, 5, this );
m_Session = new QStandardItemModel( 0, 5 );
More information about the Kstars-devel
mailing list