Index: kstars/auxiliary/ksuserdb.cpp =================================================================== --- kstars/auxiliary/ksuserdb.cpp +++ kstars/auxiliary/ksuserdb.cpp @@ -1654,8 +1654,9 @@ QString model, vendor, type, color, lockedFilter; int offset = 0; double exposure = 1.0; - bool useAutoFocus; - int absFocusPos=0; + bool useAutoFocus = false; + int absFocusPos = 0; + while (!reader_->atEnd()) { reader_->readNext(); Index: kstars/dialogs/locationdialog.cpp =================================================================== --- kstars/dialogs/locationdialog.cpp +++ kstars/dialogs/locationdialog.cpp @@ -648,7 +648,7 @@ { ld->errorLabel->setText(i18n("Cannot add new location -- missing UTC Offset")); } - else if (SelectedCity->isReadOnly()) + else if (SelectedCity && SelectedCity->isReadOnly()) { ld->errorLabel->setText(i18n("City is Read Only. Change name to add new city.")); } Index: kstars/ekos/scheduler/schedulerjob.cpp =================================================================== --- kstars/ekos/scheduler/schedulerjob.cpp +++ kstars/ekos/scheduler/schedulerjob.cpp @@ -393,7 +393,7 @@ } } - if (startupCell) + if (startupCell && startupCell->tableWidget()) { /* Display a startup time if job is running, scheduled to run or about to be re-scheduled */ if (JOB_SCHEDULED == state || JOB_BUSY == state || JOB_ABORTED == state) switch (fileStartupCondition) @@ -433,7 +433,7 @@ startupCell->tableWidget()->resizeColumnToContents(startupCell->column()); } - if (completionCell) + if (completionCell && completionCell->tableWidget()) { /* Display a completion time if job is running, scheduled to run or about to be re-scheduled */ if (JOB_SCHEDULED == state || JOB_BUSY == state || JOB_ABORTED == state) switch (completionCondition) @@ -465,7 +465,7 @@ completionCell->tableWidget()->resizeColumnToContents(completionCell->column()); } - if (estimatedTimeCell) + if (estimatedTimeCell && estimatedTimeCell->tableWidget()) { if (0 < estimatedTime) /* Seconds to ms - this doesn't follow dateTimeDisplayFormat, which renders YMD too */ @@ -480,13 +480,13 @@ estimatedTimeCell->tableWidget()->resizeColumnToContents(estimatedTimeCell->column()); } - if (captureCountCell) + if (captureCountCell && captureCountCell->tableWidget()) { captureCountCell->setText(QString("%1/%2").arg(completedCount).arg(sequenceCount)); captureCountCell->tableWidget()->resizeColumnToContents(captureCountCell->column()); } - if (scoreCell) + if (scoreCell && scoreCell->tableWidget()) { if (0 <= score) scoreCell->setText(QString("%1").arg(score)); Index: kstars/fitsviewer/fitsviewer.cpp =================================================================== --- kstars/fitsviewer/fitsviewer.cpp +++ kstars/fitsviewer/fitsviewer.cpp @@ -129,7 +129,7 @@ saveFileAction = KStandardAction::save(this, SLOT(saveFile()), actionCollection()); saveFileAction->setIcon(QIcon::fromTheme("document-save")); - action = saveFileAsAction = KStandardAction::saveAs(this, SLOT(saveFileAs()), actionCollection()); + saveFileAsAction = KStandardAction::saveAs(this, SLOT(saveFileAs()), actionCollection()); saveFileAsAction->setIcon( QIcon::fromTheme("document-save_as")); Index: kstars/hips/healpix.cpp =================================================================== --- kstars/hips/healpix.cpp +++ kstars/hips/healpix.cpp @@ -387,7 +387,7 @@ int HEALPix::getPix(int level, double ra, double dec) { int nside = 1 << level; - double polar[2]; + double polar[2] = { 0, 0 }; if (HIPSManager::Instance()->getCurrentFrame() == HIPSManager::HIPS_EQUATORIAL_FRAME) { Index: kstars/hips/hipsmanager.cpp =================================================================== --- kstars/hips/hipsmanager.cpp +++ kstars/hips/hipsmanager.cpp @@ -349,6 +349,8 @@ } else { + delete item->image; + delete item; qCWarning(KSTARS) << "no image" << data; } } Index: kstars/kstarsinit.cpp =================================================================== --- kstars/kstarsinit.cpp +++ kstars/kstarsinit.cpp @@ -455,12 +455,12 @@ << i18n("Artificial Horizon..."); // ==== observation menu - execute ================ - ka = actionCollection()->addAction("execute", this, SLOT(slotExecute())) - << i18n("Execute the session Plan...") << QKeySequence(Qt::CTRL + Qt::Key_2); + actionCollection()->addAction("execute", this, SLOT(slotExecute())) + << i18n("Execute the session Plan...") << QKeySequence(Qt::CTRL + Qt::Key_2); // ==== observation menu - polaris hour angle ================ - ka = actionCollection()->addAction("polaris_hour_angle", this, SLOT(slotPolarisHourAngle())) - << i18n("Polaris Hour Angle..."); + actionCollection()->addAction("polaris_hour_angle", this, SLOT(slotPolarisHourAngle())) + << i18n("Polaris Hour Angle..."); // ==== devices Menu ================ #ifdef HAVE_INDI @@ -501,7 +501,7 @@ m_TimeStepBox->tsbox()->setToolTip(TSBToolTip); QWidgetAction *wa = new QWidgetAction(this); wa->setDefaultWidget(m_TimeStepBox); - ka = actionCollection()->addAction("timestep_control", wa) << i18n("Time step control"); + actionCollection()->addAction("timestep_control", wa) << i18n("Time step control"); // ==== viewToolBar actions ================ actionCollection()->add("show_stars", this, SLOT(slotViewToolBar())) @@ -628,10 +628,10 @@ ka->setShortcutContext(Qt::ApplicationShortcut); telescopeGroup->addAction(ka); - ka = actionCollection()->addAction("telescope_slew_mouse", this, SLOT(slotINDITelescopeSlewMousePointer())) + actionCollection()->addAction("telescope_slew_mouse", this, SLOT(slotINDITelescopeSlewMousePointer())) << i18n("Slew the telescope to the mouse pointer position"); - ka = actionCollection()->addAction("telescope_sync_mouse", this, SLOT(slotINDITelescopeSyncMousePointer())) + actionCollection()->addAction("telescope_sync_mouse", this, SLOT(slotINDITelescopeSyncMousePointer())) << i18n("Sync the telescope to the mouse pointer position"); // Disable all telescope actions by default Index: kstars/skycomponents/skymapcomposite.cpp =================================================================== --- kstars/skycomponents/skymapcomposite.cpp +++ kstars/skycomponents/skymapcomposite.cpp @@ -441,7 +441,6 @@ else if (oBest) rBest *= 1.5; - rTry = maxrad; oTry = m_Satellites->objectNearest(p, rTry); if (rTry < rBest) { Index: kstars/tools/modcalcsidtime.cpp =================================================================== --- kstars/tools/modcalcsidtime.cpp +++ kstars/tools/modcalcsidtime.cpp @@ -345,11 +345,11 @@ ksdt = geoBatch->UTtoLT(ksdt); outTime = ksdt.time(); } - } - //Write to output file - ostream << QLocale().toString(dt, QLocale::LongFormat) << " \"" << geoBatch->fullName() << "\" " - << QLocale().toString(inTime) << " " << QLocale().toString(outTime) << endl; + //Write to output file + ostream << QLocale().toString(dt, QLocale::LongFormat) << " \"" << geoBatch->fullName() << "\" " + << QLocale().toString(inTime) << " " << QLocale().toString(outTime) << endl; + } } fOut.close();