Sharing files to the Android bluetooth backend now works. The code is asynchronous now too.
Details
Details
- Reviewers
apol - Group Reviewers
KDE Connect - Commits
- R224:1b570d4719e4: Make bluetooth payload upload work & asynchronous
I tested several files, and they all get transferred correctly. The socket gets destroyed correctly too.
Diff Detail
Diff Detail
- Repository
- R224 KDE Connect
- Branch
- bluetooth-fix-upload
- Lint
No Linters Available - Unit
No Unit Test Coverage
Comment Actions
Small observations, looks really good!
core/backends/bluetooth/bluetoothuploadjob.cpp | ||
---|---|---|
56 ↗ | (On Diff #32332) | Can you use the new syntax? |
82 ↗ | (On Diff #32332) | qMin<qint64>() reads better imho, then you can drop the ugly cast. |
96 ↗ | (On Diff #32332) | remove this debug? call finishWrites() directly? |
107 ↗ | (On Diff #32332) | If it didn't end we leak? |
Comment Actions
I'll do some more testing with the current changes, to make sure edge cases are handled correctly.
core/backends/bluetooth/bluetoothuploadjob.cpp | ||
---|---|---|
107 ↗ | (On Diff #32332) | We'll get called again if more bytes are written, so it eventually either disconnects (when some error happens) or all bytes have been written. Either case, we'll close it and destroy the job. |
Comment Actions
Looks good to me, definitely a step forward.
core/backends/bluetooth/bluetoothuploadjob.cpp | ||
---|---|---|
109 | Just connect to closeConnection, let's not add cruft, makes for readability. |