feat: forward declare where possible

Hopefully speeds up compile times by at least a bit
This commit is contained in:
2 * r + 2 * t 2026-04-18 02:04:47 +10:00
parent a6ce66814e
commit 850d9fc1c9
10 changed files with 97 additions and 29 deletions

View file

@ -1,6 +1,23 @@
#include "config.hpp"
#include "appearanceconfig.hpp"
#include "backgroundconfig.hpp"
#include "barconfig.hpp"
#include "borderconfig.hpp"
#include "controlcenterconfig.hpp"
#include "dashboardconfig.hpp"
#include "generalconfig.hpp"
#include "launcherconfig.hpp"
#include "lockconfig.hpp"
#include "monitorconfigmanager.hpp"
#include "notifsconfig.hpp"
#include "osdconfig.hpp"
#include "serviceconfig.hpp"
#include "sessionconfig.hpp"
#include "sidebarconfig.hpp"
#include "tokens.hpp"
#include "userpaths.hpp"
#include "utilitiesconfig.hpp"
#include "winfoconfig.hpp"
#include <qqmlengine.h>
#include <qstandardpaths.h>

View file

@ -1,32 +1,50 @@
#pragma once
#include "rootconfig.hpp"
#include <qqmlengine.h>
#include "appearanceconfig.hpp"
#include "backgroundconfig.hpp"
#include "barconfig.hpp"
#include "borderconfig.hpp"
#include "controlcenterconfig.hpp"
#include "dashboardconfig.hpp"
#include "generalconfig.hpp"
#include "launcherconfig.hpp"
#include "lockconfig.hpp"
#include "notifsconfig.hpp"
#include "osdconfig.hpp"
#include "rootconfig.hpp"
#include "serviceconfig.hpp"
#include "sessionconfig.hpp"
#include "sidebarconfig.hpp"
#include "userpaths.hpp"
#include "utilitiesconfig.hpp"
#include "winfoconfig.hpp"
namespace caelestia::config {
class AppearanceConfig;
class BackgroundConfig;
class BarConfig;
class BorderConfig;
class ControlCenterConfig;
class DashboardConfig;
class GeneralConfig;
class LauncherConfig;
class LockConfig;
class NotifsConfig;
class OsdConfig;
class ServiceConfig;
class SessionConfig;
class SidebarConfig;
class UserPaths;
class UtilitiesConfig;
class WInfoConfig;
class GlobalConfig : public RootConfig {
Q_OBJECT
QML_ELEMENT
QML_SINGLETON
Q_MOC_INCLUDE("appearanceconfig.hpp")
Q_MOC_INCLUDE("backgroundconfig.hpp")
Q_MOC_INCLUDE("barconfig.hpp")
Q_MOC_INCLUDE("borderconfig.hpp")
Q_MOC_INCLUDE("controlcenterconfig.hpp")
Q_MOC_INCLUDE("dashboardconfig.hpp")
Q_MOC_INCLUDE("generalconfig.hpp")
Q_MOC_INCLUDE("launcherconfig.hpp")
Q_MOC_INCLUDE("lockconfig.hpp")
Q_MOC_INCLUDE("notifsconfig.hpp")
Q_MOC_INCLUDE("osdconfig.hpp")
Q_MOC_INCLUDE("serviceconfig.hpp")
Q_MOC_INCLUDE("sessionconfig.hpp")
Q_MOC_INCLUDE("sidebarconfig.hpp")
Q_MOC_INCLUDE("userpaths.hpp")
Q_MOC_INCLUDE("utilitiesconfig.hpp")
Q_MOC_INCLUDE("winfoconfig.hpp")
CONFIG_PROPERTY(bool, enabled, true)
CONFIG_SUBOBJECT(AppearanceConfig, appearance)

View file

@ -12,6 +12,23 @@ class Config : public QQuickAttachedPropertyPropagator, public QQmlParserStatus
QML_ELEMENT
QML_UNCREATABLE("")
QML_ATTACHED(Config)
Q_MOC_INCLUDE("appearanceconfig.hpp")
Q_MOC_INCLUDE("backgroundconfig.hpp")
Q_MOC_INCLUDE("barconfig.hpp")
Q_MOC_INCLUDE("borderconfig.hpp")
Q_MOC_INCLUDE("controlcenterconfig.hpp")
Q_MOC_INCLUDE("dashboardconfig.hpp")
Q_MOC_INCLUDE("generalconfig.hpp")
Q_MOC_INCLUDE("launcherconfig.hpp")
Q_MOC_INCLUDE("lockconfig.hpp")
Q_MOC_INCLUDE("notifsconfig.hpp")
Q_MOC_INCLUDE("osdconfig.hpp")
Q_MOC_INCLUDE("serviceconfig.hpp")
Q_MOC_INCLUDE("sessionconfig.hpp")
Q_MOC_INCLUDE("sidebarconfig.hpp")
Q_MOC_INCLUDE("userpaths.hpp")
Q_MOC_INCLUDE("utilitiesconfig.hpp")
Q_MOC_INCLUDE("winfoconfig.hpp")
Q_PROPERTY(QString screen READ screen WRITE inheritScreen NOTIFY sourceChanged)
Q_PROPERTY(const caelestia::config::AppearanceConfig* appearance READ appearance NOTIFY sourceChanged)

View file

@ -1,7 +1,5 @@
#pragma once
#include "anim.hpp"
#include "appearanceconfig.hpp"
#include "rootconfig.hpp"
#include <qlist.h>

View file

@ -1,5 +1,6 @@
#include "tokensattached.hpp"
#include "anim.hpp"
#include "appearanceconfig.hpp"
#include "config.hpp"
#include "monitorconfigmanager.hpp"
#include "tokens.hpp"

View file

@ -1,20 +1,30 @@
#pragma once
#include "anim.hpp"
#include "appearanceconfig.hpp"
#include "config.hpp"
#include "tokens.hpp"
#include <qqmlintegration.h>
#include <qqmlparserstatus.h>
#include <qquickattachedpropertypropagator.h>
namespace caelestia::config {
class AnimTokens;
class AppearanceFont;
class AppearancePadding;
class AppearanceRounding;
class AppearanceSpacing;
class AppearanceTransparency;
class GlobalConfig;
class SizeTokens;
class TokenConfig;
class Tokens : public QQuickAttachedPropertyPropagator, public QQmlParserStatus {
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
QML_ELEMENT
QML_UNCREATABLE("")
QML_ATTACHED(Tokens)
Q_MOC_INCLUDE("anim.hpp")
Q_MOC_INCLUDE("appearanceconfig.hpp")
Q_MOC_INCLUDE("tokens.hpp")
Q_PROPERTY(QString screen READ screen WRITE inheritScreen NOTIFY sourceChanged)
Q_PROPERTY(const caelestia::config::AppearanceRounding* rounding READ rounding NOTIFY sourceChanged)

View file

@ -1,4 +1,5 @@
#include "hyprextras.hpp"
#include "hyprdevices.hpp"
#include <qdir.h>
#include <qjsonarray.h>

View file

@ -1,15 +1,19 @@
#pragma once
#include "hyprdevices.hpp"
#include <qlocalsocket.h>
#include <qobject.h>
#include <qqmlintegration.h>
#include <qsharedpointer.h>
#include <qvariant.h>
namespace caelestia::internal::hypr {
class HyprDevices;
class HyprExtras : public QObject {
Q_OBJECT
QML_ELEMENT
Q_MOC_INCLUDE("hyprdevices.hpp")
Q_PROPERTY(QVariantHash options READ options NOTIFY optionsChanged)
Q_PROPERTY(caelestia::internal::hypr::HyprDevices* devices READ devices CONSTANT)

View file

@ -1,4 +1,5 @@
#include "sparklineitem.hpp"
#include "circularbuffer.hpp"
#include <qpainter.h>
#include <qpainterpath.h>

View file

@ -5,13 +5,14 @@
#include <qqmlintegration.h>
#include <qquickpainteditem.h>
#include "circularbuffer.hpp"
namespace caelestia::internal {
class CircularBuffer;
class SparklineItem : public QQuickPaintedItem {
Q_OBJECT
QML_ELEMENT
Q_MOC_INCLUDE("circularbuffer.hpp")
Q_PROPERTY(CircularBuffer* line1 READ line1 WRITE setLine1 NOTIFY line1Changed)
Q_PROPERTY(CircularBuffer* line2 READ line2 WRITE setLine2 NOTIFY line2Changed)