summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-28 16:18:45 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-28 16:18:45 (GMT)
commita867d71f9b270e487d5b898ed5ad99956f0b1b21 (patch)
treec2a427bd21355ed755926c0feb433df17b633e8c
parentf087747ac45dfbce3b76677b00035c8cb6eeaac9 (diff)
Invalid directory was being set since it was storing a file and not a path, fixed
-rw-r--r--kstars/kstarsactions.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/kstars/kstarsactions.cpp b/kstars/kstarsactions.cpp
index d299c3f..764391a 100644
--- a/kstars/kstarsactions.cpp
+++ b/kstars/kstarsactions.cpp
@@ -806,16 +806,8 @@ void KStars::slotOpenFITS()
if (fileURL.isEmpty())
return;
- // Workaround for "/C:/foo/bar" Qt Bug
- // Reported as fixed in Qt 5.6
- // Emerged Qt 5.5 with patch is not working
- #ifdef Q_OS_WIN
- if (fileURL.toLocalFile().startsWith("/"))
- fileURL.setPath(fileURL.toLocalFile().right(fileURL.toLocalFile().count()-1));
- #endif
-
// Remember last directory
- path.setUrl(fileURL.toLocalFile());
+ path.setUrl(fileURL.url(QUrl::RemoveFilename));
FITSViewer * fv = new FITSViewer((Options::independentWindowFITS()) ? NULL : this);
// Error opening file