- We do not need the return type. If a plugin declares it can handle the
packet it should do so. We don't have any fallback logic in place and
the packet types are namespaced with the plugin IDs anyway.
- Provide a default implementation with a warning, not all plugins need
to overwrite this
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 way we catch missing methods/mismatching arguments at compile and
not at runtime.
This fixes some Qt6 regressions due to the removal of deprecated methods.
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
* Set magic `destUrl` property to let it know the job destination in case of
multiple files being transferred
* Set a normal "Receiving File(s)" title like we do with "Copying" title
* Set device name and destination path as details
This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.
Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
Updated plugins/share/shareplugin.cpp:
- KFileUtils::suggestName() is a drop-in replacement as of 5.64,
just moved to another library
Updated plugins/findthisdevice/findthisdevice_config.cpp:
- KCModule::markAsChanged() is likewise as of 5.64
Signed-off-by: Peter J. Mello <admin@petermello.net>
Summary:
A user may have Kate installed but another editor set as default for text/plain. Respect that.
Also add .txt extension to the temp file name to make mime-type detection easier.
BUG: 399174
Test Plan:
Set default text editor to Kate -> Text opens in Kate
Set default text editor to Atom -> Text opens in Atom
Reviewers: #kde_connect, broulik, apol
Reviewed By: #kde_connect, broulik, apol
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D15813
Summary:
Combine multiple upload jobs for files into a single KCompositeJob so only 1 notification will be shown
Includes changes introduced in D16279
Test Plan:
1. Share of multiple files is performed using 1 composite job
Setup:
- Select multiple (big) files in dolphin and share with an Android device
Result:
- The files will be transferred using 1 CompositeUploadJob and showing only 1 notification
2. Share of file while another share is already running adds job to existing composite job
Setup:
- Select multiple (big) files in dolphin and share with an Android device
- Share an additional file with the same Android device
Result:
- The files are all transferred using 1 CompositeUploadJob and showing only 1 notification
- The notification is updated after adding the last file
3. Other packets are transmitted as usual
Setup:
- Setup sharing desktop notification with device
- Share a big file with an Android device
- Generate a desktop notification (eg. sending or receiving an email)
Result:
- Notification packet is send immediately
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, apol, nicolasfella, broulik, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17081
Summary: When a file share is received the share plugin does not detect that an empty file is being shared
Test Plan:
Send an empty file from android
The empty file should be created
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17175
Summary:
Add openFile to Share Plugin and extend handler to open local file urls
Future extension: Modify the desktop file to allow Open with > Open on connected device
Depends on D16605
Test Plan: Apply Android patch. Use kdeconnect-handler file:///somefile. Check phone for reaction
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: sredman, kdeconnect
Tags: #kde_connect
Maniphest Tasks: T8637
Differential Revision: https://phabricator.kde.org/D15294
Summary: This allows you to send a text string from qml, this can be used in the plasmoid and qml app.
Reviewers: nicolasfella
Reviewed By: nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16640
Summary: KDE Connect, now with correct naming!
Test Plan: It still builds.
Reviewers: #kde_connect, apol, nicolasfella
Reviewed By: #kde_connect, apol, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D11036
Summary:
QUrl constructor assumes the string passed is already encoded so we need
to pass it through setPath and QUrl::DecodedMode.
Test Plan: sent a file with a weird character
Reviewers: #kde_connect, jeanv
Reviewed By: jeanv
Differential Revision: https://phabricator.kde.org/D7224
Summary:
Don't use QDBusConnection::ExportAllContents
No need to make connect and receivedPackage public slots (they're are the
parent's already)
Fixes T4975
Test Plan: Rough manual test
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Maniphest Tasks: T4975
Differential Revision: https://phabricator.kde.org/D3871
Make the share received notification explicitly internal.
Fix runtime warning about how QUrl cannot be exported.
Notify about all shares, not exclusively transferred files.