Commit graph

61 commits

Author SHA1 Message Date
David Redondo
45b1b27929 Generate wayland code with PRIVATE_CODE 2024-08-16 09:21:14 +00:00
ivan tkachenko
90946829bf
plasmoid: Basic code cleanup 2024-07-12 11:44:13 +03:00
Fabian Arndt
b24d629802 virtualmonitor: implemented capabilities check
BUG: 485829

## Summary

Currently, the plugin just fails silently if the local device is missing the `krfb` package or if the remote device misses an `vnc://` protocol/scheme handler. You click the button and nothing happens.

One issue is, that the plugin is considered `virtualmonitor.available` in the `DeviceDelegate.qml`, even if the check for `krfb-virtualmonitor` fails and no dbus-path is provided. I investigated the behavior a bit, but ignored it in the end as this MR benefits from being shown for device constellations that _could_ provide this feature.

A warning is shown with brief instructions, how to get the plugin working correctly.

- Check if krfb-virtualmonitor is available locally
- Check default scheme handler for vnc:// on device (Linux)
- Show warnings / reasons, if no connection could be established


## Test Plan

Regarding if the devices have mentioned packages installed, we should see different behaviors.

If the remote device has no VNC client, it can not connect to out server. _A warning should be shown._

If the local device hasn't the `krfb-virtualmonitor` available, the remote device couldn't connect. _A warning should be shown._

If both problems are present, _both warnings should be shown._


If none of these are present, no warning should be shown and we should try to establish a connection.


The connection attempts failed? _A warning should be shown._
2024-05-30 23:13:54 +00:00
Fabian Arndt
5d6d1791c8 Fixed typo 2024-05-07 01:20:13 +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
Aleix Pol
2bd8a00aaf declarative: Fix error message
There's no write property here, also print the actual error message.
2024-04-21 17:11:11 +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
88d89e7211 Use std::unique_ptr for pimpl classes
This is consistent with what we do in frameworks
2023-08-28 17:20:46 +00:00
Alexander Lohnau
46feeda0cb Remove unused default destructors
Overriding and defaulting them in the header doesn't make sense

For the dbus interfaces, we don't have any reasources to clean up or memory to be released. Meaning we can drop those lines too
2023-08-05 20:22:18 +00:00
Alexander Lohnau
2e67f95017 Add explicit moc includes to cpp files
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.
2023-07-30 07:27:45 +00:00
Alexander Lohnau
7b15a5eab7 Fix warnings about old style QML connections 2023-07-22 16:03:24 +02:00
Alexander Lohnau
131ed9a079 Port away from deprecated signal param injection 2023-07-20 11:16:04 +03:00
Albert Vaca Cintora
495e3019e4 Reduce number of optional dependencies
Change some optional dependencies from being optional to being mandatory
or being mandatory but behind on-by-default cmake flags. Eg: instead of
only compiling Wayland support if we find the appropriate libraries, we
always require the libraries unless the user specifies WITH_WAYLAND=OFF.

Optional libraries are hard to discover by packagers (since they don't
see an error once we add them) and create lots of possible build flavors
with a different features that can confuse users.
2023-07-19 17:08:03 +00: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
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
Aleix Pol
b61ba29673 remotekeyboard: Move workaround to the c++ side and make it more generic
The QKeyEvent::text we get from a Ctrl+W press is a weird unicode
charcater for ^W (see comment). We don't deal with that thing, create
the controlled letter using QKeySequence and move on.
2023-05-22 17:43:27 +00:00
Aleix Pol
9266556510 mousepad: Implement relative mouse movements
Somehow it wasn't done.
2023-05-12 15:48:25 +02:00
Dmytrii Zavalnyi
f82d15ce1e SMS app shows devices with SMS capabilities only
Replaced DevicesSortProxyModel with DevicesPluginFilterProxyModel with applied "kdeconnect_sms" filter for the devices list model.

