Fix PASTCAST errors and small GUI cleanup#729
Conversation
…ing them into CPLError() and throw() statements where applicable. For issue #692
…r issue #692. Note that I did NOT put the throws into the thread functions. They seem to be properly called in there, but apparently that requires putting an additional try/catch wrapper somewhere in the threading function logic or it seg faults. So I basically just pass error codes and warning messages, then have a final double check if any files are found to have been downloaded as the check.
My original plan was to just use these new time checks, drop them from the cli and no longer add them to the GUI (old qt4 gui had its checks there instead of state checking). But, then it is unclear whether the information is more helpful as UTC or local time, these new checks are currently setup to output the error messages in UTC time. So I decided to leave the cli checks as is for now, the GUI will just need some more proper state checking. That way, the UTC or local time can be better controlled by whatever feeds them into the ninja code, but we still have a final check just in case.
…ationFetch. Updated QDateTime display format for both PASTCAST and stationFetch in the GUI. For issue #692.
…der, looks like the only one that was crazily messed up was the point initialization time case
…nting not just "Earliest PASTCAST DateTime:", but also "Latest PASTCAST DateTime:". However, not enough room in the GUI yet, so I left the "Latest" commented out.
…ers were dropping the leading zero in cases of 00 to 09. Wasn't hurting the code, but was not correct.
…box when swapping back and forth between a given weather model and PASTCAST.
…d some of the now excess cli PASTCAST error checks as they are now done within the raw ninja PASTCAST code. For issue #692. even though I said before that I would keep the cli PASTCAST error checking, that was just the PASTCAST dateTime out of range errors, dropped the other ones, and improved the format of the dateTime range error messages.
…specially changing out "dem" for "local", and using "forRange" to differentiate specifying "QTimeZone::systemTimeZone()" in the constructor.
|
Kay, been doing some digging, into whether I can simplify the variable names even further, to drop the Anyhow, I stumbled onto a new concept, which seems to be the real issue: I suspect that our current setup, even though it looks good right now, if run on a PC in a different Just a reminder of what the |
|
I'm having trouble understanding your comment, so let me see if I have the main points.
If you have a fix, I would commit it to the PR and allow me to review. It would help to a reference to the code. |
|
We need to continue to address issues for the release. Let's not spend more time on this than necessary. If more clean up is needed with variable names, that can be completed later. |
…just a hint more. Turns out that "QDateTime" and "QDateTimeEdit" "widgets" each have their own timezone handling. so drop the "forRange" weird "system/machine local" converted times, and just use standard "local", by using "QDateTimeEdit->setTimeZone(timeZone)". related to issue #692, related to the discussion of timezones in issue #637. Oh, looks like also for issues #705 and 704
|
Just pushed the fix, and it appears to be working nicely. Turns out this relates to the time zone discussion in issue #637, and directly works to do a more proper fix to issues #705 and #704.
So, if |
|
Man, I wish I were better at describing this. Anyhow, to clarify, I didn't realize that Talking to Mason, he mentioned that he had tried this method out before, and it didn't work. It is possible that using a later version of Qt6 might also have made this work where it wasn't before, not just a mismatch of |
… times smaller than start times, by adjusting the time entries similar to pointInit. For issue #692
Made it so that the ninja PASTCAST code more properly messages via
CPLError()andthrow()rather thanCPLDebug(), so that the GUI more properly errors out. Also some DateTime message/textBox formatting improvements and some small amount of GUI cleanup.Still could use some general cleanup to the raw ninja PASTCAST code, but that needs to be a separate pull request to avoid diluting the description of these changes any more.
Fixes #692.