┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/statusbar
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <[email protected]>2023-07-04 22:07:48 +0200
committerMéven Car <[email protected]>2023-07-05 07:59:18 +0000
commited2d352c42a6d517d4f29b3582c0e00aa34fe647 (patch)
treed1b487efb15e1d1a6b9ad8c07c3fe2a01f19a505 /src/statusbar
parent7fcf4e084debda4bddc82de563fbacdabc6a87ef (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/statusbar')
-rw-r--r--src/statusbar/dolphinstatusbar.cpp2
-rw-r--r--src/statusbar/mountpointobserver.cpp2
-rw-r--r--src/statusbar/mountpointobservercache.cpp2
-rw-r--r--src/statusbar/spaceinfoobserver.cpp2
-rw-r--r--src/statusbar/statusbarspaceinfo.cpp2
5 files changed, 10 insertions, 0 deletions
diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp
index 42ce58f64..9c101b3fa 100644
--- a/src/statusbar/dolphinstatusbar.cpp
+++ b/src/statusbar/dolphinstatusbar.cpp
@@ -335,3 +335,5 @@ void DolphinStatusBar::setExtensionsVisible(bool visible)
m_zoomSlider->setVisible(showZoomSlider);
m_zoomLabel->setVisible(showZoomSlider);
}
+
+#include "moc_dolphinstatusbar.cpp"
diff --git a/src/statusbar/mountpointobserver.cpp b/src/statusbar/mountpointobserver.cpp
index c24e9e244..660484e60 100644
--- a/src/statusbar/mountpointobserver.cpp
+++ b/src/statusbar/mountpointobserver.cpp
@@ -41,3 +41,5 @@ void MountPointObserver::freeSpaceResult(KIO::Job *job, KIO::filesize_t size, KI
Q_EMIT spaceInfoChanged(0, 0);
}
}
+
+#include "moc_mountpointobserver.cpp"
diff --git a/src/statusbar/mountpointobservercache.cpp b/src/statusbar/mountpointobservercache.cpp
index b0675d1f5..348df4a07 100644
--- a/src/statusbar/mountpointobservercache.cpp
+++ b/src/statusbar/mountpointobservercache.cpp
@@ -87,3 +87,5 @@ void MountPointObserverCache::slotObserverDestroyed(QObject *observer)
m_updateTimer->stop();
}
}
+
+#include "moc_mountpointobservercache.cpp"
diff --git a/src/statusbar/spaceinfoobserver.cpp b/src/statusbar/spaceinfoobserver.cpp
index 296371255..243e2141b 100644
--- a/src/statusbar/spaceinfoobserver.cpp
+++ b/src/statusbar/spaceinfoobserver.cpp
@@ -77,3 +77,5 @@ void SpaceInfoObserver::spaceInfoChanged(quint64 size, quint64 available)
Q_EMIT valuesChanged();
}
}
+
+#include "moc_spaceinfoobserver.cpp"
diff --git a/src/statusbar/statusbarspaceinfo.cpp b/src/statusbar/statusbarspaceinfo.cpp
index 309e9d535..4eef8497d 100644
--- a/src/statusbar/statusbarspaceinfo.cpp
+++ b/src/statusbar/statusbarspaceinfo.cpp
@@ -125,3 +125,5 @@ void StatusBarSpaceInfo::slotValuesChanged()
update();
}
}
+
+#include "moc_statusbarspaceinfo.cpp"