-
-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oculars: begin code cleanup #1633
Conversation
Initial cleanup on Oculars model classes.
First pass. Much more to do.
from array subscript to at().
# Conflicts: # plugins/Oculars/src/gui/OcularDialog.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding your first pull request to Stellarium. If you have questions, please do not hesitate to contact us.
Please check CI/Linux and CI/AppVeyor reports. |
Interesting new syntax, I have never seen the "auto XY() --> type" . Are there real benefits? Cannot say. Makes reading harder for me. Do I understand I shall definitely no longer bother with #1521. Fine for me, as long as our intended functionality does not suffer:
|
Yes, those build setups are broken. Not the code. |
There are benefits to the trailing returns. Yes, I intend to do that functionality and more. |
|
Syntax errors in the code are not code problem. Nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need to use macro Q_DISABLE_COPY_MOVE(Class)?
I'll looks at the two separate macros tomorrow. But, yes, they need to be used an any subclass of QObject. And to your other comment, the two build failures are not do to issues in my code; you don't use a semicolon at the end of a macro. Is that why you suggest using the two macros? |
For what? Which reasons for use this macros?
Just forget about 2 macros. You use macros, which was introduced in Qt 5.13 and now 2/3 of CI instances and all instances for building binary packages are broken. |
Ah. I did not see they were introduced so recently. They are needed because of the rule of three/five/zero. I'll replace them for the time being. |
Added guard blocks for minimum Qt version for the Q_DISABLE_COPY_MOVE macro.
This pull request introduces 28 alerts and fixes 1 when merging 1bb364a into 5f3aaa6 - view on LGTM.com new alerts:
fixed alerts:
|
You can test for Qt versions and include/define what's possible. At some point we will have to step up to 5.15 and replace QtScript usage, before we can prepare further moving on to Qt6. |
Ya, that's what I pushed earlier. |
Did you see I put this into a guard? |
Remove blank line.
This pull request introduces 28 alerts and fixes 1 when merging 73043f6 into 5f3aaa6 - view on LGTM.com new alerts:
fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it works.
All changes extracted to https://github.com/Stellarium/stellarium/tree/oculars-ng branch |
Description
This is the start of code cleanup. But as there is so much to do, it's going to take too long to do it at once. This needs to be merged into master before more work can cinque; I just lost a few days of work due to a bad merge from upstream.