Commit graph

28 commits

Author SHA1 Message Date
Andreas Sturmlechner
6e99c00d76
Drop obsolete QT_VERSION_CHECK ifdefs from code
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2023-12-28 19:18:02 +01: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
Nicolas Fella
5d0b2c4c73 Fix opening runcommand settings
We only get the device id via args, not the plugin id

We also don't need it, we can get the plugin id from the metadata
2023-12-21 22:33:03 +00:00
Alexander Lohnau
b70de1eb21 kcmplugin: Do not use d-ptr for trivial members that are fully qualified
Also, make this for the most part header only, because it is just a utility class.
We could make this entirely header only, but it is not worth it.
2023-08-28 17:20:46 +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
Alexander Lohnau
ede9e37b40 Use KPluginMetaData::pluginId for getting config plugin name
By removing the postfix we consistently use, we get exactly the same string as before

However, all our pluginId logic is now done as part of the buildsystem.
Before, they were in the JSON metadata, the buildsystem and the string constructor parameter

KPluginFactory has the KPluginMetaData object in any case, do using it
doesn't create any overhead.
2023-07-22 20:51:19 +00:00
Alexander Lohnau
52b6d57942 Qt6 build fixes in plugins and KCM 2023-07-20 11:15:46 +03:00
Alexander Lohnau
c5bfc4a5b0 Allow building against Qt6/KF6 2023-07-20 11:15:41 +03:00
Volker Krause
002848efa8 Adapt build system to also support Qt 6
This is complicated by the Qt 5.6 requirement of SailfishOS, hopefully
that didn't get broken by this.
2022-10-29 16:51:41 +02:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +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
Aleix Pol
21dbf0410f kcm: Fix showing plugins' configuration
We were using the plugin infrastructure to tell the name of the plugin
we were configuring.

Since this doesn't make any sense, just let the kcms themselves define
where they want their settings to be.

This fixes a regression from when we ported away from using KService to
list them. e365e1b35c
2022-03-21 18:03:45 +01:00
Nicolas Fella
f2d97193eb Remove defunct calls to KAboutData::pluginData
The data is never registered so they always return nullptr. We might as well not pass it.
2020-10-31 19:58:05 +00:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Nicolas Fella
79164ca8ba Replace manual include dir handling with interface target
We use kdeconnect-version.h in several places and therefore it needs to be in the include path. We currently do this by setting target_include_path in a few places. Replace this with an interface library that we can link against that sets up the correct include path. IMO it is cleaner this way.
2020-07-30 10:53:48 +02:00
Nicolas Fella
4de0f8cb9e Remove non-toplevel project() definitions 2019-06-12 22:47:17 +02:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Friedrich W. H. Kossebau
bb3ab8b631 Clean-up requirements: cmake 3.0, qt 5.7, use min versions, deduplicate KF5
Summary:
* cmake 2.8.12 is really outdated, 3.0 is minimum in plasma & kf5
* cmake_minimum_required should be at begin of toplevel CMakeLists.txt
* bump qt version to 5.7, matching the min Qt version of kf5 5.42
* with ecm being part of kf5 since early versions, share ${KF5_MIN_VERSION}
* use QT_MIN_VERSION & KF5_MIN_VERSION also for separate find_package calls
* deduplicate all KF5 components searched for in unconditionally included
  subdirs

Test Plan: Still configures and builds with all options OFF & ON

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D11418
2018-03-17 23:34:33 +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
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01: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
Aleix Pol
0bca50af93 Merge branch '0.9' 2015-10-19 17:48:13 +02:00
Albert Vaca
091de2ad4b Removed unused generate_export_header 2015-09-26 08:23:41 -07:00
Patrick von Reth
da5c9bd30e Fix compilation on Windows. 2015-09-10 15:51:38 +02:00
Aleix Pol
3caf5e7908 Move some find_package dependencies to the children directories as agreed 2015-04-10 17:48:48 +02:00
Harald Sitter
85782aaba4 do not install .so symlink for private libraries
distributions don't like it

REVIEW: 123112
2015-03-23 15:35:54 +01:00
Albert Vaca
e20c3c907d Fixed config memory leak. 2015-03-21 22:21:34 -07:00
Albert Vaca
02a2990720 Added a baseclass for the plugins' KCMs and a class for the plugins' config
Centralizing the plugins' config will ensure that all the plugins store it
the same way (ie: not in random files scattered around, like until now).
The base KCM class, together with the already existing base plugin class,
will give easy access to all the plugins to this centralized config. Also,
now the settings are not shared across devices (that is: every device can
have different config for a same plugin).

Note: This commit requires KCMUtils 5.9

REVIEW: 122927
2015-03-13 21:22:21 -07:00