biblioteq icon indicating copy to clipboard operation
biblioteq copied to clipboard

Convert mainWindow slots to QML

Open jgiszczak opened this issue 2 years ago • 4 comments

Remove manually written boilerplate code in favor of machine-generated boilerplate code.

jgiszczak avatar Apr 06 '22 08:04 jgiszczak

Many changes. :) Did you test them?

textbrowser avatar Apr 06 '22 16:04 textbrowser

Many changes but all of a kind. I tested most of them, including all menu and toolbar actions, but do please inspect the diff carefully to be sure I didn't misspell any slot names. The one downside of this method is the late binding it does which lacks compiler checks of method names. I caught one misspelling during testing. I'm fairly sure there are no more, but a second look is advisable.

jgiszczak avatar Apr 06 '22 16:04 jgiszczak

Many changes but all of a kind. I tested most of them, including all menu and toolbar actions, but do please inspect the diff carefully to be sure I didn't misspell any slot names. The one downside of this method is the late binding it does which lacks compiler checks of method names. I caught one misspelling during testing. I'm fairly sure there are no more, but a second look is advisable.

Was the misspelling which you discovered a misspelling of the conversion or of existing source?

textbrowser avatar Apr 06 '22 16:04 textbrowser

It was my error during conversion.

Having three variants in the slot naming scheme made things a little more difficult...

jgiszczak avatar Apr 06 '22 18:04 jgiszczak

Please connect() according to https://wiki.qt.io/New_Signal_Slot_Syntax. The new method will capture errors during compilation.

However, in Qt 5.5.1, this is not necessarily simple with parameterized methods. For those, the traditional connect() will suffice.

textbrowser avatar May 06 '23 15:05 textbrowser