Commit graph

230 commits

Author SHA1 Message Date
Albert Vaca Cintora
bbcbec7709 Refactor macOS startup code
Moves all the stuff that is needed to start DBus on macOS (which for some reason it needs several steps, involving the use of `launchctl`) into a single `startDBusDaemon()` function. Before, it was spread into `kdeconnectconfig.cpp`, `indicatorhelper_mac.cpp` and `dbushelper.cpp`.

It also removes checking for an existing DBus daemon and always starts our own, since in most cases we couldn't connect to it anyway. This, together with removing the sleep in the retries when polling for the DBus daemon from 3s to 100ms, makes the startup much faster, so I removed the loading splash screen.
2024-09-21 09:27:24 +00:00
Albert Vaca Cintora
760bd5a437
Revert "macOS: launch kdeconnectd with start instead of startDetached"
It breaks the start for some reason.

This reverts commit 2c572cf32c.
2024-09-13 15:39:35 +02:00
Albert Vaca Cintora
5af9a33710
Fix MacOS build by adding a bluetooth usage description 2024-09-12 16:18:22 +02:00
Albert Vaca Cintora
2c572cf32c
macOS: launch kdeconnectd with start instead of startDetached 2024-09-12 16:18:22 +02:00
Albert Vaca Cintora
04865224cd
Removed unused var 2024-09-10 10:54:30 +02:00
Albert Vaca Cintora
02ff5bd6c5
Handle dbus errors in setWhenAvailable 2024-09-09 13:31:31 +02:00
l10n daemon script
e3f2e0dc75 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-11 01:22:18 +00:00
Nicolas Fella
75bd1c694e Enable KCrash for all executables 2024-08-01 11:23:02 +00:00
Joëlle van Essen
61e7d8f2f3 indicator: Simplify sending files from systray icon
Implements https://invent.kde.org/network/kdeconnect-meta/-/issues/10
2024-07-22 22:24:53 +00:00
l10n daemon script
aa009cfd85 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-06-09 01:17:55 +00:00
Mavroudis Chatzilazaridis
29904c1f8d indicator: Sort devices in menu
Use `DevicesSortProxyModel` to sort devices before adding them to `menu`.
2024-06-03 12:42:14 +00:00
l10n daemon script
cd22528bab SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-05-04 01:21:06 +00:00
Aleix Pol
5921ab6f2a Drop Qt5-only code branches 2024-04-27 17:46:39 +02:00
Albert Vaca Cintora
e04c43882c Don't install kdeconnectd in libexec
Few programs use libexec so it's not well known and there's no real
reason to "hide" our daemon binary in case somebody wants to run it
manually.
2024-03-06 22:18:59 +00:00
l10n daemon script
9e699c3e54 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-29 01:11:56 +00:00
l10n daemon script
59dd54a115 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-15 01:13:08 +00: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
Alexander Lohnau
dc8f3e209e Reformat project with clang-format 2023-12-02 14:56:20 +01:00
l10n daemon script
d3c2d52c3b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-11-07 02:12:13 +00:00
l10n daemon script
4b1b1b9b14 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-11-04 11:52:33 +00:00
l10n daemon script
acdd83e100 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-10-21 01:20:48 +00: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
Albert Vaca Cintora
132ae2ca7c Remove unused stuff 2023-08-28 18:48:04 +02:00
Nicolas Fella
0baeece353 Port to KStatusNotifierItem framework 2023-08-16 23:05:44 +00:00
Albert Vaca Cintora
5cc2043c35 Update old-style connect/disconnect where possible 2023-08-08 22:51:30 +02:00
Albert Vaca Cintora
a467247f08 Only use proxy signals for Q_PROPERTY NOTIFY
In other cases we can just connect to the signal from the parent class
2023-08-08 20:24:22 +02:00
Albert Vaca Cintora
fc0bd2290c Use values passed to the signal instead of getting them again 2023-08-08 20:24:22 +02:00
Fushan Wen
47cb369e01 Add i18n context for "Ring device" 2023-08-08 16:12:29 +08:00
Alexander Lohnau
7feb3bdd0d Remove unneeded setting of C++17 standard 2023-08-07 19:47:15 +02:00
Albert Vaca Cintora
034ecd24c7 Expand comment based on explanation in https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/584 2023-08-06 19:48:23 +00:00
Weixuan Xiao
7ce39e93af Remove QIcon loading to avoid pre-stage D-Bus session cache
Use a QPixmap icon and black color for all texts in the QSplashScreen
2023-08-06 19:48:23 +00:00
Weixuan Xiao
621ae3e007 Fix potential race condition 2023-08-06 19:48:23 +00:00
Alexander Lohnau
405f61bf85 Discard unused params more elegantly
By commenting out the parameter name, we get compile-time checks
Also, we can omit them for slots and Qt will not forward the parameters.

In case we had TODOs next to the code, I kept the Q_UNUSED statements
for now.
2023-08-05 20:22:18 +00:00
Alexander Lohnau
83888412a9 Simplify and optimize some string usages
- Using QLatin1String when concatinating strings is faster, because they
  are more lightweight. For the resulting string, we need to allocate
  new memory anyway
- Use QLatin1String overloads where they are provided by Qt APIs
- Just use const char* for log messages, the quoting of QStrings is not
  needed
- Make sure to reuse string results when possible
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
l10n daemon script
885d311b31 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-07-28 01:41:47 +00:00
Alexander Lohnau
f740a8bda8 Use target-centric CMake approach for declaring debug category
This makes it easier to read, because we do not have to handle a list of
files that get added to the targets. In other KDE projects, we also
prefer the target centric approach.

In case one wants to reuse the same category in multiple places, it
would be best to create a small static lib. But for now, this is not
needed.
2023-07-22 20:51:19 +00:00
Albert Astals Cid
4fa2e93246 Improve/change "Pair" i18n messages 2023-07-22 18:05:25 +00:00
Alexander Lohnau
f3998e4b5f Fix windows build issues
- Add dummy args param to QProcess::startDetached
- Remove logging category from inline snippet. This was removed due to
  being unused in non-windows builds.
2023-07-22 19:12:28 +02:00
Albert Vaca Cintora
c3a2665477 Do not call first() on a temporary list 2023-07-20 23:36:05 +02:00
Albert Vaca Cintora
0e2d2af402 Bump KDE compiler settings to latest
This already uses C++17 and C99, so no need to set it manually
2023-07-20 15:47:27 +00:00
Alexander Lohnau
c5bfc4a5b0 Allow building against Qt6/KF6 2023-07-20 11:15:41 +03:00
Albert Vaca Cintora
9c87393b28 clang-format pass 2023-07-16 16:20:34 +02:00
l10n daemon script
09f38caec5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-06-20 01:54:21 +00:00
Albert Vaca Cintora
fb73fe2ecc Windows: change the systray icon for light/dark themes 2023-06-12 15:34:43 +02:00
Albert Vaca Cintora
6396fc8e5a Windows indicator: print output when ran in console 2023-06-12 15:30:30 +02: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
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
l10n daemon script
ebd70efd3e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-04-10 01:39:38 +00:00
Albert Vaca Cintora
7b7a3f41b0 Maybe fix KCM from macos app 2023-03-09 00:35:00 +01:00