Commit graph

38 commits

Author SHA1 Message Date
Nicolas Fella
a40b694b5c Enable KCrash for all executables
(cherry picked from commit 75bd1c694e)
2024-08-01 13:27:55 +02:00
Mavroudis Chatzilazaridis
6702190811 urlhandler: Fix devicePicker selection with --device
When using 'Send a file/URL' in the indicator with multiple devices, the
device the user selects for file sharing is not automatically selected in
the URL handler dialog that follows.

This happens because `model.rowForDevice(deviceId)` is called without
waiting for the model to be populated, always returning -1.

Resolving this exposed another bug, where the selected device was still
not the one picked. This happens because `proxyModel` is used to fill the
`QComboBox` but `model` is used to find the correct index. Since
`DevicesPluginFilterProxyModel` sorts and filters the data from `model`
the indices do not match.

This commit addresses these issues by deferring the device selection until
data is available and implementing `rowForDevice` for filtered/sorted data
in `DevicesPluginFilterProxyModel`.
2024-05-20 09:56:03 +00:00
Aleix Pol
5921ab6f2a Drop Qt5-only code branches 2024-04-27 17:46:39 +02: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
Gary Wang
459187f8ed Select sendFileRadioButton when dropping a file:// scheme url 2023-04-08 15:59:19 +00:00
Nicolas Fella
5fb7996d6a [handler] Fix desktop file name
BUG: 461764
2022-11-13 16:41:17 +01:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00: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
Nicolas Fella
12d8adef76 Enable highdpi for all executables 2022-04-02 14:32:54 +02:00
Nicolas Fella
83f8b1ceba [handler] Enable highdpi pixmaps 2021-10-11 18:23:42 +02:00
Piyush Aggarwal
ea8ed5c427 kdeconnect-handler: auto select the sendFile radio button if url is actually a local file 2021-07-03 04:23:55 +05:30
Piyush Aggarwal
9e0741c7a7 urlhandler: add 'device' optional arg 2021-06-17 15:03:21 +00:00
Piyush Aggarwal
82c7a8080d add KColorSchemeManager instance to install auto dark theme on Windows 2021-06-13 13:51:28 +05:30
Piyush Aggarwal
2a7ed030dc urlhandler: add custom icons to exec and trigger kiconloader 2021-06-12 05:01:47 +05:30
Piyush Aggarwal
25cb6c9096 urlhandler: make it a unique service 2021-06-11 23:45:39 +05:30
Piyush Aggarwal
02ed0699ff set app style to breeze explicitly on Windows 2021-06-03 03:15:35 +05:30
Piyush Aggarwal
2bf82b1029 revamp kdeconnect-handler to support full control by GUI
Current implementation of kdeconnect-handler did not support controlling the function of kdeconnect-handler completely through GUI.
This patch enables that by adding knobs to the GUI and doing necessary changes to the cpp.
2021-06-02 05:37:44 +05:30
Piyush Aggarwal
d773959a5d remove hardcoded window icon path in favour of fromTheme call 2021-05-23 10:42:29 +05:30
Piyush Aggarwal
101bda832d setWindowIcon: add fallback window icons 2020-11-11 17:28:37 +05:30
Nicolas Fella
a600c27490 Set window icons for GUI executables
Otherwise the task bar entry on Gnome won't have an icon.
2020-10-24 22:21:23 +02:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Michael Staggs
667988ec72 T12394 Improve SMS URI display in kdeconnect-handler 2020-02-07 11:02:28 +00:00
Laurent Montel
0f707cc709 It alreadys added by kaboutdata 2020-01-12 14:46:21 +01:00
Nicolas Fella
0d7c504cf0 Rename DbusHelper => DBusHelper 2019-08-14 17:36:19 +02:00
Nicolas Fella
e883a792e6 Add ProxyModel for filtering for plugins 2019-07-21 15:51:13 +00:00
Nicolas Fella
788563302f Assume local file in handler url 2019-06-14 21:56:26 +02:00
Nicolas Fella
79b42ff80c Fix open/send text in handler 2019-06-14 21:56:06 +02:00
Nicolas Fella
9fd81e11cb Remove trailing whitespace 2019-06-14 21:55:55 +02: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
3ec577932d [handler] Enable sharing relative URLs 2019-05-20 22:19:43 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Albert Vaca
80395d4ca6 Missing Q_OBJECT macro 2018-11-06 23:28:25 +01:00
Nicolas Fella
ccd476c150 Add open on remote device (Desktop)
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
2018-11-04 19:55:30 +01:00
Nicolas Fella
193481ce46 [handler] Embed URL into string
Summary:
E.g.
Device to call +1234567 with
Device to send /home/nico/foo to
Device to open http://google.com on

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16623
2018-11-03 01:37:01 +01:00
Nicolas Fella
357751ac68 [handler] Improve text if a file is shared
Summary:
The handler allows to easily integrate file sharing into various file managers. Make it appear nicer by removing the scheme and using a different wording when sending
files

Test Plan: {F6382616}

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16605
2018-11-03 00:40:34 +01:00
Kai Uwe Broulik
686e3f98a9 [URL Handler] Special-case label for phone URLs
It's a lot nicer than "sending a URL"

Differential Revision: https://phabricator.kde.org/D10069
2018-01-25 10:25:57 +01:00
Aleix Pol
077bed106f Introduce a URL handler and offer handling tel:/// urls
Summary: Makes it possible to handle tel urls with any KDE Connect device

Test Plan: Manual testing

Reviewers: #kde_connect, albertvaka, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D6120
2017-06-09 13:42:16 +02:00