Commit 41ede018 authored by Jason Harris's avatar Jason Harris
Browse files

more direct method for checking for existence of kstarsrc file. May fix

bug #44869, but since no developers can reproduce the bug, we don't know
for sure.

svn path=/branches/KDE_3_1_BRANCH/kdeedu/kstars/; revision=212181
parent 5cfe5532
...@@ -22,9 +22,15 @@ ...@@ -22,9 +22,15 @@
void KStars::loadOptions() void KStars::loadOptions()
{ {
KConfig *conf = kapp->config(); KConfig *conf = kapp->config();
//Check if kstarsrc exists. If not, we are using default options (need to know for setting initial focus point) //Check if kstarsrc exists. If not, we are using default options
if ( conf->hasGroup( "Location" ) ) useDefaultOptions = false; //(need to know for setting initial focus point).
else useDefaultOptions = true; //We used to use hasGroup() here, but I have reason to suspect that this
//this causes a crash on some systems (see bug #44869). At Kevin
//Krammer's suggestion, using findResource("kstarsrc") instead.
//if ( conf->hasGroup( "Location" ) ) useDefaultOptions = false;
//else useDefaultOptions = true;
if ( data()->stdDirs->findResource( "config", "kstarsrc" ).isNull() ) useDefaultOptions = true;
else useDefaultOptions = false;
// Get initial Location from config() // Get initial Location from config()
conf->setGroup( "Location" ); conf->setGroup( "Location" );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment