Commit graph

195 commits

Author SHA1 Message Date
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Laurent Montel
ba69e4a05a Remove extra ';' 2022-06-23 06:47:52 +02: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
8010739a8a [smsapp] Refactor and fix argument handling
Use a singleton instead of context properties for data handling

Fix passing initial message

Make device menu creation more declarative

Fix initial device handling

Update current device when new instance with initial device is requested
2022-05-23 22:10:07 +00: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
Laurent Montel
6957b6aa39 GIT_SILENT: add missing override 2021-10-27 06:53:06 +02:00
Nicolas Fella
eb5bd219f2 [interfaces] Make KConfig linkage public
It is used in a header so consumers need to link it too
2021-04-05 23:02:23 +02:00
David Shlemayev
a75da62f4d Add backend for ConnectivityReport plugin 2021-03-12 23:27:16 +00:00
Nicolas Fella
44a7fc226f Remove dead files 2021-02-27 20:06:10 +01:00
Bharadwaj Raju
ffdbd9aefe Fix notifications in the KDE Connect plasmoid
Corrects the DBus path to use for notifications, so now notifications
appear in the KDE Connect plasmoid as they should.

BUG: 432337
2021-01-31 18:57:12 +05:30
Jason Nader
b5ac96ce5b
plugins/battery: add battery charge info to the update signal 2020-12-13 21:28:23 +09:00
Nicolas Fella
473b1f07c3 [app] Improve plugin config delegates
Add description and make them more consistent with other list items in
KDE.
2020-11-16 12:21:47 +00:00
Nicolas Fella
753b1a2b0c Constify variable 2020-11-16 12:21:47 +00:00
Nicolas Fella
8be089472f Port plugin model away from KPluginInfo 2020-11-16 12:21:47 +00:00
Nicolas Fella
4439e7c662 [plugins/notifications] Merge notificationsdbusinterface and notificationsplugin
We can just expose the plugin itself to DBus like we do for all other plugins.
This way we don't need a separate adaptor class any more.
2020-10-18 21:42:06 +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
Aniket Kumar
706fc314fb Adding support to send attachments to the remote device. 2020-08-31 15:35:25 +05:30
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
Richard Liebscher
8d16d05c8a Custom devices 2020-08-18 21:55:24 +02:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Nicolas Fella
950366092b Remove modeltest
It's only a development tool and there's a more modern alternative: https://doc.qt.io/qt-5/qabstractitemmodeltester.html
2020-08-14 14:01:19 +02:00
Aniket Kumar
0b3d6bee85 Implementing Attachment class and adding support to display the thumbnails of attachments in QML. 2020-08-10 00:46:30 +05:30
Nicolas Fella
01440f728d Remove unused toVariant methods 2020-08-07 21:23:10 +00:00
Nicolas Fella
5657547179 [app/volume] Use property setter 2020-08-07 00:08:31 +02:00
Richard Liebscher
2d523f0b8a Editable volume and mute state in RemoteSinksModel 2020-08-06 21:15:51 +00:00
Nicolas Fella
8f41be36dc Remove unneeded destructor/copy constructor/copy assignment operator
We don't have a custom destructor and the copy ctor/assignment operator don't do anything special, so the default one will do the right thing.

