[Kstars-devel] Issue with image downloader?

Akarsh Simha akarshsimha at gmail.com
Thu Jan 7 23:17:54 UTC 2016


Hi Jasem

> So in observation planner, some images won't show up, I _think_ the problem
> is here:
>
>
> CurrentImagePath = QStandardPaths::locate( QStandardPaths::DataLocation ,
> CurrentImage );
>
> I think it should be :
>
> CurrentImagePath =
> QStandardPaths::writableLocation(QStandardPaths::DataLocation) +
> QDir::separator() + CurrentImage

I'm not sure, because the former syntax seems to be achieving the same
thing. But if it works, it works.

> Another thing, instead of hardcoding '/' where it could cause problems on
> other operating systems, we should opt for QDir::separator()

I see, I was not sure what needed to be done.

In fact, Jasem, I think that the entire point of having two kinds of
images (Temporary an 'saved') is overkill and counterintuitive. I know
we designed it with some purpose, but the way it works now, the "Temp"
images are anyway stored in ~/.local/share/kstars -- so in what sense
are they temp, I have no clue. So this entire thing is so
counterintuitive to a developer, I don't know what it might be for a
user. So I'm tempted to say that the entire image handling needs a
rewrite. And while we are rewriting it, it might be useful to add
support for multiple reference images, but not sure.

> Finally, if the downloaded image is large (> 10 MB) then the image is not
> displayed, is there a way to limit the size of the image downloaded?

No idea here, other than trying the usual QFile::size() or something
after download and backtracking.

Regards
Akarsh


More information about the Kstars-devel mailing list