Commit graph

25 commits

Author SHA1 Message Date
Alexander Lohnau
02d97aabf4 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-28 16:07:34 +02:00
Albert Vaca Cintora
9c87393b28 clang-format pass 2023-07-16 16:20:34 +02:00
Albert Vaca Cintora
5d0df5d28e Do not send the sink list a thousand times
When a device is connected/disconnected those callbacks would fire a lot
2023-05-26 17:24:10 +00:00
Albert Vaca Cintora
92f0e467ae Compare strings like regular human beings 2023-05-26 17:24:10 +00:00
Albert Vaca Cintora
39050f9844 Do not prevent our own change notifications
In Linux we send them, and we actually rely on those on the Android app
for mute/unmute to update (although not for volume).
2023-05-26 17:24:10 +00:00
Albert Vaca Cintora
ab57796051 Do not leak strings 2023-05-26 17:24:10 +00:00
Albert Vaca Cintora
89dc4a8b76 Remove redundant check for old == new
Windows already does that for us and won't generate events in that case
2023-05-26 17:24:10 +00:00
Albert Vaca Cintora
e53e7bc600 Fix really terrible code 2023-05-26 17:24:10 +00:00
Albert Vaca Cintora
146b2d62e0 Release all the things 2023-05-26 17:24:10 +00:00
ValdikSS ValdikSS
2006424e21 Prevent null pointer dereference if there's no audio devices
BUG: 454917
2022-09-17 15:54:11 +03:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Piyush Aggarwal
a01af1b406 systemvolumeplugin: populate sink description with sink name when building with minGW32 2021-06-21 11:18:53 +05:30
Piyush Aggarwal
d37f4061c9 systemvolumeplugin_win: fix a desktop memory leak that occurs when sink list is open on Android app 2021-06-20 22:22:08 +05:30
Art Pinch
0c5e2c50e0 [SystemVolumePlugin][Windows] Support for changing default audio output from remote device 2021-02-19 18:59:06 +00:00
Art Pinch
dd49d79c2b [SystemVolumePlugin][Windows] Send data about default audio device 2021-02-19 18:59:06 +00:00
Art Pinch
8a5858a903 [SystemVolumePlugin][Windows] Fixed sink callback registration condition 2020-12-15 20:56:58 +00:00
Art Pinch
844d52f0a5 Fixed kdeconnectd deadlock on Windows caused by systemvolumeplugin
IAudioEndpointVolumeCallback::Release was called in callback functions of IMMNotificationClient (through the call to SystemvolumePlugin::sendSinkList), however https://docs.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nn-mmdeviceapi-immnotificationclient points out that:
*To avoid dead locks, the client should never call IMMDeviceEnumerator::RegisterEndpointNotificationCallback or IMMDeviceEnumerator::UnregisterEndpointNotificationCallback in its implementation of IMMNotificationClient methods.
*The client should never release the final reference on an MMDevice API object during an event callback.

So I moved that part of code to another thread so it will successfully run after callback functions work out and call only if endpoint needs to be released (device was removed), so it won't spawn new thread for every generated event
2020-11-19 23:28:44 +03:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +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
Nicolas Fella
5c16bfda5d Use K_PLUGIN_CLASS_WITH_JSON 2019-06-12 22:16:54 +02:00
Nicolas Fella
e601755644 Force usage of QStringLiteral and port remaining offenders 2019-06-10 14:40:28 +00:00
Nicolas Fella
595e8d9a35 Add Macro for MinGW and fix GUID Macro Fix for Windows building 2019-05-01 00:21:19 +02:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Nicolas Fella
2f6f4d9d65 Add license header 2019-02-03 01:50:36 +01:00
Jun Bo Bi
929fd062f2 Added Windows support to systemvolume plugin
Summary: I've added Windows support to the systemvolume plugin.

Test Plan: Move the volume sliders in the Android app

Reviewers: kdeconnect, #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect, #windows

Maniphest Tasks: T10000

Differential Revision: https://phabricator.kde.org/D16936
2018-11-20 01:15:10 +01:00