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/views | |
| 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/views')
| -rw-r--r-- | src/views/dolphinfileitemlistwidget.cpp | 2 | ||||
| -rw-r--r-- | src/views/dolphinitemlistview.cpp | 2 | ||||
| -rw-r--r-- | src/views/dolphinnewfilemenuobserver.cpp | 2 | ||||
| -rw-r--r-- | src/views/dolphinremoteencoding.cpp | 2 | ||||
| -rw-r--r-- | src/views/dolphinview.cpp | 2 | ||||
| -rw-r--r-- | src/views/dolphinviewactionhandler.cpp | 2 | ||||
| -rw-r--r-- | src/views/tooltips/dolphinfilemetadatawidget.cpp | 2 | ||||
| -rw-r--r-- | src/views/tooltips/tooltipmanager.cpp | 2 | ||||
| -rw-r--r-- | src/views/versioncontrol/kversioncontrolplugin.cpp | 2 | ||||
| -rw-r--r-- | src/views/versioncontrol/updateitemstatesthread.cpp | 2 | ||||
| -rw-r--r-- | src/views/versioncontrol/versioncontrolobserver.cpp | 2 | ||||
| -rw-r--r-- | src/views/viewmodecontroller.cpp | 2 |
12 files changed, 24 insertions, 0 deletions
diff --git a/src/views/dolphinfileitemlistwidget.cpp b/src/views/dolphinfileitemlistwidget.cpp index 429060221..921baf73f 100644 --- a/src/views/dolphinfileitemlistwidget.cpp +++ b/src/views/dolphinfileitemlistwidget.cpp @@ -124,3 +124,5 @@ QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin::ItemVe return QIcon::fromTheme(iconName).pixmap(QSize(overlayHeight, overlayHeight)); } + +#include "moc_dolphinfileitemlistwidget.cpp" diff --git a/src/views/dolphinitemlistview.cpp b/src/views/dolphinitemlistview.cpp index 9902f651b..0efea844c 100644 --- a/src/views/dolphinitemlistview.cpp +++ b/src/views/dolphinitemlistview.cpp @@ -237,3 +237,5 @@ void DolphinItemListView::updateGridSize() setItemSize(QSizeF(itemWidth, itemHeight)); endTransaction(); } + +#include "moc_dolphinitemlistview.cpp" diff --git a/src/views/dolphinnewfilemenuobserver.cpp b/src/views/dolphinnewfilemenuobserver.cpp index a1e2fe1d0..fa549cf84 100644 --- a/src/views/dolphinnewfilemenuobserver.cpp +++ b/src/views/dolphinnewfilemenuobserver.cpp @@ -42,3 +42,5 @@ DolphinNewFileMenuObserver::DolphinNewFileMenuObserver() DolphinNewFileMenuObserver::~DolphinNewFileMenuObserver() { } + +#include "moc_dolphinnewfilemenuobserver.cpp" diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp index 04626c1c3..2881915ac 100644 --- a/src/views/dolphinremoteencoding.cpp +++ b/src/views/dolphinremoteencoding.cpp @@ -215,3 +215,5 @@ void DolphinRemoteEncoding::updateView() m_actionHandler->currentView()->setUrl(m_currentURL); m_actionHandler->currentView()->reload(); } + +#include "moc_dolphinremoteencoding.cpp" diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 1cc8a5f29..9666ca2ab 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -2418,3 +2418,5 @@ bool DolphinView::tryShowNameToolTip(QHelpEvent *event) } return false; } + +#include "moc_dolphinview.cpp" diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 86ed05e97..7117e9e1b 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -820,3 +820,5 @@ void DolphinViewActionHandler::slotSelectionChanged(const KFileItemList &selecti } } } + +#include "moc_dolphinviewactionhandler.cpp" diff --git a/src/views/tooltips/dolphinfilemetadatawidget.cpp b/src/views/tooltips/dolphinfilemetadatawidget.cpp index 3686b0f18..ba068d3f4 100644 --- a/src/views/tooltips/dolphinfilemetadatawidget.cpp +++ b/src/views/tooltips/dolphinfilemetadatawidget.cpp @@ -131,3 +131,5 @@ KFileItemList DolphinFileMetaDataWidget::items() const { return m_fileMetaDataWidget->items(); } + +#include "moc_dolphinfilemetadatawidget.cpp" diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp index c9d22eedf..b8c93b051 100644 --- a/src/views/tooltips/tooltipmanager.cpp +++ b/src/views/tooltips/tooltipmanager.cpp @@ -219,3 +219,5 @@ void ToolTipManager::showToolTip() m_toolTipRequested = false; } + +#include "moc_tooltipmanager.cpp" diff --git a/src/views/versioncontrol/kversioncontrolplugin.cpp b/src/views/versioncontrol/kversioncontrolplugin.cpp index 0190bb365..76688f56e 100644 --- a/src/views/versioncontrol/kversioncontrolplugin.cpp +++ b/src/views/versioncontrol/kversioncontrolplugin.cpp @@ -20,3 +20,5 @@ QString KVersionControlPlugin::localRepositoryRoot(const QString & /*directory*/ { return QString(); } + +#include "moc_kversioncontrolplugin.cpp" diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index 37c36f40c..ad53517ae 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -49,3 +49,5 @@ QMap<QString, QVector<VersionControlObserver::ItemState>> UpdateItemStatesThread { return m_itemStates; } + +#include "moc_updateitemstatesthread.cpp" diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 428572f08..e3bd29390 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -323,3 +323,5 @@ bool VersionControlObserver::isVersionControlled() const { return m_plugin != nullptr; } + +#include "moc_versioncontrolobserver.cpp" diff --git a/src/views/viewmodecontroller.cpp b/src/views/viewmodecontroller.cpp index 55be625d7..9e285511a 100644 --- a/src/views/viewmodecontroller.cpp +++ b/src/views/viewmodecontroller.cpp @@ -71,3 +71,5 @@ void ViewModeController::setUrl(const QUrl &url) Q_EMIT urlChanged(url); } } + +#include "moc_viewmodecontroller.cpp" |
