Skip to content
Permalink
Browse files

Fix Krazy findings

  • Loading branch information...
kecsap committed Jul 25, 2017
1 parent 997b46b commit d5435c7fdff6f209ac4ed2df544726de140dce1f
Showing with 1,732 additions and 2,233 deletions.
  1. +2 −2 kstars/auxiliary/colorscheme.cpp
  2. +2 −2 kstars/auxiliary/imageviewer.h
  3. +4 −5 kstars/auxiliary/ksutils.cpp
  4. +13 −10 kstars/ekos/align/align.cpp
  5. +1 −1 kstars/ekos/align/alignview.h
  6. +4 −3 kstars/ekos/align/offlineastrometryparser.cpp
  7. +14 −10 kstars/ekos/align/opsastrometryindexfiles.cpp
  8. +15 −13 kstars/ekos/scheduler/scheduler.cpp
  9. +1 −1 kstars/ekos/scheduler/scheduler.h
  10. +1 −2 kstars/fitsviewer/fitsdata.cpp
  11. +1 −1 kstars/fitsviewer/fitslabel.cpp
  12. +1 −1 kstars/fitsviewer/fitsview.h
  13. +5 −18 kstars/indi/clientmanager.cpp
  14. +10 −15 kstars/indi/clientmanager.h
  15. +27 −25 kstars/indi/clientmanagerlite.cpp
  16. +28 −23 kstars/indi/clientmanagerlite.h
  17. +1 −4 kstars/indi/devicemanager.h
  18. +5 −14 kstars/indi/driverinfo.cpp
  19. +39 −32 kstars/indi/driverinfo.h
  20. +12 −20 kstars/indi/drivermanager.cpp
  21. +13 −20 kstars/indi/drivermanager.h
  22. +2 −2 kstars/indi/guimanager.cpp
  23. +17 −21 kstars/indi/indicap.h
  24. +2 −2 kstars/indi/indiccd.cpp
  25. +36 −37 kstars/indi/indidbus.cpp
  26. +1 −1 kstars/indi/indidbus.h
  27. +2 −6 kstars/indi/indidome.h
  28. +23 −24 kstars/indi/indidriver.cpp
  29. +31 −33 kstars/indi/indidriver.h
  30. +1 −1 kstars/indi/indielement.cpp
  31. +2 −5 kstars/indi/indifilter.h
  32. +2 −5 kstars/indi/indifocuser.h
  33. +4 −8 kstars/indi/indilightbox.h
  34. +6 −5 kstars/indi/indilistener.cpp
  35. +11 −8 kstars/indi/indilistener.h
  36. +0 −209 kstars/indi/indimenu.cpp
  37. +0 −78 kstars/indi/indimenu.h
  38. +35 −62 kstars/indi/indiproperty.cpp
  39. +47 −37 kstars/indi/indiproperty.h
  40. +6 −13 kstars/indi/indistd.cpp
  41. +14 −14 kstars/indi/indistd.h
  42. +4 −4 kstars/indi/inditelescope.cpp
  43. +1 −1 kstars/indi/inditelescope.h
  44. +18 −18 kstars/indi/inditelescopelite.h
  45. +2 −6 kstars/indi/indiweather.h
  46. +3 −1 kstars/indi/indiwebmanager.cpp
  47. +4 −2 kstars/indi/servermanager.cpp
  48. +9 −12 kstars/indi/videowg.cpp
  49. +11 −14 kstars/indi/videowg.h
  50. +1 −1 kstars/ksalmanac.cpp
  51. +6 −6 kstars/kstarsdata.cpp
  52. +1 −1 kstars/kstarsdbus.cpp
  53. +1 −1 kstars/kstarslite/deviceorientation.cpp
  54. +7 −8 kstars/kstarslite/deviceorientation.h
  55. +17 −19 kstars/kstarslite/dialogs/detaildialoglite.cpp
  56. +48 −66 kstars/kstarslite/dialogs/detaildialoglite.h
  57. +14 −19 kstars/kstarslite/dialogs/finddialoglite.cpp
  58. +39 −40 kstars/kstarslite/dialogs/finddialoglite.h
  59. +51 −34 kstars/kstarslite/dialogs/locationdialoglite.cpp
  60. +34 −31 kstars/kstarslite/dialogs/locationdialoglite.h
  61. +1 −1 kstars/kstarslite/res/CMakeLists.txt
  62. +12 −17 kstars/kstarslite/skyitems/asteroidsitem.h
  63. +12 −15 kstars/kstarslite/skyitems/cometsitem.h
  64. +1 −1 kstars/kstarslite/skyitems/constellationartitem.h
  65. +4 −4 kstars/kstarslite/skyitems/deepskyitem.h
  66. +12 −19 kstars/kstarslite/skyitems/fovitem.h
  67. +3 −2 kstars/kstarslite/skyitems/lines/linesitem.h
  68. +26 −29 kstars/kstarslite/skyitems/planetsitem.h
  69. +12 −15 kstars/kstarslite/skyitems/satellitesitem.h
  70. +18 −24 kstars/kstarslite/skyitems/skynodes/constellationartnode.h
  71. +90 −90 kstars/kstarslite/skyitems/skynodes/dsosymbolnode.h
  72. +1 −1 kstars/kstarslite/skyitems/skynodes/horizonnode.h
  73. +5 −8 kstars/kstarslite/skyitems/skynodes/nodes/ellipsenode.cpp
  74. +22 −25 kstars/kstarslite/skyitems/skynodes/nodes/ellipsenode.h
  75. +12 −7 kstars/kstarslite/skyitems/skynodes/nodes/pointnode.cpp
  76. +26 −30 kstars/kstarslite/skyitems/skynodes/nodes/pointnode.h
  77. +27 −28 kstars/kstarslite/skyitems/skynodes/nodes/rectnode.h
  78. +13 −3 kstars/kstarslite/skyitems/skynodes/skynode.cpp
  79. +13 −22 kstars/kstarslite/skyitems/skynodes/skynode.h
  80. +3 −1 kstars/kstarslite/skyitems/skynodes/skypolygonnode.h
  81. +11 −13 kstars/kstarslite/skyitems/skynodes/trixelnode.h
  82. +12 −17 kstars/kstarslite/skyitems/supernovaeitem.h
  83. +7 −5 kstars/kstarslite/skyitems/telescopesymbolsitem.cpp
  84. +21 −26 kstars/kstarslite/skyitems/telescopesymbolsitem.h
  85. +2 −2 kstars/main.cpp
  86. +8 −6 kstars/oal/execute.cpp
  87. +1 −1 kstars/oal/execute.h
  88. +15 −14 kstars/printing/legend.cpp
  89. +17 −21 kstars/printing/legend.h
  90. +2 −2 kstars/skycomponents/deepskycomponent.cpp
  91. +0 −8 kstars/skycomponents/starblocklist.cpp
  92. +7 −13 kstars/skycomponents/starblocklist.h
  93. +3 −0 kstars/skymap.cpp
  94. +6 −22 kstars/skyobjects/deepskyobject.cpp
  95. +23 −27 kstars/skyobjects/deepskyobject.h
  96. +1 −1 kstars/skyobjects/satellitegroup.cpp
  97. +4 −2 kstars/skyobjects/starobject.cpp
  98. +1 −1 kstars/skyqpainter.h
  99. +4 −3 kstars/time/kstarsdatetime.cpp
  100. +2 −2 kstars/time/kstarsdatetime.h
  101. +2 −2 kstars/time/timezonerule.cpp
  102. +5 −5 kstars/tools/altvstime.cpp
  103. +1 −1 kstars/tools/altvstime.h
  104. +7 −14 kstars/tools/astrocalc.cpp
  105. +50 −46 kstars/tools/astrocalc.h
  106. +11 −11 kstars/tools/calendarwidget.cpp
  107. +2 −2 kstars/tools/conjunctions.cpp
  108. +5 −3 kstars/tools/eqplotwidget.cpp
  109. +3 −6 kstars/tools/eqplotwidget.h
  110. +15 −28 kstars/tools/eyepiecefield.cpp
  111. +29 −31 kstars/tools/eyepiecefield.h
  112. +10 −21 kstars/tools/jmoontool.cpp
  113. +15 −14 kstars/tools/jmoontool.h
  114. +4 −6 kstars/tools/modcalcaltaz.h
  115. +9 −15 kstars/tools/modcalcapcoord.cpp
  116. +10 −13 kstars/tools/modcalcapcoord.h
  117. +12 −12 kstars/tools/modcalcdaylength.cpp
  118. +1 −1 kstars/tools/modcalceclipticcoords.cpp
  119. +5 −6 kstars/tools/modcalceclipticcoords.h
  120. +5 −9 kstars/tools/modcalcgalcoord.cpp
  121. +10 −11 kstars/tools/modcalcgalcoord.h
  122. +8 −13 kstars/tools/modcalcgeodcoord.cpp
  123. +12 −14 kstars/tools/modcalcgeodcoord.h
  124. +1 −1 kstars/tools/modcalcplanets.cpp
  125. +5 −13 kstars/tools/modcalcsidtime.cpp
  126. +20 −18 kstars/tools/modcalcsidtime.h
  127. +1 −1 kstars/tools/modcalcvizequinox.h
  128. +2 −1 kstars/tools/modcalcvlsr.cpp
  129. +7 −10 kstars/tools/moonphasetool.cpp
  130. +20 −22 kstars/tools/moonphasetool.h
  131. +2 −2 kstars/tools/observinglist.cpp
  132. +1 −1 kstars/tools/observinglist.h
  133. +5 −4 kstars/tools/obslistwizard.h
  134. +12 −24 kstars/tools/planetviewer.cpp
  135. +21 −27 kstars/tools/planetviewer.h
  136. +7 −9 kstars/tools/pvplotwidget.cpp
  137. +8 −12 kstars/tools/pvplotwidget.h
  138. +33 −20 kstars/tools/scriptargwidgets.h
  139. +2 −2 kstars/tools/scriptbuilder.cpp
  140. +1 −1 kstars/tools/sessionsortfilterproxymodel.h
  141. +12 −15 kstars/tools/skycalendar.cpp
  142. +7 −9 kstars/tools/skycalendar.h
  143. +18 −5 kstars/tools/starhopperdialog.cpp
  144. +28 −25 kstars/tools/starhopperdialog.h
  145. +1 −2 kstars/tools/whatsinteresting/modelmanager.h
  146. +2 −2 kstars/tools/whatsinteresting/skyobjdescription.cpp
  147. +8 −6 kstars/tools/whatsinteresting/skyobjitem.cpp
  148. +3 −4 kstars/tools/whatsinteresting/skyobjitem.h
  149. +1 −0 kstars/tools/whatsinteresting/wilpsettings.cpp
  150. +8 −12 kstars/tools/whatsinteresting/wilpsettings.h
  151. +25 −19 kstars/tools/whatsinteresting/wiview.cpp
  152. +1 −15 kstars/tools/wutdialog.cpp
  153. +56 −60 kstars/tools/wutdialog.h
  154. +1 −1 tools/run_cppcheck.sh
  155. +10 −1 tools/run_krazy.sh
