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/general | |
| 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/general')
| -rw-r--r-- | src/settings/general/behaviorsettingspage.cpp | 2 | ||||
| -rw-r--r-- | src/settings/general/configurepreviewplugindialog.cpp | 2 | ||||
| -rw-r--r-- | src/settings/general/confirmationssettingspage.cpp | 2 | ||||
| -rw-r--r-- | src/settings/general/generalsettingspage.cpp | 2 | ||||
| -rw-r--r-- | src/settings/general/previewssettingspage.cpp | 2 | ||||
| -rw-r--r-- | src/settings/general/statusbarsettingspage.cpp | 2 |
6 files changed, 12 insertions, 0 deletions
diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index db5361ff6..662fcc26a 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -191,3 +191,5 @@ void BehaviorSettingsPage::loadSortingChoiceSettings() Q_UNREACHABLE(); } } + +#include "moc_behaviorsettingspage.cpp" diff --git a/src/settings/general/configurepreviewplugindialog.cpp b/src/settings/general/configurepreviewplugindialog.cpp index a391812df..8846d8261 100644 --- a/src/settings/general/configurepreviewplugindialog.cpp +++ b/src/settings/general/configurepreviewplugindialog.cpp @@ -68,4 +68,6 @@ ConfigurePreviewPluginDialog::ConfigurePreviewPluginDialog(const QString &plugin okButton->setDefault(true); } +#include "moc_configurepreviewplugindialog.cpp" + #endif // KIO_VERSION diff --git a/src/settings/general/confirmationssettingspage.cpp b/src/settings/general/confirmationssettingspage.cpp index 106a42058..61c3a14b6 100644 --- a/src/settings/general/confirmationssettingspage.cpp +++ b/src/settings/general/confirmationssettingspage.cpp @@ -173,3 +173,5 @@ void ConfirmationsSettingsPage::loadSettings() m_confirmClosingTerminalRunningProgram->setChecked(GeneralSettings::confirmClosingTerminalRunningProgram()); #endif } + +#include "moc_confirmationssettingspage.cpp" diff --git a/src/settings/general/generalsettingspage.cpp b/src/settings/general/generalsettingspage.cpp index c40e45274..61c2e3adc 100644 --- a/src/settings/general/generalsettingspage.cpp +++ b/src/settings/general/generalsettingspage.cpp @@ -70,3 +70,5 @@ void GeneralSettingsPage::restoreDefaults() page->restoreDefaults(); } } + +#include "moc_generalsettingspage.cpp" diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index 358798f58..ef98d0f8d 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -201,3 +201,5 @@ void PreviewsSettingsPage::loadSettings() const int maxRemoteMByteSize = maxRemoteByteSize / (1024 * 1024); m_remoteFileSizeBox->setValue(maxRemoteMByteSize); } + +#include "moc_previewssettingspage.cpp" diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp index 0d5be04bf..40e34e4f6 100644 --- a/src/settings/general/statusbarsettingspage.cpp +++ b/src/settings/general/statusbarsettingspage.cpp @@ -73,3 +73,5 @@ void StatusBarSettingsPage::loadSettings() onShowStatusBarToggled(); } + +#include "moc_statusbarsettingspage.cpp" |
