Lack of Q_OBJECT macros and "Cannot invoke tr() like this" when build.sh linguist #110

Closed
opened 1 year ago by onryo · 4 comments
onryo commented 1 year ago
Collaborator

Command used:

./build.sh linguist

Output (similar on SD):

/src/addressbook.cpp:16: Class 'AddressBookModel' lacks Q_OBJECT macro
/src/balancestablemodel.cpp:160: Class 'BalancesTableModel' lacks Q_OBJECT macro
/src/controller.cpp:1447: Cannot invoke tr() like this
/src/controller.cpp:1447: Class 'Controller' lacks Q_OBJECT macro
/src/controller.cpp:1448: Cannot invoke tr() like this
/src/controller.cpp:1456: Cannot invoke tr() like this
/src/controller.cpp:1457: Cannot invoke tr() like this
/src/controller.cpp:1476: Cannot invoke tr() like this
/src/controller.cpp:1546: Cannot invoke tr() like this
/src/firsttimewizard.cpp:138: Class 'NewOrRestorePage' lacks Q_OBJECT macro
/src/firsttimewizard.cpp:281: Class 'NewSeedPage' lacks Q_OBJECT macro
/src/firsttimewizard.cpp:648: Class 'RestoreSeedPage' lacks Q_OBJECT macro
/src/memoedit.cpp:53: Class 'MemoEdit' lacks Q_OBJECT macro
/src/recurring.cpp:734: Class 'RecurringListViewModel' lacks Q_OBJECT macro
/src/recurring.cpp:785: Class 'RecurringPaymentsListViewModel' lacks Q_OBJECT macro
/src/viewalladdresses.cpp:9: Class 'ViewAllAddressesModel' lacks Q_OBJECT macro

a95eb475c7 fixes it, but need an ACK first if I can make a PR.

Command used: ``` ./build.sh linguist ``` Output (similar on SD): ``` /src/addressbook.cpp:16: Class 'AddressBookModel' lacks Q_OBJECT macro /src/balancestablemodel.cpp:160: Class 'BalancesTableModel' lacks Q_OBJECT macro /src/controller.cpp:1447: Cannot invoke tr() like this /src/controller.cpp:1447: Class 'Controller' lacks Q_OBJECT macro /src/controller.cpp:1448: Cannot invoke tr() like this /src/controller.cpp:1456: Cannot invoke tr() like this /src/controller.cpp:1457: Cannot invoke tr() like this /src/controller.cpp:1476: Cannot invoke tr() like this /src/controller.cpp:1546: Cannot invoke tr() like this /src/firsttimewizard.cpp:138: Class 'NewOrRestorePage' lacks Q_OBJECT macro /src/firsttimewizard.cpp:281: Class 'NewSeedPage' lacks Q_OBJECT macro /src/firsttimewizard.cpp:648: Class 'RestoreSeedPage' lacks Q_OBJECT macro /src/memoedit.cpp:53: Class 'MemoEdit' lacks Q_OBJECT macro /src/recurring.cpp:734: Class 'RecurringListViewModel' lacks Q_OBJECT macro /src/recurring.cpp:785: Class 'RecurringPaymentsListViewModel' lacks Q_OBJECT macro /src/viewalladdresses.cpp:9: Class 'ViewAllAddressesModel' lacks Q_OBJECT macro ``` https://git.hush.is/hush/SilentDragonLite/commit/a95eb475c7bebe0d4bc324074e1e0f15a8aa1bca fixes it, but need an ACK first if I can make a PR.
onryo added the
low priority
question
labels 1 year ago
duke commented 1 year ago
Owner

@onryo adding Q_OBJECT looks good, those changes are good to commit to dev branch

@onryo adding Q_OBJECT looks good, those changes are good to commit to `dev` branch
Poster
Collaborator

Can I add this commit 85abeba425 for tr function?

Can I add this commit https://git.hush.is/hush/SilentDragonLite/commit/85abeba4257ea7c6d20895c3bd55177477ecba46 for tr function?
duke commented 1 year ago
Owner

@onryo yes, QObject::tr() is usually what I use when tr() is not imported into the current namespace

@onryo yes, QObject::tr() is usually what I use when tr() is not imported into the current namespace
Poster
Collaborator

Fixed in 613df81407, closing.

Fixed in https://git.hush.is/hush/SilentDragonLite/commit/613df81407a768e04bd1c78ae14c7787df5e252e, closing.
onryo closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.