Commit graph

110 commits

Author SHA1 Message Date
Nicolas Fella
75bd1c694e Enable KCrash for all executables 2024-08-01 11:23:02 +00:00
Aleix Pol
a0d93fa537 Make sure we are not using deprecated APIs
Bumps the deprecation values in line with the APIs we depend on.
2024-04-27 17:47:29 +02:00
Albert Vaca Cintora
cdcf44efa8 Remove photo plugin
As discussed in Matrix and BUG: 474121 this plugin is confusing (because
it doesn't actually take a photo, it just launches the camera on your
phone) and its use case can be covered by taking a photo and sharing it,
which only requires a couple extra clicks.
2023-09-15 23:04:17 +00:00
Alexander Lohnau
cfde9ced77 Also use QLatin1String::arg in remaining places
This is more readable, slightly faster at runtime and results in a slightly smaller binary size
2023-08-28 17:20:46 +00:00
Albert Vaca Cintora
132ae2ca7c Remove unused stuff 2023-08-28 18:48:04 +02:00
Alexander Lohnau
e598a997e7 Use initializer list syntax where appropiate 2023-08-07 19:28:37 +02:00
Albert Vaca Cintora
cc648ecc77 Add some error checking to cli --share 2023-07-16 16:51:28 +02:00
Albert Vaca Cintora
144a60b58a Allow disabling clipboard auto-share and add option to share manually
Continues the work started in !396 by rebasing it onto latest master and
making the "send clipboard" button from the plasmoid invisible when
automatic syncing is enabled.
    
I didn't find a way to do the same in kdeconnect-indicator and
kdeconnect-app (why do we have 3 UIs???), so in those we always show the
option for now.
2023-06-07 19:48:25 +00:00
Albert Vaca Cintora
064ddfa3fe Refactor PairingHandler
We now have a single PairingHandler for all types of links.

The implementation now is more aligned with the one for Android.
2023-06-02 16:38:52 +00:00
Simon Redman
8cfa308140 Fix some Qt and KF5 deprecation warnings
## Summary

Fixes a few warnings about deprecated fields and methods.

## Test Plan

Things still seem to be basically working 🤷
2022-10-17 21:17:49 +00:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Kareem Abduljaleel
186526c0bb [Photo Plugin] Make photo plugin use QUrl instead of a local path
This is a companion merge request for !476,

this way it can be accessed directly from QML's FileDialog
2022-09-02 17:32:01 +00:00
Adam Fontenot
e703b8b6b5 Only show paired, reachable devices in CLI with -a
The help text indicates that the -a flag for
kdeconnect-cli is supposed to list available devices,
i.e. devices that are both paired and reachable.

Prior to this change, devices are only filtered on
reachability when the flag is passed.

BUG: 442571
2022-07-06 03:50:31 -07:00
Weixuan Xiao
f1843cb492 Improve D-Bus implementation on macOS
Better patch to replace !218.

- Auto and quick detection of previous D-Bus instance;
- Remove private D-Bus compile definition, only use it on macOS without an existing D-Bus instance;
- Safe reboot after crashes because the indicator is not relating on the kdeconnectd to run a D-Bus session;
- Safe exit after clicking on `Quit` in the systray.


More details in commit logs:

Only enable private D-Bus on macOS because the other platforms do not
need them.
The app should be able to easily detect the session bus from the env
DBUS_LAUNCHD_SESSION_BUS_SOCKET from launchd through launchctl.
Because https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-sysdeps-unix.c#L4392
shows that it is the only probing method on macOS with launchd.

The D-Bus session bus can be easily found from launchd/launchctl
with DBUS_LAUNCHD_SESSION_BUS_SOCKET env. It can be an external one
(installed from HomeBrew) or an internal one (launched by a previous
instance followed by a crash).

The indicator helper on macOS can now automatically detect whether we can use a potentially
(with launchd/launchctl env set, or KDE Connect macOS
private_bus_address set) existed and usable session bus.
If previous bus is usable, just try to launch the kdeconnectd with us.
Otherwise, launch a private D-Bus daemon, export the launchd/launchctl
env, and run a kdeconnectd instance.

