summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-10 21:24:18 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-10 21:24:18 (GMT)
commit8bf6681fecc2df061c64141cd77b0ae9b594af1c (patch)
tree6c0ed19cbe66cb66e771162238b4cd93c6e509b4
parent6777b501d29f01861b94b230afa9ff5c23ddae0d (diff)
Accept URL as is without making assumptions. The Image Exporter expects a fully qualified URL to the desired file path
-rw-r--r--kstars/auxiliary/imageexporter.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/kstars/auxiliary/imageexporter.cpp b/kstars/auxiliary/imageexporter.cpp
index 2d2a5ba..ca9e99e 100644
--- a/kstars/auxiliary/imageexporter.cpp
+++ b/kstars/auxiliary/imageexporter.cpp
@@ -159,7 +159,7 @@ bool ImageExporter::exportRasterGraphics(const QString &fileName)
else
{
- qDebug() << "Image saved to file: " << fileName;
+ KStars::Instance()->statusBar()->showMessage(i18n ("Saved image to %1", fileName));
return true;
}
}
@@ -180,18 +180,7 @@ void ImageExporter::addLegend(QPaintDevice *pd)
bool ImageExporter::exportImage( QString url )
{
- //If the filename string contains no "/" separators, assume the
- //user wanted to place a file in their home directory.
- QUrl fileURL;
- if(!url.contains(QDir::separator()))
- {
- fileURL = QUrl::fromLocalFile(QDir::homePath() + '/' + url);
- }
-
- else
- {
- fileURL = QUrl::fromUserInput(url);
- }
+ QUrl fileURL = QUrl::fromUserInput(url);
m_lastErrorMessage = QString();
if(fileURL.isValid())