deepskystacker / DSS

DeepSkyStacker
Other
894 stars 90 forks source link

refactoring *.ui (moc) connections, to compile time c++ 11 ones #191

Closed Rational-pi closed 1 year ago

Rational-pi commented 1 year ago

Refactoring runtime Qt connections generated by moc from *.ui files to compile-time ones in cpp code. /!\ AskRegistering is actualy a CDialog even though AskRegistering.ui exists /!\

perdrix52 commented 1 year ago

WHY

Rational-pi commented 1 year ago

Everything we can offload from preprocessors macros/moc is a plus in maintainability, ease of code navigation, and safety. The number of bugs I fixed that were caused by connections in UI files doesn't fit on my 10 fingers.

Rational-pi commented 1 year ago

I agree, QDialog::accept does not have overloads, so it is redundant and confusing. It's a remainder of my refactoring process; moc wrote it like this and I missed it. I will change that. I will also look at AskRegistering.

Rational-pi commented 1 year ago

Done :) , I removed confusing qOverloads and finished ported AskRegistering. I confirmed that translations were working with the new dialog. I did not clean MFC translation files of the old entries as I am not very knowledgeable about that technology.

perdrix52 commented 1 year ago

Good! I do NOT want the .rc files touched until the porting work is totally completed (at which time they can be deleted).