@@ -178,7 +178,7 @@ bool ColorScheme::load(const QString &name)

//first line is the star-color mode and star color intensity and dark palette
QString line = stream.readLine();
QStringList modes = line.split(":");
QStringList modes = line.split(':');

// Star Color Mode
if (modes.count() > 0)
@@ -300,7 +300,7 @@ bool ColorScheme::save(const QString &name)
else
{
bool found = false;
QString schemeLine = name + ":" + filename;
QString schemeLine = name + ':' + filename;

// Check if the scheme line is in the colors.dat file
// If not, then we add it
@@ -69,10 +69,10 @@ class ImageViewer : public QDialog

public:
/** Creates empty viewer. */
ImageViewer(const QString &caption, QWidget *parent = nullptr);
explicit ImageViewer(const QString &caption, QWidget *parent = nullptr);

/** Create image viewer from URL with caption */
ImageViewer(const QUrl &imageURL, const QString &capText = QString(), QWidget *parent = nullptr);
explicit ImageViewer(const QUrl &imageURL, const QString &capText = QString(), QWidget *parent = nullptr);

/** Destructor. If there is a partially downloaded image file, delete it.*/
~ImageViewer();
@@ -16,21 +16,20 @@
***************************************************************************/

#include "ksutils.h"
#include <QPointer>


#include "deepskyobject.h"
#include "Options.h"
#ifndef KSTARS_LITE
#include "kswizard.h"
#endif
#include "Options.h"
#include "starobject.h"
#include "auxiliary/kspaths.h"

#ifndef KSTARS_LITE
#include <KMessageBox>
#endif

#include <QPointer>
#include <QProcessEnvironment>

namespace KSUtils
@@ -1128,14 +1127,14 @@ void configureDefaultAstrometry()
QString dataDir = line.trimmed().mid(9).trimmed();
if (dataDir != astrometryPath) //Update to the correct path.
{
contents += "add_path " + astrometryPath + "\n";
contents += "add_path " + astrometryPath + '\n';
fileNeedsUpdating = true;
}
}
}
else
{
contents += line + "\n";
contents += line + '\n';
}
}
confFile.close();
@@ -82,6 +82,7 @@ Align::Align()
alignView->setBaseSize(alignWidget->size());
alignView->createFloatingToolBar();
QVBoxLayout *vlayout = new QVBoxLayout();

