Commit 8bf6681f authored by Jasem Mutlaq's avatar Jasem Mutlaq

Accept URL as is without making assumptions. The Image Exporter expects a...

Accept URL as is without making assumptions. The Image Exporter expects a fully qualified URL to the desired file path
parent 6777b501
......@@ -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())
......
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