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.
In theory we support Qt 5.6 (because of SailfishOS) but in practice we are not checking that in the CI so probably we broke the compatibility long ago. Also, I don't think anyone is using this code in SailfishOS, so we can greatly simplify the code by requiring Qt 5.15 or later.
When receiving two files with the same name, the first file might not be
saved to disk already when we have to decide the name for the second if
we do it too early.
BUG: 470078
Summary: This tells the new notification system that we're copying a file and lets it show a better summary.
Test Plan:
{F6821356}
Is the composite job stuff already merged? That probably needs adjusting too
Reviewers: #plasma, nicolasfella
Reviewed By: nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D21182
Summary: If the number of bytes received != m_size report failure and delete the partial file
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16778
Summary:
This fixes receiving payloads using the bluetooth backend.
This looks like some bug in Qt, but I couldn't figure out what happens exactly (will report a bug though).
Test Plan: Receiving files now works!
Reviewers: #kde_connect, apol
Reviewed By: #kde_connect, apol
Subscribers: kdeconnect, nicolasfella, apol, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12153
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.
Basically:
- mFoo -> m_foo
- foo -> m_foo (if it is a member variable)
- Type &ref -> Type& ref
- Type *ptr -> Type* ptr
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, nicolasfella, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D7312
We stop using a buffer so it's less memory intensive and allows for larger files to be sent.
With current KIO has CPU usage issues, there's a patch in review that fixes them.
BUGS: 378488
Summary:
QSslSocket is already a QIODevice so just use that.
Should fix the issue of transfering *big* files.
Unfortunately this seems to trigger a bug in KIO and CPU usage goes through the roof, so haven't really been able to test it does actually fix things.
Please don't merge/approve yet
Reviewers: apol, albertvaka, kdeconnect
Subscribers: #kde_connect
Differential Revision: https://phabricator.kde.org/D6039
When sending multiple files from my phone to my PC, kdeconnectd usually received a SIGFPE.
To get the transfer speed it divides the number of bytes received by the elapsed time which can be zero.
Also, since we're only interested in the time that has elapsed, use QElapsedTimer,
which is exactly for this. QTime::elapsed() also needs to take into account potentially
ocurred timezone or DST changes.
REVIEW: 128861
Introduces a big fat buffer :(
Actually test the trasfers :)
Takes QSslSocket causistic into account, for some reason QNAM refuses to
mark as finished when the QSslSocket (through QIODevice) closes.
It would be good to look into dropping the QBuffer, doing so with the test
in place will help.
Use QNetworkAccessManager for storing the files we receive instead of
directly KIO, then provide the KIO-based QNetworkAccessManager from the
daemon. This way we'll still get the KIO network-transparency, but the
library only depenends on QtNetwork, which will be easier to get in some
platforms.
After this change, we only depend on KConfig, KI18n and KCoreAddons, which
are tier1 and really easy to work with on any platform.
REVIEW: 123325
Removes the usage of RenameDialog by moving the functionality away. In
fact, what it does is make the share dialog try to come up with a different
name rather than asking the user. It's a quite common procedure as makes
the interaction simpler (for example, Chromium and Kamoso work like that).
REVIEW: 122813