vlayout->addWidget(alignView);
alignWidget->setLayout(vlayout);

@@ -963,8 +964,8 @@ void Align::generateAlignStarList()
boxNames.removeDuplicates();
greekBoxNames.removeDuplicates();
qSort(greekBoxNames.begin(), greekBoxNames.end(), [](const QString &a, const QString &b) {
QStringList aParts = a.split(" ");
QStringList bParts = b.split(" ");
QStringList aParts = a.split(' ');
QStringList bParts = b.split(' ');
if (aParts.length() < 2 || bParts.length() < 2)
return a < b; //This should not happen, they should all have 2 words in the string.
if (aParts[1] == bParts[1])
@@ -1038,7 +1039,7 @@ void Align::updatePreviewAlignPoints()
QString objString = objNameCell->text();

SkyPoint flagPoint(raDMS, decDMS);
flags->add(flagPoint, "J2000", "Default", "Align " + QString::number(i + 1) + " " + objString, "white");
flags->add(flagPoint, "J2000", "Default", "Align " + QString::number(i + 1) + ' ' + objString, "white");
}
}
}
@@ -1393,9 +1394,9 @@ void Align::exportSolutionPoints()
}
dms raDMS = dms::fromString(raCell->text(), false);
dms deDMS = dms::fromString(deCell->text(), true);
outstream << raDMS.toHMSString() << "," << deDMS.toDMSString() << "," << raDMS.Degrees() << ","
<< deDMS.Degrees() << "," << objNameCell->text() << "," << raErrorCell->text().remove("\"") << ","
<< deErrorCell->text().remove("\"") << endl;
outstream << raDMS.toHMSString() << ',' << deDMS.toDMSString() << ',' << raDMS.Degrees() << ','
<< deDMS.Degrees() << ',' << objNameCell->text() << ',' << raErrorCell->text().remove('\"') << ','
<< deErrorCell->text().remove('\"') << endl;
}
appendLogText(i18n("Solution Points Saved as: %1", path));
file.close();
@@ -2355,8 +2356,10 @@ bool Align::captureAndSolve()

