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
master
Laurent Montel 1 year ago
parent ad1c820c21
commit b823747c3b

@ -89,3 +89,5 @@ void GenericSceneOpenGLTest::testRestart()
// TODO: introduce frameRendered signal in SceneOpenGL
QTest::qWait(100);
}
#include "moc_generic_scene_opengl_test.cpp"

@ -235,3 +235,5 @@ void Test::setOutputConfig(const QVector<OutputInfo> &infos)
static_cast<VirtualBackend *>(kwinApp()->outputBackend())->setVirtualOutputs(converted);
}
}
#include "moc_kwin_wayland_test.cpp"

@ -120,3 +120,5 @@ void OnScreenNotificationTest::message()
QCOMPARE(notification.message(), QStringLiteral("bar"));
QCOMPARE(messageChangedSpy.count(), 2);
}
#include "moc_onscreennotificationtest.cpp"

@ -231,3 +231,5 @@ void Activities::reallyStop(const QString &id)
}
} // namespace
#include "moc_activities.cpp"

@ -111,3 +111,5 @@ Window *ApplicationMenu::findWindowWithApplicationMenu(const QString &serviceNam
}
} // namespace KWin
#include "moc_appmenu.cpp"

@ -49,3 +49,5 @@ void DrmAbstractOutput::updateEnabled(bool enabled)
}
}
#include "moc_drm_abstract_output.cpp"

@ -488,3 +488,5 @@ EglDisplay *DrmBackend::sceneEglDisplayObject() const
return m_gpus.front()->eglDisplay();
}
}
#include "moc_drm_backend.cpp"

@ -192,3 +192,5 @@ DrmGpu *EglGbmBackend::gpu() const
}
} // namespace KWin
#include "moc_drm_egl_backend.cpp"

@ -481,3 +481,5 @@ std::shared_ptr<DrmFramebuffer> EglGbmLayerSurface::importWithCpu(Surface &surfa
return ret;
}
}
#include "moc_drm_egl_layer_surface.cpp"

@ -941,3 +941,5 @@ uint32_t DrmLease::lesseeId() const
return m_lesseeId;
}
}
#include "moc_drm_gpu.cpp"

@ -527,3 +527,5 @@ bool DrmOutput::needsColormanagement() const
return m_pipeline->colorimetry() != NamedColorimetry::BT709 || m_pipeline->transferFunction() != NamedTransferFunction::sRGB || m_gpu->isNVidia();
}
}
#include "moc_drm_output.cpp"

@ -187,3 +187,5 @@ int32_t DrmPlane::transformationToDegrees(DrmPlane::Transformations transformati
}
}
}
#include "moc_drm_plane.cpp"

@ -62,3 +62,5 @@ std::shared_ptr<DrmOutputLayer> DrmQPainterBackend::createLayer(DrmVirtualOutput
}
}
#include "moc_drm_qpainter_backend.cpp"

@ -83,3 +83,5 @@ void DrmVirtualOutput::recreateSurface()
}
}
#include "moc_drm_virtual_output.cpp"

@ -33,3 +33,5 @@ void FakeInputBackend::initialize()
}
} // namespace KWin
#include "moc_fakeinputbackend.cpp"

@ -158,3 +158,5 @@ bool FakeInputDevice::isLidSwitch() const
}
} // namespace KWin
#include "moc_fakeinputdevice.cpp"

@ -704,3 +704,5 @@ QStringList Connection::devicesSysNames() const
}
#include "connection.moc"
#include "moc_connection.cpp"

@ -713,3 +713,5 @@ void Device::setOutputArea(const QRectF &outputArea)
}
}
}
#include "moc_device.cpp"

@ -52,3 +52,5 @@ void LibinputBackend::updateScreens()
}
} // namespace KWin
#include "moc_libinputbackend.cpp"

@ -152,3 +152,5 @@ EglDisplay *VirtualBackend::sceneEglDisplayObject() const
}
} // namespace KWin
#include "moc_virtual_backend.cpp"

@ -192,3 +192,5 @@ std::pair<std::shared_ptr<KWin::GLTexture>, ColorDescription> VirtualEglBackend:
}
} // namespace
#include "moc_virtual_egl_backend.cpp"

@ -75,3 +75,5 @@ void VirtualOutput::vblank(std::chrono::nanoseconds timestamp)
}
}
#include "moc_virtual_output.cpp"

