Commit 90d1f7be authored by Eric Dejouhanet's avatar Eric Dejouhanet

Debugging test initialization.

parent bb06c6e6
......@@ -133,10 +133,10 @@ KStarsData::~KStarsData()
bool KStarsData::initialize()
{
//Initialize CatalogDB//
qCInfo(KSTARS) << "Initialize CatalogDB";
catalogdb()->Initialize();
//Load Time Zone Rules//
qCInfo(KSTARS) << "Load Time Zone Rules";
emit progressText(i18n("Reading time zone rules"));
if (!readTimeZoneRulebook())
{
......@@ -144,7 +144,7 @@ bool KStarsData::initialize()
return false;
}
qCInfo(KSTARS) << "Patch city database.";
emit progressText(i18n("Upgrade existing user city db to support geographic elevation."));
......@@ -186,7 +186,7 @@ bool KStarsData::initialize()
}
//Load Cities//
qCInfo(KSTARS) << "Load Cities";
emit progressText(i18n("Loading city data"));
if (!readCityData())
{
......@@ -194,14 +194,15 @@ bool KStarsData::initialize()
return false;
}
//Initialize User Database//
qCInfo(KSTARS) << "Initialize User Database";
emit progressText(i18n("Loading User Information"));
m_ksuserdb.Initialize();
//Initialize SkyMapComposite//
qCInfo(KSTARS) << "Initialize SkyMapComposite";
emit progressText(i18n("Loading sky objects"));
m_SkyComposite.reset(new SkyMapComposite());
//Load Image URLs//
qCInfo(KSTARS) << "Load Image URLs";
//#ifndef Q_OS_ANDROID
//On Android these 2 calls produce segfault. WARNING
emit progressText(i18n("Loading Image URLs"));
......@@ -210,7 +211,7 @@ bool KStarsData::initialize()
return false;
//QtConcurrent::run(this, &KStarsData::readURLData, QString("image_url.dat"), 0, false);
//Load Information URLs//
qCInfo(KSTARS) << "Load Information URLs (asynchronously)";
//emit progressText(i18n("Loading Information URLs"));
if( !readURLData( "info_url.dat", 1 ) && !nonFatalErrorMessage( "info_url.dat" ) )
return false;
......@@ -220,15 +221,19 @@ bool KStarsData::initialize()
//emit progressText( i18n("Loading Variable Stars" ) );
#ifndef KSTARS_LITE
//Initialize Observing List
qCInfo(KSTARS) << "Initialize Observing List";
m_ObservingList = new ObservingList();
#endif
qCInfo(KSTARS) << "Read user log";
readUserLog();
#ifndef KSTARS_LITE
qCInfo(KSTARS) << "Read tree data";
readADVTreeData();
#endif
qCInfo(KSTARS) << "Initialization done";
return true;
}
......
......@@ -775,11 +775,11 @@ void KStars::initStatusBar()
void KStars::datainitFinished()
{
//Time-related connections
qCInfo(KSTARS) << "Time-related connections";
connect(data()->clock(), SIGNAL(timeAdvanced()), this, SLOT(updateTime()));
connect(data()->clock(), SIGNAL(timeChanged()), this, SLOT(updateTime()));
//Add GUI elements to main window
qCInfo(KSTARS) << "Add GUI elements to main window";
buildGUI();
connect(data()->clock(), SIGNAL(scaleChanged(float)), map(), SLOT(slotClockSlewing()));
......@@ -792,7 +792,7 @@ void KStars::datainitFinished()
//m_equipmentWriter = new EquipmentWriter();
//m_observerAdd = new ObserverAdd;
//Do not start the clock if "--paused" specified on the cmd line
qCInfo(KSTARS) << "Do not start the clock if --paused specified on the cmd line";
if (StartClockRunning)
{
// The initial time is set when KStars is first executed
......@@ -804,38 +804,38 @@ void KStars::datainitFinished()
data()->clock()->start();
}
// Connect cache function for Find dialog
qCInfo(KSTARS) << "Connect cache function for Find dialog";
connect(data(), SIGNAL(clearCache()), this, SLOT(clearCachedFindDialog()));
//Propagate config settings
qCInfo(KSTARS) << "Propagate config settings";
applyConfig(false);
//show the window. must be before kswizard and messageboxes
qCInfo(KSTARS) << "show the window. must be before kswizard and messageboxes";
show();
//Initialize focus
qCInfo(KSTARS) << "Initialize focus";
initFocus();
data()->setFullTimeUpdate();
updateTime();
// Initial State
qCInfo(KSTARS) << "Initial State";
qCDebug(KSTARS) << "Date/Time is:" << data()->clock()->utc().toString();
qCDebug(KSTARS) << "Location:" << data()->geo()->fullName();
qCDebug(KSTARS) << "TZ0:" << data()->geo()->TZ0() << "TZ:" << data()->geo()->TZ();
KSTheme::Manager::instance()->setCurrentTheme(Options::currentTheme());
//If this is the first startup, show the wizard
qCInfo(KSTARS) << "If this is the first startup, show the wizard";
if (Options::runStartupWizard())
{
slotWizard();
}
//Show TotD
qCInfo(KSTARS) << "Show TotD";
KTipDialog::showTip(this, "kstars/tips");
// Update comets and asteroids if enabled.
qCInfo(KSTARS) << "Update comets and asteroids if enabled";
if (Options::orbitalElementsAutoUpdate())
{
slotUpdateComets(true);
......@@ -843,8 +843,11 @@ void KStars::datainitFinished()
}
#ifdef HAVE_INDI
qCInfo(KSTARS) << "Initialize Ekos";
Ekos::Manager::Instance()->initialize();
#endif
qCInfo(KSTARS) << "Final initialization done";
}
void KStars::initFocus()
......
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