BUG: 410112
2023-01-23 18:31:44 +01:00
Nicolas Fella
22cd3b1e5c Port pointer locking away from KWayland
Use QtWaylandScanner directly
2022-12-13 15:42:31 +00:00
Nicolas Fella
ed3ae873a7 Port to ecm_add_qml_module
Reduces some boilerplate
2022-09-28 16:13:37 +00:00
Kareem Abduljaleel
4ecf463cd1 [plasmoid] Add Photo to Plasmoid menu
Adds a menu entry to ask the remote device to take a photo to the Plasmoid menu
2022-09-28 13:03:48 +00:00
ivan tkachenko
4b6caf9af4
Port away from deprecated QML features 2022-09-21 01:14:37 +03:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
ivan tkachenko
abd088a375
Port Connections to function syntax 2022-08-16 22:58:45 +03:00
Nicolas Fella
ad01ef1695 Fix activating existing settings window on Wayland
Add the necessary bits for XDG activation to work

Move the code for launching the settings from the daemon to the respective processes so that we don't need to pass activation tokens over another process boundary
2022-07-06 12:55:39 +00:00
Aleix Pol
084bfebcc8 Introduce the VirtualMonitor plugin
It allows to use other paired devices as external displays
transparently.
2022-05-25 00:04:47 +02: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
Nicolas Fella
539d7a9072 Revert "Remove unneeded const_casts"
This reverts commit 9135ad06ea.
2021-10-27 23:11:53 +02:00
Nicolas Fella
774fe41da2 Revert "Pass QVariants by reference when possible"
This reverts commit c8c193690a.
2021-10-27 23:11:36 +02:00
Aleix Pol
c8c193690a Pass QVariants by reference when possible 2021-10-19 04:11:32 +02:00
Aleix Pol
9135ad06ea Remove unneeded const_casts
There is no reason to take the QDBusPendingCalls from the QVariant as
const and then cast them.
2021-10-19 04:09:01 +02:00
Piyush Aggarwal
2d674d8b04 pointerlockerqt: fix Lock button not reappearing after unlocking the pointer 2021-08-04 22:30:50 +00:00
Aleix Pol
cf8ada2b5d app: make it possible to lock the mouse when using the remote input
It makes it possible to use normal touchpads and mice
2021-07-30 23:25:30 +00:00
Nicolas Fella
dcda6b3cea Add support for generating qmltypes file 2021-05-09 19:34:22 +02:00
Nate Graham
b00acad77b Remove unused Plasma imports in RemoteKeyboard.qml 2021-04-15 12:58:17 -06:00
David Shlemayev
a75da62f4d Add backend for ConnectivityReport plugin 2021-03-12 23:27:16 +00:00
Nicolas Fella
8b82a30d40 CMake cleanup
Remove all include_directory calls

They are either unnecessary or can be done better
2020-11-16 12:21:07 +00:00
Nicolas Fella
400c800deb [app] Add plugin settings page
Include a page that allows (de)selecting and configuring plugins

This is one of the last missing pieces for feature parity with the KCM.
2020-09-08 20:33:20 +02:00
Nicolas Fella
f90d6a019f Rework the battery plugin
Instead of having the DBus stuff in a separate class expose the plugin class itself like we do for the other plugins.

Replace the method-based API with properties.

Change the path to <device>/battery for consistency with other plugins
2020-08-27 15:04:40 +00:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Aditya Mehra
cf2967b9af Add Bigscreen plugin with support for Bigscreen STT packet type 2020-05-23 22:10:24 +00:00
Nicolas Fella
4436536a6a Register interface factories as Singletons instead of context properties 2020-03-14 17:35:58 +01:00
Nicolas Fella
af94100952 Move QAbstractItemModel QML workaround to declarativeplugin 2020-03-14 16:44:24 +01:00
Yuri Chornoivan
01c4d0411b Fix minor EBN issues 2019-12-22 09:49:55 +02:00
Matthijs Tijink
ea29574c93 Fix QRC for plasmoid 2019-07-25 18:18:20 +00:00
Albert Vaca
43382ec7a7 Trying again to fix windows build 2019-07-23 22:47:09 +02:00
Albert Vaca Cintora
0254a0a15a Try to fix windows build 2019-07-23 01:03:20 +02:00
Albert Vaca Cintora
22795c1a14 Make qml apps run from build/bin 2019-07-23 00:41:43 +02:00
Albert Vaca Cintora
27d5fd0600 Bundle a QRC file instead of installing separate QML files 2019-07-23 00:40:25 +02:00