Everything works better and quicker now :)
2022-04-12 05:40:03 +00:00
Marco Rubin
ea661f7d44 Added missing endline 2021-02-05 18:09:56 +00:00
Florian Bruhin
469e18596f cli: Make it clearer that --share can share URLs 2020-12-02 15:43:09 +01:00
Piyush Aggarwal
b272ab86b3 lockdeviceplugin: make plugin useful through CLI by --lock and --unlock 2020-11-23 21:22:46 +00:00
Matthijs Tijink
9d503bc893 Fix passing multiple attachments to the CLI
Also updated the related zsh autocompletion.
2020-10-31 14:02:58 +00:00
Simon Redman
a1ebbdfc09 [CLI] Use ConversationsDbusInterface to avoid problems with using raw dbus 2020-10-10 22:11:05 +00:00
Aniket Kumar
706fc314fb Adding support to send attachments to the remote device. 2020-08-31 15:35:25 +05:30
Aniket Kumar
f778fc932c Updated kdeconnect-cli send-sms message to adapt sendSms interfce changes. This patch fixes the BUG: 425731 2020-08-28 11:53:50 +00:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Matthijs Tijink
c6f83e5c16 CLI improvements for Qt 5.14+
Qt 5.14 adds a "--help-all" option, so include it in the autocompletion.
Qt 5.14 also warns on multiple additions of the same option, which we
accidently did (KAboutData and we ourselves called it), so don't do
that.
Also fixes device autocompletion, which I accidently broke.
2020-01-07 20:49:03 +00:00
Jaidev Shriram
2abeb42a70 CLI Text Improvements 2019-12-21 23:37:29 +00:00
Matthijs Tijink
656dab4a3f Show a message when no device id's can be autocompleted in zsh 2019-09-13 21:43:15 +02:00
Matthijs Tijink
fb174b23e3 Make the cli's --photo option take arguments
Also update the related zsh autocompletion.
2019-09-13 16:11:16 +00:00
Nicolas Fella
c8c82e01a7 [cli] Warn user if specified device id doesn't exist 2019-09-10 16:09:06 +00:00
Nicolas Fella
01fa989786 Fix photo plugin cli 2019-09-10 16:08:53 +00:00
Nicolas Fella
0d7c504cf0 Rename DbusHelper => DBusHelper 2019-08-14 17:36:19 +02:00
Matthijs Tijink
d9b5a4ce91 Hide the "shell-device-autocompletion" option without deprecation 2019-07-19 20:11:49 +00:00
Nicolas Fella
e601755644 Force usage of QStringLiteral and port remaining offenders 2019-06-10 14:40:28 +00:00
Weixuan Xiao
5431073844 Add wrapper for macos dbus connection 2019-06-09 15:28:49 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Albert Vaca Cintora
d72e4a1131 Fix build on CI for Windows 2019-03-14 12:37:16 +01:00
Matthijs Tijink
f5724f7e7c Add zsh device autocompletion helper 2019-03-13 19:58:28 +00:00
Nicolas Fella
399bed641f Fix sending keys via CLI 2019-03-10 12:59:31 +00:00
Nicolas Fella
dbccc641ed Add plugin for taking photos on remote device
Summary: This plugin sends a request for a photo to the connected device. The device then sends the photo back, currently via the SharePlugin.

Test Plan:
kdeconnect-cli --photo
Check for photo in Downlaods folder

Reviewers: #kde_connect, broulik, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: sredman, albertvaka, apol, ngraham, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D18140
2019-03-04 23:57:08 +01:00
Nicolas Fella
b7768ca29f Add context object 2019-02-28 14:18:47 +01:00
Nicolas Fella
6262c09de8 [cli] Show all reachable devices
Summary:
Devices that were reachable but not paired were not shown. This makes it impossible to initiate paring

BUG: 402088

Test Plan:
Have a unpaired device reachable. Without the patch kdeconnect-cli -l does not show it. With the patch it is shown

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17788
2018-12-25 01:38:17 +01:00
Billy Laws
86e5cd48a0 Suppoer sharing text from kdeconnect-cli
Summary:
Can be used with the share-text argument like
kdeconnect-cli -d adsjsakldsjsa --share-text "hello"

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17242
2018-12-07 18:06:44 +00:00
Erik Duisters
b6c15289f5 Combine multiple upload jobs into a single KCompositeJob so only 1 notification will be shown
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
2018-11-30 08:26:00 +01:00
Nicolas Fella
bd17dc2041 Fix container detach warnings from clazy
Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17164
2018-11-26 13:21:39 +01:00
Nicolas Fella
7a4bdcc62d [cli] Allow sharing files and URLs together
Summary:
Depends on D15787

Restricting sharing multiple urls to files seems unnecessary to me.

Test Plan: kdeconnect-cli --share foo.txt google.com

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15788
2018-09-28 15:13:05 +02:00
Nicolas Fella
518251342c [cli] Always take working dir into account when parsing url
Summary:
Bug: 399115

When using kdeconnect-cli --share the first argument was not recognised as a file when a relative path was specified.

Test Plan:
kdeconnect-cli --share File1.txt File2.txt : Check that both files are sent
kdeconnect-cli --sahre phabricator.kde.org : Check that web page is opend

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15787
2018-09-28 15:12:29 +02:00
Thomas Surrel
5ae67e0feb [CLI] Unpair unreachable devices
Summary: You should be ableto unpair unreachable devices with the CLI

Reviewers: kdeconnect, albertvaka

Reviewed By: albertvaka

Subscribers: albertvaka

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15677
2018-09-24 15:59:08 +02:00
Simon Redman
bcc9fb06db Split SMS and Telephony plugin on desktop
Summary:
Telephony and SMS handling are quite distinct so they should be in separate plugins for better maintainability, given that @sredman has big plans with SMS.
This diff should be fully backwards compatible, but whether we really want to do that is up to discussion

Test Plan: Only supeficially tested. Receive an SMS (old way), Notification is shown

Reviewers: #kde_connect, sredman

Reviewed By: sredman

Subscribers: albertvaka, apol, sredman, kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D13594
2018-09-10 11:31:05 +02:00
Aleix Pol
95dd01b818 Fix comment 2018-06-08 20:23:18 +02:00
Matthijs Tijink
cc072e4a2c Add more scripting helpers to cli command
Summary:
Adds "--name-only" and "--id-name-only", in addition to the already existing "--id-only".

This is useful for the zsh autocompletion which I've written.

Test Plan: The output is identical without the new flags.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Differential Revision: https://phabricator.kde.org/D10875
2018-02-27 17:46:55 +01:00
Albert Vaca
3a955f0ced Allow sharing more than one file
Eg: --share *.mp3
2018-02-17 15:14:11 +01:00
Matthijs Tijink
6a6b97e7c9 Fix kdeconnect-cli device list
Summary:
Previously, the .devices() call passed the parameters in the wrong order. I checked the order in the interface and the daemon, and this was the only place it went wrong.

Now running `kdeconnect-cli -l` correctly lists all paired devices, even if unreachable.

Test Plan: Tested with both a reachable and unreachable device.

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol

Differential Revision: https://phabricator.kde.org/D9060
2017-12-03 19:29:05 +01:00