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

Jason Harris kstars at 30doradus.org
Sun Apr 30 19:58:06 CEST 2006


SVN commit 535909 by harris:

Ran valgrind memcheck to look for leaks.  It only found one real issue, 
and a few false alarms (I think):

dmsBox:  didn't assign member variable "deg" in setDegType().

KSMoon: false report of mem leak in MoonLRData and MoonBData lists 
(they are cleared correctly in the dtor)

KStarsData::readINDIHosts(): report that xmlParser not deleted, but it
looks like it is (I don't really understand the C-isms in lilxml.c).

KStarsData: false report of mem leak in geoList (it is cleared 
correctly in the dtor)

CCMAIL: kstars-devel at kde.org



 M  +5 -3      dmsbox.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/widgets/dmsbox.cpp #535908:535909
@@ -33,13 +33,15 @@
 	setMaxLength(14);
 	setMaximumWidth(160);
 	setDegType( dg );
-        psave = palette();
+	psave = palette();
 
 	connect( this, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
 }
 
 void dmsBox::setEmptyText() {
-	QPalette p = palette();
+	//Set the text color to the average between 
+	//QColorGroup::Text and QColorGroup::Base
+	QPalette p = psave;
 	QColor txc = p.color( QPalette::Active, QColorGroup::Text );
 	QColor bgc = p.color( QPalette::Active, QColorGroup::Base );
 	int r( ( txc.red()   + bgc.red()   )/2 );
@@ -90,7 +92,7 @@
 }
 
 void dmsBox::setDegType( bool t ) {
-
+	deg = t;
 	QString sDeg = ( t ? i18n( "degrees" ) : i18n( "hours" ) );
 	QString sMin = ( t ? i18n( "arcminutes" ) : i18n( "minutes" ) );
 	QString sSec = ( t ? i18n( "arcseconds" ) : i18n( "seconds" ) );


More information about the Kstars-devel mailing list