By commenting out the parameter name, we get compile-time checks
Also, we can omit them for slots and Qt will not forward the parameters.
In case we had TODOs next to the code, I kept the Q_UNUSED statements
for now.
Overriding and defaulting them in the header doesn't make sense
For the dbus interfaces, we don't have any reasources to clean up or memory to be released. Meaning we can drop those lines too
The rationale is explained in https://planet.kde.org/friedrich-kossebau-2023-06-28-include-also-moc-files-of-headers/
In case of KDEConnect, it impressively speeds up compilation. Before it
took 390 seconds on a clean build and with this change it took 330 seconds.
This is due to the mocs_compilation having to include the header files
and thus all their headers. Due to the lots of small plugins we have,
this means that the same headers must be compiled plenty of times.
When we include the moc files directly in the C++ file, they are already
available.
This makes it easier to read, because we do not have to handle a list of
files that get added to the targets. In other KDE projects, we also
prefer the target centric approach.
In case one wants to reuse the same category in multiple places, it
would be best to create a small static lib. But for now, this is not
needed.
The "enabled" property of the button was set to false and has overwritten the default value based on the message length.
The message field had "anchors.fill" positioning and raised "Binding loop detected for property "implicitHeight"" error.
attachmentList property of ChatMessage didn't have the default value and was undefined.
BUG: 455149
## Summary
Add KLocalizedString::setApplicationDomain for kdeconnect-sms
Per the programmer guide, this must be done, otherwise translations will not happen.
https://api.kde.org/frameworks/ki18n/html/prg_guide.html
## Test Plan
### Before:
kdeconnect-sms would spew errors like `kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "%1" msgid_plural: "" msgctxt: ""`
(Translations still seem to work, though)
### After:
No more ki18n errors, translation works.
## Summary
For awhile (since at least early last year), it has not been possible to scroll past the first screen of message history. I believe this was due to a version bump in some library, but I was not able to biset it at the time.
This changes how messages are loaded to work again. I like this solution better anyway, because it means one can smoothly scroll back in time without needing to stop every time you reach the top of the history.
BUG: 452946
## Test Plan
### Before:
Scrolling to the top of the kdeconnect-sms history would do nothing. You could only view the first handful of messages in the conversation (whichever messages the app decided to load for you when you first open the conversation).
### After:
Scrolling to the top of the list of messages will cause the app to load more, allowing you to view more history of messages.
## Summary
Fix the bug address for the SMS app.
BUG: 452055
## Test Plan
### Before:
Clicking the "Report Bug..." button in the about screen would give a permission denied error.
### After:
Clicking the "Report Bug..." button directs the user to bugzilla to report a new bug with the correct product and component already selected.
Use a singleton instead of context properties for data handling
Fix passing initial message
Make device menu creation more declarative
Fix initial device handling
Update current device when new instance with initial device is requested
## Summary
Fix crash in kdeconnect-sms if a conversation contains a message which has no addresses.
I am not sure why this would happen and there's probably something which should be fixed on the Android side to ensure that every message has addresses, but this is an easy fix to prevent user-reported crashes.
BUG: 449719
## Test Plan
### Before:
kdeconnect-sms crashes upon selecting a conversation with a message with no addresses
### After:
kdeconnect-sms does not crash
- Move the device combobox to the global drawer
- Move search field and new button to header
- Use Kirigami SearchField instead
- Don't switch focus away from search field when typing
- Give the New button an icon
- Clarify the search field text
- Center messages view loading indicator
- Make send and attach buttons stick to bottom of text area
- Make cursor an I-beam when hovering over text area
- Move send button to the right
- Give proper padding to messages view top
- Move refresh action to global drawer
- Show refresh button directly in loading message where it is most useful
| Before | After |
| ------ | ------ |
| ![kdeconnectsms-old1](/uploads/469fa5f198ce81f1f53e8aa73694a824/kdeconnectsms-old1.png) | ![kdeconnectsms-new1](/uploads/c3b2b552d5d1bb73c566c6879c5b2a3c/kdeconnectsms-new1.png) |
| ![kdeconnectsms-old2](/uploads/eed795529946ed9ff856d8599bc66fb2/kdeconnectsms-old2.png) | ![kdeconnectsms-new2](/uploads/7abff93670aaea36052f3e3bfe01da62/kdeconnectsms-new2.png) |
| ![kdeconnectsms-old3](/uploads/f24dc7a902e33a1317cc8d9b90c39482/kdeconnectsms-old3.png) | ![kdeconnectsms-new3](/uploads/ea7d07f64d1904757dce56e86f1876ba/kdeconnectsms-new3.png) |
cc @teams/usability @teams/vdg
This commit makes use of the Kirigami.PlaceholderMessage component
instead of a QML Label, also moves the placeholder message to be
inside the ListView.