Commit graph

125 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
Andreas Sturmlechner
79bc9a85e4 Cleanup all occurences of QT_MAJOR_VERSION in cmake
Follow-up to 7f03aa548c

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2023-12-28 17:49:07 +01: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
Alexander Lohnau
c5bfc4a5b0 Allow building against Qt6/KF6 2023-07-20 11:15:41 +03:00
Albert Vaca Cintora
22be63ae9e Remove compatibility with Qt < 5.15
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.
2023-07-18 20:13:27 +00: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
ivan tkachenko
53174acdf4 CMake: Bump minimum required version of ECM
Bump the required version of ECM to provide the ZSH install directory

See also: 232ed339c2
2022-12-06 22:09:59 +00:00
ivan tkachenko
232ed339c2
Install zsh completion files using new KDE_INSTALL_ZSHAUTOCOMPLETEDIR variable from ECM
Note: it uses the new variable KDE_INSTALL_ZSHAUTOCOMPLETEDIR, which is
to be added in ECM 5.101.

Read more: https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/310
2022-11-18 14:02:25 +03: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
Nicolas Fella
f7f3c01ec8 Use undeprecated install dirs
Using kde-dev-scripts/kf5/cmakelists_install_vars.pl
2022-04-21 00:50:14 +02: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
Nicolas Fella
79164ca8ba Replace manual include dir handling with interface target
We use kdeconnect-version.h in several places and therefore it needs to be in the include path. We currently do this by setting target_include_path in a few places. Replace this with an interface library that we can link against that sets up the correct include path. IMO it is cleaner this way.
2020-07-30 10:53:48 +02: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
f73ee46fca Improve zsh autocompletion
Main changes:
 - Allow grouping single-letter options (current single letter options
         are exclusive, but that might change in the future. Qt supports
         parsing such groups)
 - Allowing completions like "-d<id>" and "--device=<id>"
 - Make operations exclusive in completion (e.g. --ping and --ring can't
         be used at the same time)
2019-09-13 21:42:24 +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
d4026861ab Clean up includes 2019-04-30 19:03:24 +02:00
Matthijs Tijink
2c44f55f55 Add zsh autocomplete file 2019-04-12 16:20:15 +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