summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-23 09:42:12 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-23 09:42:12 (GMT)
commit3e0de03371c5ddb21febee52ead7e608c9ef1686 (patch)
tree23226d63e66b2052645b520e1a0bafd9b1c919d0
parent9e0e602c56e7d0fdd5ca787b505ce679ebc0e71c (diff)
Use system temp path from QStandardPaths
-rw-r--r--kstars/ekos/align/offlineastrometryparser.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/kstars/ekos/align/offlineastrometryparser.cpp b/kstars/ekos/align/offlineastrometryparser.cpp
index 55d9338..f728003 100644
--- a/kstars/ekos/align/offlineastrometryparser.cpp
+++ b/kstars/ekos/align/offlineastrometryparser.cpp
@@ -14,6 +14,7 @@
#include <KLocalizedString>
#include "Options.h"
+#include "auxiliary/kspaths.h"
#include "offlineastrometryparser.h"
#include "align.h"
@@ -182,7 +183,7 @@ bool OfflineAstrometryParser::startSovler(const QString &filename, const QStrin
#endif
QStringList solverArgs = args;
- QString solutionFile = QStandardPaths::TempLocation + "/solution.wcs";
+ QString solutionFile = KSPaths::writableLocation(QStandardPaths::TempLocation) + "solution.wcs";
solverArgs << "-W" << solutionFile << filename;
connect(&solver, SIGNAL(finished(int)), this, SLOT(solverComplete(int)));
@@ -219,7 +220,7 @@ void OfflineAstrometryParser::solverComplete(int exist_status)
solver.disconnect();
// TODO use QTemporaryFile later
- QString solutionFile = QStandardPaths::TempLocation + "/solution.wcs";
+ QString solutionFile = KSPaths::writableLocation(QStandardPaths::TempLocation) + "solution.wcs";
QFileInfo solution(solutionFile);
if (exist_status != 0 || solution.exists() == false)
@@ -280,7 +281,8 @@ void OfflineAstrometryParser::wcsinfoComplete(int exist_status)
emit solverFinished(orientation,ra,dec, pixscale);
// Remove files left over by the solver
- QDir dir("/tmp");
+ //QDir dir("/tmp");
+ QDir dir(KSPaths::writableLocation(QStandardPaths::TempLocation));
dir.setNameFilters(QStringList() << "fits*" << "tmp.*");
dir.setFilter(QDir::Files);
foreach(QString dirFile, dir.entryList())
@@ -288,7 +290,6 @@ void OfflineAstrometryParser::wcsinfoComplete(int exist_status)
}
-
void OfflineAstrometryParser::logSolver()
{
if (Options::solverVerbose())