@ -101,3 +101,5 @@ VirtualQPainterLayer *VirtualQPainterBackend::primaryLayer(Output *output)
return m_outputs[output].get();
}
}
#include "moc_virtual_qpainter_backend.cpp"

@ -761,3 +761,5 @@ void WaylandBuffer::unlock()
}
} // KWin
#include "moc_wayland_backend.cpp"

@ -468,3 +468,5 @@ void WaylandDisplay::registry_global_remove(void *data, wl_registry *registry, u
}
#include "wayland_display.moc"
#include "moc_wayland_display.cpp"

@ -333,3 +333,5 @@ OutputLayer *WaylandEglBackend::cursorLayer(Output *output)
}
}
#include "moc_wayland_egl_backend.cpp"

@ -346,3 +346,5 @@ void WaylandOutput::lockPointer(Pointer *pointer, bool lock)
}
}
#include "moc_wayland_output.cpp"

@ -177,3 +177,5 @@ OutputLayer *WaylandQPainterBackend::cursorLayer(Output *output)
}
}
#include "moc_wayland_qpainter_backend.cpp"

@ -519,3 +519,5 @@ EglDisplay *X11StandaloneBackend::sceneEglDisplayObject() const
return m_eglDisplay.get();
}
}
#include "moc_x11_standalone_backend.cpp"

@ -135,3 +135,5 @@ void X11Cursor::notifyCursorChanged()
}
}
#include "moc_x11_standalone_cursor.cpp"

@ -127,3 +127,5 @@ void WindowBasedEdge::doUpdateBlocking()
}
}
#include "moc_x11_standalone_edge.cpp"

@ -110,3 +110,5 @@ void EffectsHandlerImplX11::doCheckInputWindowStacking()
}
}
#include "moc_x11_standalone_effects.cpp"

@ -474,3 +474,5 @@ void EglPixmapTexture::onDamage()
}
} // namespace KWin
#include "moc_x11_standalone_egl_backend.cpp"

@ -944,3 +944,5 @@ void GlxPixmapTexture::onDamage()
}
} // namespace
#include "moc_x11_standalone_glx_backend.cpp"

@ -151,3 +151,5 @@ void OMLSyncControlVsyncMonitor::arm()
}
} // namespace KWin
#include "moc_x11_standalone_omlsynccontrolvsyncmonitor.cpp"

@ -68,3 +68,5 @@ void X11Output::updateEnabled(bool enabled)
}
} // namespace KWin
#include "moc_x11_standalone_output.cpp"

@ -46,3 +46,5 @@ void X11PlaceholderOutput::updateEnabled(bool enabled)
}
} // namespace KWin
#include "moc_x11_standalone_placeholderoutput.cpp"

@ -153,3 +153,5 @@ void SGIVideoSyncVsyncMonitor::arm()
}
} // namespace KWin
#include "moc_x11_standalone_sgivideosyncvsyncmonitor.cpp"

@ -286,3 +286,5 @@ void XInputIntegration::startListening()
}
}
#include "moc_x11_standalone_xinputintegration.cpp"

@ -819,3 +819,5 @@ EglDisplay *X11WindowedBackend::sceneEglDisplayObject() const
}
} // namespace KWin
#include "moc_x11_windowed_backend.cpp"

@ -281,3 +281,5 @@ std::pair<std::shared_ptr<GLTexture>, ColorDescription> X11WindowedEglBackend::t
}
} // namespace
#include "moc_x11_windowed_egl_backend.cpp"

@ -474,3 +474,5 @@ xcb_pixmap_t X11WindowedOutput::importBuffer(GraphicsBuffer *graphicsBuffer)
}
} // namespace KWin
#include "moc_x11_windowed_output.cpp"

@ -177,3 +177,5 @@ OutputLayer *X11WindowedQPainterBackend::cursorLayer(Output *output)
}
}
#include "moc_x11_windowed_qpainter_backend.cpp"

@ -231,3 +231,5 @@ void ClientMachine::resolveFinished()
}
} // namespace
#include "moc_client_machine.cpp"

@ -329,3 +329,5 @@ void ColorDevice::scheduleUpdate()
}
} // namespace KWin
#include "moc_colordevice.cpp"

@ -85,3 +85,5 @@ void ColorManager::handleSessionActiveChanged(bool active)
}
} // namespace KWin
#include "moc_colormanager.cpp"

@ -1136,3 +1136,5 @@ void X11Compositor::createOpenGLSafePoint(OpenGLSafePoint safePoint)
// included for CompositorSelectionOwner
#include "composite.moc"
#include "moc_composite.cpp"

