Commit graph

41 commits

Author SHA1 Message Date
Alexander Lohnau
dd5e61ab0a KdeConnectKcm: Do not make generated UI class instance a ptr 2023-07-30 07:27:45 +00:00
Alexander Lohnau
52b6d57942 Qt6 build fixes in plugins and KCM 2023-07-20 11:15:46 +03:00
Albert Vaca Cintora
9c87393b28 clang-format pass 2023-07-16 16:20:34 +02:00
Albert Vaca Cintora
981796ed66 Fix KCM reloading the plugins N times when a device was selcted
Every time a device is selected, `pluginsConfigChanged` would trigger even
if no plugins actually changed (there's a boolean to distinghish that on
the signal that we were ignoring). On top of that, we were connecting to
the signal again each time we selected a device, causing this bug to
trigger N+1 times every time a device was selected.

This is bad because `pluginsConfigChanged` would reload all the plugins,
which for some plugins even implies network calls to the connected device.
2023-06-24 17:45:48 +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
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Jean Vincent
72535ecf48 Make member variable names, & placement and * placement more coherent
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.

Basically:
 - mFoo -> m_foo
 - foo -> m_foo (if it is a member variable)
 - Type &ref -> Type& ref
 - Type *ptr -> Type* ptr

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, nicolasfella, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7312
2017-09-03 21:45:08 +02:00
Aleix Pol
f65392ca6b Expose pair requests on the KCM 2017-02-20 21:00:26 +01:00
Aleix Pol
b947ef6b60 Use asynchronous calls to the device interface when possible
Summary:
Use setWhenAvailable for isTrusted calls
Just deal with the pairing buttons state only once.
Unify semantics (paired vs trusted)

Reviewers: albertvaka, #kde_connect

Reviewed By: albertvaka, #kde_connect

Differential Revision: https://phabricator.kde.org/D4125
2017-01-13 18:36:43 +01:00
Aleix Pol
81634303b2 Make capabilities static
As discussed with Albert, move the population of capabilities into the
identity package, making them static along the execution of the link.

When we receive the identityPackage, we collect the plugins we can use with
the device and stick to those. This should simplify the implementation and
remove the possibility to lose packages if packages are received before the
capabilities are processed in the former approach.

REVIEW: 128386
2016-07-06 17:37:22 +02:00
Aleix Pol
596e4484f4 Clean up use of virtual and override keywords
Only use virtual when actually virtual, to override just use override.
2016-06-20 19:22:29 +02:00
Albert Vaca
1848e96a91 Fixed old signal name 2015-12-17 05:54:37 -08:00
Aleix Pol
2707d1f0a8 Fix reload when changing current device on the kcm 2015-09-12 19:43:15 +02:00
Aleix Pol
fe2679a8a5 Prevent the kcm from refreshing the UI while interacting with it
Only refresh it when the available plugins actually change.
2015-09-12 15:02:59 +02:00
Aleix Pol
a0da8ba858 Let the KPluginSelector react to changes in the plugin configuration
Mainly whenever the remote capabilities change.

Reviewed by The Vaca Man
2015-09-08 20:03:44 +02:00
Aleix Pol
b592dc99a0 Merge pairingSuccessful and unpaired signals into pairingChanged(bool)
REVIEW: 124067
2015-06-11 16:19:00 +02:00
Albert Vaca
b0cc45b52a You can now change your name (the one seen by other devices on the network) 2015-03-01 21:23:05 -08:00
Albert Vaca
c7c91c1289 Added KdeConnectConfig class that aims to be a KConfig abstraction
Benefits:
- We had config files in different paths, now they will be centralized.
- Daemon, LanLinkProvider and NetworkPackage depend only on Qt now.
- KConfig is accessed with strings as keys, where a typo can go unnoticed.
- Daemon is now thinner, as it doesn't need to initialize config values.
- QCA::Initializer is in a single place now (was in Daemon and Plugin).
2015-03-01 20:16:07 -08:00
Albert Vaca
7591e783ca Implemented sizeHint for KCM, so it doesn't open in a super small window 2015-03-01 16:09:42 -08:00
Albert Vaca
e809fa441c Added a refresh button to KCM, just in case.
We already have a refresh button on Android.
2014-08-11 18:57:49 +02:00
Alexandr Akulich
f8fe1f3f6c kcm: Added DevicesModel declaration to move it's definition to implementation. 2014-06-14 13:06:12 +02:00
Albert Vaca
4dcbb3531a Remove the browse filesystem button from KCM 2014-04-05 20:05:22 +02:00
Samoilenko Yuri
e74627ce15 dirty kcm integration 2014-01-07 01:01:21 +04:00
Albert Vaca
2054288cac KCM updated when pairing state changes externally
Added an unpaired() signal to KDED's Device exported by dbus
2013-10-01 03:20:07 +02:00
Albert Vaca
8309879a19 Removed unused add device wizzard 2013-09-04 19:37:58 +02:00
Albert Vaca
1604309ace Added symmetric pairing
A KNotification asks to accept the pairing when the other ends requests it
2013-08-30 19:10:43 +02:00
Albert Vaca
1cb1b26415 Moved DevicesModel and DBusInterfaces to libkdeconnect
Added NotificationsModel to libkdeconnect
2013-08-21 18:25:44 +02:00
Albert Vaca
d1658564f9 Sort devices by status in KCM.
Some coded added to keep the current selection when reordering.
2013-08-16 00:25:13 +02:00
Albert Vaca
88fab1f333 Plugins are now owned by devices and not by daemon
Plugins can no longer emit networkpackages for *every* device.
Plugins are stored in device, wich selectively loads them.
A Device is needed in order to instantiate a Plugin (via PluginLoader)
PluginLoader is a singleton, because every instance of Device need it.
Added KPluginSelector in the KCM to select the plugins to load.
Added architecture explanation to README

Only PingPlugin is working by now.
2013-08-13 05:07:32 +02:00
Albert Vaca
54de8fa2fa Android: Uses Apache Mina to abstract socket management
KDE: Housekeeping
2013-07-24 18:42:33 +02:00
Albert Vaca
975892dcd0 Yet another refactor, mostly moving code from from daemon class to device class
Device now has a public dbus interface
Removed wizard from kcm: now the main list shows all the devices and you can pair/unpair using a checkbox
Both Kde and Android now use unique device ids
2013-07-03 03:52:44 +02:00
Albert Vaca
213e8ea9ad Fixed android app bug 2013-07-02 15:22:05 +02:00
Albert Vaca
5fbd33e8c5 Implemented communication wizard -> kcm
Renamed androidshine -> kdeconnect
2013-07-02 01:50:32 +02:00
Albert Vaca
5027b7ee8e Device listing in kcm 2013-06-27 14:33:51 +02:00
Albert Vaca
1f536de7e9 Started wizzard implementation 2013-06-27 02:13:16 +02:00
Albert Vaca
800de8836f DBus communication working 2013-06-25 21:19:17 +02:00
Albert Vaca
df12667f10 Fixed cmake build 2013-06-25 18:43:54 +02:00
Albert Vaca
3ff7779c7c Ooops 2013-06-25 18:08:34 +02:00
Albert Vaca
6e53c5b9c7 KCM skeleton 2013-06-19 16:15:25 +02:00