┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
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/panels
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/panels')
-rw-r--r--src/panels/folders/foldersitemlistwidget.cpp2
-rw-r--r--src/panels/folders/folderspanel.cpp2
-rw-r--r--src/panels/folders/treeviewcontextmenu.cpp2
-rw-r--r--src/panels/information/informationpanel.cpp2
-rw-r--r--src/panels/information/informationpanelcontent.cpp2
-rw-r--r--src/panels/information/phononwidget.cpp1
-rw-r--r--src/panels/information/pixmapviewer.cpp2
-rw-r--r--src/panels/panel.cpp2
-rw-r--r--src/panels/places/placespanel.cpp2
-rw-r--r--src/panels/terminal/terminalpanel.cpp2
10 files changed, 19 insertions, 0 deletions
diff --git a/src/panels/folders/foldersitemlistwidget.cpp b/src/panels/folders/foldersitemlistwidget.cpp
index 1a3ba50ef..7fa1323ea 100644
--- a/src/panels/folders/foldersitemlistwidget.cpp
+++ b/src/panels/folders/foldersitemlistwidget.cpp
@@ -19,3 +19,5 @@ QPalette::ColorRole FoldersItemListWidget::normalTextColorRole() const
{
return QPalette::WindowText;
}
+
+#include "moc_foldersitemlistwidget.cpp"
diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp
index f304654cb..af2b1357b 100644
--- a/src/panels/folders/folderspanel.cpp
+++ b/src/panels/folders/folderspanel.cpp
@@ -365,3 +365,5 @@ void FoldersPanel::updateCurrentItem(int index)
m_controller->view()->scrollToItem(index);
}
+
+#include "moc_folderspanel.cpp"
diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp
index 0e6260b3b..e063ca85e 100644
--- a/src/panels/folders/treeviewcontextmenu.cpp
+++ b/src/panels/folders/treeviewcontextmenu.cpp
@@ -253,3 +253,5 @@ void TreeViewContextMenu::setAutoScrolling(bool enable)
{
m_parent->setAutoScrolling(enable);
}
+
+#include "moc_treeviewcontextmenu.cpp"
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp
index 55b734cf0..7367f1d13 100644
--- a/src/panels/information/informationpanel.cpp
+++ b/src/panels/information/informationpanel.cpp
@@ -419,3 +419,5 @@ void InformationPanel::init()
m_initialized = true;
}
+
+#include "moc_informationpanel.cpp"
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp
index 725ef785b..d93457b27 100644
--- a/src/panels/information/informationpanelcontent.cpp
+++ b/src/panels/information/informationpanelcontent.cpp
@@ -489,3 +489,5 @@ void InformationPanelContent::adjustWidgetSizes(int width)
m_phononWidget->setVideoSize(QSize(maxWidth, maxWidth));
}
}
+
+#include "moc_informationpanelcontent.cpp"
diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp
index 2993e826e..77d55da8b 100644
--- a/src/panels/information/phononwidget.cpp
+++ b/src/panels/information/phononwidget.cpp
@@ -261,4 +261,5 @@ void PhononWidget::applyVideoSize()
}
}
+#include "moc_phononwidget.cpp"
#include "phononwidget.moc"
diff --git a/src/panels/information/pixmapviewer.cpp b/src/panels/information/pixmapviewer.cpp
index 7eca876c8..11c13e348 100644
--- a/src/panels/information/pixmapviewer.cpp
+++ b/src/panels/information/pixmapviewer.cpp
@@ -174,3 +174,5 @@ bool PixmapViewer::isAnimatedMimeType(const QString &mimeType)
return QMovie::supportedFormats().contains(format);
});
}
+
+#include "moc_pixmapviewer.cpp"
diff --git a/src/panels/panel.cpp b/src/panels/panel.cpp
index 32f293c4c..e13684922 100644
--- a/src/panels/panel.cpp
+++ b/src/panels/panel.cpp
@@ -59,3 +59,5 @@ void Panel::setUrl(const QUrl &url)
void Panel::readSettings()
{
}
+
+#include "moc_panel.cpp"
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp
index bea2f0614..3c3f7bb87 100644
--- a/src/panels/places/placespanel.cpp
+++ b/src/panels/places/placespanel.cpp
@@ -275,3 +275,5 @@ void PlacesPanel::connectDeviceSignals(const QModelIndex &index)
connect(storageAccess, &Solid::StorageAccess::teardownRequested, this, &PlacesPanel::slotTearDownRequestedExternally);
}
+
+#include "moc_placespanel.cpp"
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index 9e0391c41..06ad89547 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -331,3 +331,5 @@ bool TerminalPanel::terminalHasFocus() const
return hasFocus();
}
+
+#include "moc_terminalpanel.cpp"