@ -298,3 +298,4 @@ void DumbGraphicsBuffer::unmap()
} // namespace KWin
#include "gbmgraphicsbufferallocator.moc"
#include "moc_gbmgraphicsbufferallocator.cpp"

@ -80,3 +80,5 @@ bool GraphicsBuffer::alphaChannelFromDrmFormat(uint32_t format)
}
} // namespace KWin
#include "moc_graphicsbuffer.cpp"

@ -25,3 +25,5 @@ void InputBackend::setConfig(KSharedConfigPtr config)
}
} // namespace KWin
#include "moc_inputbackend.cpp"

@ -24,3 +24,5 @@ void InputDevice::setOutputName(const QString &outputName)
}
} // namespace KWin
#include "moc_inputdevice.cpp"

@ -460,3 +460,5 @@ bool Output::moveCursor(const QPointF &position)
}
} // namespace KWin
#include "moc_output.cpp"

@ -128,3 +128,5 @@ void OutputBackend::setSceneEglGlobalShareContext(::EGLContext context)
}
} // namespace KWin
#include "moc_outputbackend.cpp"

@ -65,3 +65,5 @@ bool OutputLayer::scanout(SurfaceItem *surfaceItem)
}
} // namespace KWin
#include "moc_outputlayer.cpp"

@ -58,3 +58,5 @@ std::unique_ptr<SurfaceTexture> RenderBackend::createSurfaceTextureWayland(Surfa
}
} // namespace KWin
#include "moc_renderbackend.cpp"

@ -294,3 +294,5 @@ QRegion RenderLayer::mapFromGlobal(const QRegion &region) const
}
} // namespace KWin
#include "moc_renderlayer.cpp"

@ -281,3 +281,5 @@ void RenderLoop::setVrrPolicy(VrrPolicy policy)
}
} // namespace KWin
#include "moc_renderloop.cpp"

@ -44,3 +44,5 @@ std::unique_ptr<Session> Session::create(Type type)
}
} // namespace KWin
#include "moc_session.cpp"

@ -349,3 +349,5 @@ void ConsoleKitSession::handlePrepareForSleep(bool sleep)
}
} // namespace KWin
#include "moc_session_consolekit.cpp"

@ -348,3 +348,5 @@ void LogindSession::handlePrepareForSleep(bool sleep)
}
} // namespace KWin
#include "moc_session_logind.cpp"

@ -52,3 +52,5 @@ void NoopSession::switchTo(uint terminal)
}
} // namespace KWin
#include "moc_session_noop.cpp"

@ -150,4 +150,5 @@ GraphicsBuffer *ShmGraphicsBufferAllocator::allocate(const GraphicsBufferOptions
} // namespace KWin
#include "moc_shmgraphicsbufferallocator.cpp"
#include "shmgraphicsbufferallocator.moc"

@ -697,3 +697,5 @@ void Cursor::setSource(CursorSource *source)
}
} // namespace
#include "moc_cursor.cpp"

@ -161,3 +161,5 @@ void SurfaceCursorSource::update(KWaylandServer::SurfaceInterface *surface, cons
}
} // namespace KWin
#include "moc_cursorsource.cpp"

@ -532,3 +532,5 @@ void PluginManagerDBusInterface::UnloadPlugin(const QString &name)
}
} // namespace
#include "moc_dbusinterface.cpp"

@ -1685,3 +1685,5 @@ void DataSourceModel::setSource(KWaylandServer::AbstractDataSource *source)
endResetModel();
}
}
#include "moc_debug_console.cpp"

@ -343,3 +343,5 @@ QString DecoratedClientImpl::windowClass() const
}
}
#include "moc_decoratedclient.cpp"

@ -289,3 +289,5 @@ QString DecorationBridge::supportInformation() const
} // Decoration
} // KWin
#include "moc_decorationbridge.cpp"

@ -160,3 +160,5 @@ void DecorationPalette::update()
}
}
#include "moc_decorationpalette.cpp"

@ -177,3 +177,5 @@ void SettingsImpl::readSettings()
}
}
#include "moc_settings.cpp"

@ -417,3 +417,5 @@ void EffectLoader::clear()
}
} // namespace KWin
#include "moc_effectloader.cpp"

@ -2513,3 +2513,5 @@ void EffectFrameImpl::setCrossFadeProgress(qreal progress)
}
} // namespace
#include "moc_effects.cpp"