This is in accordance with the rule of zero (https://cpppatterns.com/patterns/rule-of-zero.html)
2020-07-29 17:30:29 +02:00
Nicolas Fella
1bd59787e2 [sms] Change address type in DBus API from variant to variantlist
While mostly theoretical it makes for a more expressive API since it communicates that it is a list instead of a single value. It also allows to get rid of some conversion code.

This is also preparation work for potentially using the custom type capabilities that QtDBus offers.
2020-07-29 15:18:19 +00:00
Antonio Larrosa
1d36164230 Use ecm_qt_declare_logging_category to declare the logging categories
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.
2020-05-26 18:55:47 +02:00
Aditya Mehra
cf2967b9af Add Bigscreen plugin with support for Bigscreen STT packet type 2020-05-23 22:10:24 +00:00
Aniket Kumar
d0367f11fb Removing earlier hack to pass an address as a string instead of ConversationAdress type. 2020-05-18 08:11:26 +05:30
Abdel-Rahman Abdel-Rahman
d3062cafd4 Receive SMS subscription ID and reply using it
This interprets the "sub_id" field to use it later for replying in
order to reply to SMS messages from the same SIM.
2020-04-07 20:01:18 +00:00
Richard Liebscher
bb5539c8c3 Make plugins work in SailfishConnect 2020-03-01 20:00:40 +00:00
Nicolas Fella
8620db19ba Remove usused includes 2020-01-20 17:45:36 +01:00
Richard Liebscher
b61cf6b28c Build DBus interfaces library for SailfishConnect 2020-01-06 19:28:36 +00:00
Yuri Chornoivan
01c4d0411b Fix minor EBN issues 2019-12-22 09:49:55 +02:00
Yuri Chornoivan
7935cc15c8 Fix i18n: extract messages 2019-12-21 16:16:33 +02:00
Nicolas Fella
b407571ef1 Fix coding style 2019-10-20 01:49:14 +02:00
Nicolas Fella
0d7c504cf0 Rename DbusHelper => DBusHelper 2019-08-14 17:36:19 +02:00
Nicolas Fella
c64058132b Fix printing DBus error 2019-08-14 17:24:51 +02:00
Nicolas Fella
607b9a6566 Revert "Use ecm_qt_declare_logging_category"
It's missing stuff to work properly. Revert until I figured that out

This reverts commit 8a118a6fae.
2019-07-22 21:29:54 +02:00
Aleix Pol
c17972881b sms: Added opening kdeconnect-sms on the plasmoid and indicator
Add a menu entry on the kdeconnect-indicator within devices' submenu that opens kdeconnect-sms.
Also add it in the plasmoid in the device delegate.
2019-07-21 18:30:41 +02:00
Nicolas Fella
e883a792e6 Add ProxyModel for filtering for plugins 2019-07-21 15:51:13 +00:00
Simon Redman
edee0e0e9d [SMS App] Handle addresses for multitarget messages
## Summary

Upgrade the SMS App to handle multitarget addresses in the "addresses" field of a message and drop usage of the "address" field

Also note that this has all the commits from https://invent.kde.org/kde/kdeconnect-kde/merge_requests/97, but I will rebase those away once that patch is landed

Bonus: Image composition for multitarget conversations

## Test Plan
- Apply Android-side patch https://invent.kde.org/kde/kdeconnect-android/merge_requests/80
- Launch SMS App
- Notice that you can see all the recipients of multitarget messages. (Replying still not supported, but might get implemented as part of fixing replying to single-target messages)
2019-07-19 17:33:15 +00:00
Simon Redman
ee9547ed89 [SMS App] Basic plain-text MMS support
## Summary

Desktop companion to https://invent.kde.org/kde/kdeconnect-android/merge_requests/78

Give desktop SMS app a basic understanding of the MMSes coming from Android:
- Show a fake body if we get an attachment we can't display (for now, any attachment)
- Display a fake contact header for multi-target messages since Android does not yet export multi-target address information
- Disable attempting to reply to multi-target messages

BUG: 398889

## Test Plan
### Before:
MMS messages were silently dropped, meaning:
 - Group MMS conversations were not visible
 - Single-target conversations with the most-recent message an MMS were not visible

### After:
 - Install https://invent.kde.org/kde/kdeconnect-android/merge_requests/78
 - Multi-target conversations are displayed (kind of ugly, since they have no contact information
 - Single-target conversations which end with an MMS are displayed
 - Plain-text MMS is displayed nicely
 - MMS attachments don't show
   - MMS which are only an attachment with no body are displayed with a dummy body
2019-07-19 15:29:28 +00:00
Nicolas Fella
749dcfa148 [app/mpris] Support non-seekable players 2019-07-17 21:19:53 +00:00
Nicolas Fella
8a118a6fae Use ecm_qt_declare_logging_category 2019-06-13 00:15:12 +02:00
Nicolas Fella
8507771d75 Remove more 2019-06-12 23:28:56 +02:00
Nicolas Fella
1f8758a3ef Reduce interfaces include dirs 2019-06-12 23:21:03 +02:00
Nicolas Fella
05ac9fa0fe Remove more unused cmake 2019-06-12 22:50:41 +02:00