diff options
| author | Friedrich W. H. Kossebau <[email protected]> | 2023-07-04 22:07:48 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-07-05 07:59:18 +0000 |
| commit | ed2d352c42a6d517d4f29b3582c0e00aa34fe647 (patch) | |
| tree | d1b487efb15e1d1a6b9ad8c07c3fe2a01f19a505 /src/settings/kcm | |
| parent | 7fcf4e084debda4bddc82de563fbacdabc6a87ef (diff) | |
Add explicit moc includes to sources for moc-covered headers
* speeds up incremental builds as changes to a header will not always
need the full mocs_compilation.cpp for all the target's headers rebuild,
while having a moc file sourced into a source file only adds minor
extra costs, due to small own code and the used headers usually
already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
resulting in those quickly processed, while the minor extra cost of the
sourced moc files does not outweigh that in summary.
Measured times actually improved by some percent points.
(ideally CMake would just skip empty mocs_compilation.cpp & its object
file one day)
* enables compiler to see all methods of a class in same compilation unit
to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
moc code being sourced into the cpp file there definitions can be ensured
and often are already for the needs of the normal class methods
Diffstat (limited to 'src/settings/kcm')
| -rw-r--r-- | src/settings/kcm/kcmdolphingeneral.cpp | 2 | ||||
| -rw-r--r-- | src/settings/kcm/kcmdolphinnavigation.cpp | 2 | ||||
| -rw-r--r-- | src/settings/kcm/kcmdolphinviewmodes.cpp | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp index 25e3b6876..c002da926 100644 --- a/src/settings/kcm/kcmdolphingeneral.cpp +++ b/src/settings/kcm/kcmdolphingeneral.cpp @@ -70,3 +70,5 @@ void DolphinGeneralConfigModule::defaults() } #include "kcmdolphingeneral.moc" + +#include "moc_kcmdolphingeneral.cpp" diff --git a/src/settings/kcm/kcmdolphinnavigation.cpp b/src/settings/kcm/kcmdolphinnavigation.cpp index 63591f4fd..dd4756d8b 100644 --- a/src/settings/kcm/kcmdolphinnavigation.cpp +++ b/src/settings/kcm/kcmdolphinnavigation.cpp @@ -44,3 +44,5 @@ void DolphinNavigationConfigModule::defaults() } #include "kcmdolphinnavigation.moc" + +#include "moc_kcmdolphinnavigation.cpp" diff --git a/src/settings/kcm/kcmdolphinviewmodes.cpp b/src/settings/kcm/kcmdolphinviewmodes.cpp index 50ee13618..867faf69e 100644 --- a/src/settings/kcm/kcmdolphinviewmodes.cpp +++ b/src/settings/kcm/kcmdolphinviewmodes.cpp @@ -85,3 +85,5 @@ void DolphinViewModesConfigModule::viewModeChanged() } #include "kcmdolphinviewmodes.moc" + +#include "moc_kcmdolphinviewmodes.cpp" |