@ -236,3 +236,5 @@ bool FocusChain::contains(Window *window, VirtualDesktop *desktop) const
}
} // namespace
#include "moc_focuschain.cpp"

@ -119,3 +119,5 @@ FTraceDuration::~FTraceDuration()
}
}
#include "moc_ftrace.cpp"

@ -579,3 +579,5 @@ int GestureRecognizer::startSwipeGesture(const QPointF &startPos)
}
}
#include "moc_gestures.cpp"

@ -302,3 +302,5 @@ void GlobalShortcutsManager::processPinchEnd()
}
} // namespace
#include "moc_globalshortcuts.cpp"

@ -94,3 +94,5 @@ void IdleInhibition::slotDesktopChanged()
}
}
#include "moc_idle_inhibition.cpp"

@ -72,3 +72,5 @@ void IdleDetector::markAsResumed()
}
} // namespace KWin
#include "moc_idledetector.cpp"

@ -3449,3 +3449,5 @@ Decoration::DecoratedClientImpl *InputDeviceHandler::decoration() const
} // namespace
#include "input.moc"
#include "moc_input.cpp"

@ -977,3 +977,5 @@ void InputMethod::textInputInterfaceV3EnableRequested()
show();
}
}
#include "moc_inputmethod.cpp"

@ -30,3 +30,5 @@ void InputPanelV1Integration::createWindow(InputPanelSurfaceV1Interface *shellSu
}
} // namespace KWin
#include "moc_inputpanelv1integration.cpp"

@ -197,3 +197,5 @@ void InputPanelV1Window::maybeShow()
}
} // namespace KWin
#include "moc_inputpanelv1window.cpp"

@ -536,3 +536,5 @@ void InternalWindow::updateInternalWindowGeometry()
}
}
#include "moc_internalwindow.cpp"

@ -603,3 +603,5 @@ bool EffectsModel::shouldStore(const EffectData &data) const
}
}
#include "moc_effectsmodel.cpp"

@ -181,3 +181,5 @@ void ScriptingConfig::reload()
}
} // namespace
#include "moc_genericscriptedconfig.cpp"

@ -30,3 +30,5 @@ bool KWinCompositingData::isDefaults() const
}
return defaults;
}
#include "moc_kwincompositingdata.cpp"

@ -180,3 +180,5 @@ void ButtonsModel::replace(const QVector<DecorationButtonType> &buttons)
}
}
#include "moc_buttonsmodel.cpp"

@ -35,3 +35,5 @@ void Plugin::registerTypes(const char *uri)
}
}
#include "moc_plugin.cpp"

@ -227,3 +227,5 @@ BridgeItem::~BridgeItem()
}
}
#include "moc_previewbridge.cpp"

@ -260,3 +260,5 @@ void Settings::setBorderSizesIndex(int index)
}
}
#include "moc_previewsettings.cpp"

@ -166,3 +166,5 @@ QModelIndex DecorationsModel::findDecoration(const QString &pluginName, const QS
}
}
#include "moc_decorationmodel.cpp"

@ -174,3 +174,5 @@ bool AnimationsModel::needsSave() const
}
}
#include "moc_animationsmodel.cpp"

@ -684,3 +684,5 @@ void DesktopsModel::handleCallError()
}
}
#include "moc_desktopsmodel.cpp"

@ -50,3 +50,5 @@ AnimationsModel *VirtualDesktopsData::animationsModel() const
}
}
#include "moc_virtualdesktopsdata.cpp"

@ -31,3 +31,5 @@ bool DesktopEffectsData::isDefaults() const
}
}
#include "moc_desktopeffectsdata.cpp"

@ -89,3 +89,5 @@ bool EffectsFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex
}
} // namespace KWin
#include "moc_effectsfilterproxymodel.cpp"

@ -88,3 +88,5 @@ void DesktopEffectsKCM::updateNeedsSave()
} // namespace KWin
#include "kcm.moc"
#include "moc_kcm.cpp"

@ -223,3 +223,5 @@ void KActionsOptions::moduleChanged(bool state)
}
#include "main.moc"
#include "moc_main.cpp"

@ -99,3 +99,5 @@ bool KWindowActionsConfig::isSaveNeeded() const
{
return managedWidgetChangeState();
}
#include "moc_mouse.cpp"

@ -317,3 +317,5 @@ bool KMovingConfig::isSaveNeeded() const
{
return managedWidgetChangeState();
}
#include "moc_windows.cpp"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save