// Enable remote parse
dynamic_cast<RemoteAstrometryParser *>(remoteParser.get())->setEnabled(true);

QString options = solverOptions->text().simplified();
QStringList solverArgs = options.split(" ");
QStringList solverArgs = options.split(' ');

dynamic_cast<RemoteAstrometryParser *>(remoteParser.get())->sendArgs(solverArgs);

if (solverIterations == 0)
@@ -2560,7 +2563,7 @@ void Align::startSolving(const QString &filename, bool isGenerated)

if (isGenerated)
{
solverArgs = options.split(" ");
solverArgs = options.split(' ');
// Replace RA and DE with LST & 90/-90 pole
if (pahStage == PAH_FIRST_CAPTURE)
{
@@ -2612,7 +2615,7 @@ void Align::startSolving(const QString &filename, bool isGenerated)
solverArgs = generateOptions(optionsMap);
}
else if (rc == KMessageBox::No)
solverArgs = options.split(" ");
solverArgs = options.split(' ');
else
{
abort();
@@ -2758,7 +2761,7 @@ void Align::solverFinished(double orientation, double ra, double dec, double pix
textLabel->setBrush(Qt::white);
//textLabel->setBrush(Qt::NoBrush);
textLabel->setPen(Qt::NoPen);
textLabel->setText(" " + QString::number(solutionTable->rowCount()) + " ");
textLabel->setText(' ' + QString::number(solutionTable->rowCount()) + ' ');
textLabel->setFont(QFont(font().family(), 8));

if (!alignPlot->xAxis->range().contains(raDiff))
@@ -21,7 +21,7 @@ class AlignView : public FITSView
{
Q_OBJECT
public:
AlignView(QWidget *parent = 0, FITSMode mode = FITS_NORMAL, FITSScale filter = FITS_NONE);
explicit AlignView(QWidget *parent = nullptr, FITSMode mode = FITS_NORMAL, FITSScale filter = FITS_NONE);
~AlignView();

/* Calculate WCS header info and update WCS info */
@@ -216,7 +216,7 @@ bool OfflineAstrometryParser::getAstrometryDataDir(QString &dataDir)
while (!in.atEnd())
{
line = in.readLine();
if (line.isEmpty() || line.startsWith("#"))
if (line.isEmpty() || line.startsWith('#'))
continue;

line = line.trimmed();
@@ -291,7 +291,8 @@ bool OfflineAstrometryParser::startSovler(const QString &filename, const QString

if (Options::astrometrySolverVerbose())
{
QString command = solverPath + " " + solverArgs.join(" ");
QString command = solverPath + ' ' + solverArgs.join(' ');

align->appendLogText(command);
}

@@ -355,7 +356,7 @@ void OfflineAstrometryParser::wcsinfoComplete(int exist_status)

for (auto &key : wcskeys)
{
key_value = key.split(" ");
key_value = key.split(' ');

if (key_value.size() > 1)
{
@@ -92,7 +92,7 @@ void OpsAstrometryIndexFiles::slotUpdate()

for (auto &indexName : indexList)
{
indexName = indexName.replace("-", "_").left(10);
indexName = indexName.replace('-', '_').left(10);
QCheckBox *indexCheckBox = findChild<QCheckBox *>(indexName);
if (indexCheckBox)
indexCheckBox->setChecked(true);
@@ -183,7 +183,7 @@ bool OpsAstrometryIndexFiles::getAstrometryDataDir(QString &dataDir)
while (!in.atEnd())
{
line = in.readLine();
if (line.isEmpty() || line.startsWith("#"))
if (line.isEmpty() || line.startsWith('#'))
continue;

line = line.trimmed();
@@ -225,16 +225,17 @@ void OpsAstrometryIndexFiles::downloadIndexFile(const QString &URL, const QStrin
{
QString indexString = QString::number(currentIndex);
if (currentIndex < 10)
indexString = "0" + indexString;
indexString = '0' + indexString;

QString indexSeriesName = checkBox->text().remove("&");
QString indexSeriesName = checkBox->text().remove('&');
QProgressBar *indexDownloadProgress =
findChild<QProgressBar *>(indexSeriesName.replace("-", "_").left(10) + "_progress");
findChild<QProgressBar *>(indexSeriesName.replace('-', '_').left(10) + "_progress");
if (indexDownloadProgress && maxIndex > 0)
indexDownloadProgress->setValue(currentIndex*100 / maxIndex);

QString indexURL = URL;
indexURL.replace("*", indexString);

indexURL.replace('*', indexString);

QNetworkReply *response = manager->get(QNetworkRequest(QUrl(indexURL)));

@@ -252,9 +253,11 @@ void OpsAstrometryIndexFiles::downloadIndexFile(const QString &URL, const QStrin
response->deleteLater();
if (response->error() != QNetworkReply::NoError)
return;

QByteArray responseData = response->readAll();
QString indexFileN = fileN;
indexFileN.replace("*", indexString);

indexFileN.replace('*', indexString);

QFile file(indexFileN);
if (QFileInfo(QFileInfo(file).path()).isWritable())
@@ -313,12 +316,13 @@ void OpsAstrometryIndexFiles::downloadOrDeleteIndexFiles(bool checked)

if (checkBox)
{
QString indexSetName = checkBox->text().remove("&");
QString indexSetName = checkBox->text().remove('&');
QString progressBarName = indexSetName;
progressBarName = progressBarName.replace("-", "_").left(10) + "_progress";
progressBarName = progressBarName.replace('-', '_').left(10) + "_progress";
QProgressBar *indexDownloadProgress = findChild<QProgressBar *>(progressBarName);
QString filePath = astrometryDataDir + "/" + indexSetName;
QString filePath = astrometryDataDir + '/' + indexSetName;
int indexFileNum = indexSetName.midRef(8, 2).toInt();

if (checked)
{
checkBox->setChecked(!checked);
@@ -1491,12 +1491,12 @@ void Scheduler::wakeUpScheduler()
}
}

double Scheduler::findAltitude(const SkyPoint &target, const QDateTime when)
double Scheduler::findAltitude(const SkyPoint &target, const QDateTime &when)
{
// Make a copy
SkyPoint p = target;
QDateTime lt(when.date(), QTime());
KStarsDateTime ut = KStarsData::Instance()->geo()->LTtoUT(lt);
KStarsDateTime ut = KStarsData::Instance()->geo()->LTtoUT(KStarsDateTime(lt));

KStarsDateTime myUT = ut.addSecs(when.time().msecsSinceStartOfDay() / 1000);

@@ -1512,7 +1512,7 @@ bool Scheduler::calculateAltitudeTime(SchedulerJob *job, double minAltitude, dou
double earlyDawn = Dawn - Options::preDawnTime() / (60.0 * 24.0);
double altitude = 0;
QDateTime lt(KStarsData::Instance()->lt().date(), QTime());
KStarsDateTime ut = geo->LTtoUT(lt);
KStarsDateTime ut = geo->LTtoUT(KStarsDateTime(lt));

SkyPoint target = job->getTargetCoords();

@@ -1579,7 +1579,7 @@ bool Scheduler::calculateCulmination(SchedulerJob *job)
o.EquatorialToHorizontal(KStarsData::Instance()->lst(), KStarsData::Instance()->geo()->lat());

QDateTime midnight(KStarsData::Instance()->lt().date(), QTime());
KStarsDateTime dt = geo->LTtoUT(midnight);
KStarsDateTime dt = geo->LTtoUT(KStarsDateTime(midnight));

QTime transitTime = o.transitTime(dt, geo);

@@ -1812,7 +1812,7 @@ double Scheduler::getCurrentMoonSeparation(SchedulerJob *job)
// Get target altitude given the time
SkyPoint p = job->getTargetCoords();
QDateTime midnight(KStarsData::Instance()->lt().date(), QTime());
KStarsDateTime ut = geo->LTtoUT(midnight);
KStarsDateTime ut = geo->LTtoUT(KStarsDateTime(midnight));
KStarsDateTime myUT = ut.addSecs(KStarsData::Instance()->lt().time().msecsSinceStartOfDay() / 1000);
CachingDms LST = geo->GSTtoLST(myUT.gst());
p.EquatorialToHorizontal(&LST, geo->lat());
@@ -1834,14 +1834,14 @@ int16_t Scheduler::getMoonSeparationScore(SchedulerJob *job, QDateTime when)
// Get target altitude given the time
SkyPoint p = job->getTargetCoords();
QDateTime midnight(when.date(), QTime());
KStarsDateTime ut = geo->LTtoUT(midnight);
KStarsDateTime ut = geo->LTtoUT(KStarsDateTime(midnight));
KStarsDateTime myUT = ut.addSecs(when.time().msecsSinceStartOfDay() / 1000);
CachingDms LST = geo->GSTtoLST(myUT.gst());
p.EquatorialToHorizontal(&LST, geo->lat());
double currentAlt = p.alt().Degrees();

// Update moon
ut = geo->LTtoUT(when);
ut = geo->LTtoUT(KStarsDateTime(when));
KSNumbers ksnum(ut.djd());
LST = geo->GSTtoLST(ut.gst());
moon->updateCoords(&ksnum, true, geo->lat(), &LST, true);
@@ -1910,8 +1910,9 @@ void Scheduler::executeJob(SchedulerJob *job)
{
if (job->getCompletionCondition() == SchedulerJob::FINISH_SEQUENCE && Options::rememberJobProgress())
{
QString targetName = job->getName().replace(" ", "");
QString targetName = job->getName().replace(' ', "");
QList<QVariant> targetArgs;

targetArgs.append(targetName);
captureInterface->callWithArgumentList(QDBus::AutoDetect, "setTargetName", targetArgs);
}
@@ -2603,7 +2604,7 @@ void Scheduler::checkJobStage()
}

// #4 Check if we're not at dawn
if (currentJob->getEnforceTwilight() && KStarsData::Instance()->lt() > preDawnDateTime)
if (currentJob->getEnforceTwilight() && KStarsData::Instance()->lt() > KStarsDateTime(preDawnDateTime))
{
// If either mount or dome are not parked, we shutdown if we approach dawn
if (isMountParked() == false || (parkDomeCheck->isEnabled() && isDomeParked() == false))
@@ -3887,7 +3888,7 @@ void Scheduler::startCapture()
{
captureInterface->call(QDBus::AutoDetect, "clearSequenceQueue");

QString targetName = currentJob->getName().replace(" ", "");
QString targetName = currentJob->getName().replace(' ', "");
QList<QVariant> targetArgs;
targetArgs.append(targetName);
captureInterface->callWithArgumentList(QDBus::AutoDetect, "setTargetName", targetArgs);
@@ -4565,7 +4566,7 @@ void Scheduler::startMosaicTool()
<< mosaicTool.getJobsDir();

QString outputDir = mosaicTool.getJobsDir();
QString targetName = nameEdit->text().simplified().remove(" ");
QString targetName = nameEdit->text().simplified().remove(' ');
int batchCount = 1;

XMLEle *root = getSequenceJobRoot();
@@ -4577,8 +4578,8 @@ void Scheduler::startMosaicTool()
foreach (OneTile *oneJob, mosaicTool.getJobs())
{
QString prefix = QString("%1-Part%2").arg(targetName).arg(batchCount++);
prefix = prefix.replace(" ", "-");

prefix.replace(' ', '-');
nameEdit->setText(prefix);

if (createJobSequence(root, prefix, outputDir) == false)
@@ -5056,7 +5057,8 @@ SequenceJob *Scheduler::processJobInfo(XMLEle *root, SchedulerJob *schedJob)
// FITS Dir
QString finalFITSDir = job->getFITSDir();

QString targetName = schedJob->getName().remove(" ");
QString targetName = schedJob->getName().remove(' ');

finalFITSDir += QLatin1Literal("/") + targetName + QLatin1Literal("/") + frameType;
if ((job->getFrameType() == FRAME_LIGHT || job->getFrameType() == FRAME_FLAT) && filterType.isEmpty() == false)
finalFITSDir += QLatin1Literal("/") + filterType;
@@ -154,7 +154,7 @@ class Scheduler : public QWidget, public Ui::Scheduler
* @param when date time to find altitude
* @return Altitude of the target at the specific date and time given.
*/
static double findAltitude(const SkyPoint &target, const QDateTime when);
static double findAltitude(const SkyPoint &target, const QDateTime &when);

/** @defgroup SchedulerDBusInterface Ekos DBus Interface - Scheduler Module
* Ekos::Align interface provides primary functions to run and stop the scheduler.

0 comments on commit d5435c7

Please sign in to comment.
You can’t perform that action at this time.