Merge pull request 'Replace include guards with #pragma once' (#35) from pragma-once-refactor into main

Reviewed-on: #35
This commit was merged in pull request #35.
This commit is contained in:
2026-05-03 15:17:28 +00:00
22 changed files with 22 additions and 87 deletions

View File

@@ -1,5 +1,4 @@
#ifndef CONTEXT_MENU_H
#define CONTEXT_MENU_H
#pragma once
#include <QMenu>
@@ -25,5 +24,3 @@ private:
const QPoint m_spawn_position;
Node *m_node = nullptr;
};
#endif // CONTEXT_MENU_H

View File

@@ -1,5 +1,4 @@
#ifndef DOCUMENT_H
#define DOCUMENT_H
#pragma once
#include <functional>
#include <QJsonObject>
@@ -87,5 +86,3 @@ private:
NodeEditor *m_nodeeditor = nullptr;
static Document *s_active_document;
};
#endif // DOCUMENT_H

View File

@@ -1,5 +1,4 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#pragma once
#include <QDir>
#include <QMainWindow>
@@ -47,4 +46,3 @@ private:
DisplayMode m_display_mode = DisplayMode::Run;
};
#endif // MAINWINDOW_H

View File

@@ -1,5 +1,4 @@
#ifndef PROPERTYWINDOW_H
#define PROPERTYWINDOW_H
#pragma once
#include <QFormLayout>
#include <QLabel>
@@ -14,5 +13,3 @@ class PropertyWindow : public QWidget
public:
explicit PropertyWindow(QWidget *parent, const QObject *object);
};
#endif // PROPERTYWINDOW_H

View File

@@ -1,5 +1,4 @@
#ifndef RENAME_NODE_DIALOG_H
#define RENAME_NODE_DIALOG_H
#pragma once
#include <QDialog>
@@ -23,5 +22,3 @@ private:
QLineEdit *m_name_edit = nullptr;
QDialogButtonBox *m_button_box = nullptr;
};
#endif // RENAME_NODE_DIALOG_H

View File

@@ -1,5 +1,4 @@
#ifndef SKUI_H
#define SKUI_H
#pragma once
#include <QApplication>
#include <QDebug>
@@ -12,5 +11,3 @@ public:
bool notify(QObject *, QEvent *) override;
};
#endif // SKUI_H

View File

@@ -1,5 +1,4 @@
#ifndef INTERFACE_H
#define INTERFACE_H
#pragma once
#include <QDebug>
#include <QVariant>
@@ -29,5 +28,3 @@ private:
QList<Interface *> m_routed_interfaces;
std::function<void()> m_callback;
};
#endif // INTERFACE_H

View File

@@ -1,5 +1,4 @@
#ifndef NODE_H
#define NODE_H
#pragma once
#include <QHash>
#include <QObject>
@@ -102,5 +101,3 @@ private:
QList<Interface> m_interfaces;
static QMap<QString, int> instance_counter;
};
#endif // NODE_H

View File

@@ -1,5 +1,4 @@
#ifndef LABEL_H
#define LABEL_H
#pragma once
#include <QLabel>
@@ -18,5 +17,3 @@ private:
QLabel *m_label;
};
#endif // LABEL_H

View File

@@ -1,5 +1,4 @@
#ifndef LINEEDIT_H
#define LINEEDIT_H
#pragma once
#include <QLineEdit>
@@ -18,5 +17,3 @@ private slots:
private:
QWidget *paintWidget(VisualContainer *) override;
};
#endif // LINEEDIT_H

View File

@@ -1,5 +1,4 @@
#ifndef SERIALSEND_H
#define SERIALSEND_H
#pragma once
#include <QComboBox>
#include <QLabel>
@@ -22,5 +21,3 @@ private:
QComboBox *m_combo_box;
QSerialPort m_serial_port;
};
#endif // SERIALSEND_H

View File

@@ -1,5 +1,4 @@
#ifndef SLIDER_H
#define SLIDER_H
#pragma once
#include <QDebug>
#include <QSlider>
@@ -18,5 +17,3 @@ private slots:
private:
QWidget *paintWidget(VisualContainer *) override;
};
#endif // SLIDER_H

View File

@@ -1,5 +1,4 @@
#ifndef TEXTCOMBINE_H
#define TEXTCOMBINE_H
#pragma once
#include "../node.h"
@@ -12,5 +11,3 @@ public:
private:
void valueChanged();
};
#endif // TEXTCOMBINE_H

View File

@@ -1,5 +1,4 @@
#ifndef VISUAL_H
#define VISUAL_H
#pragma once
#include <QLoggingCategory>
@@ -72,5 +71,3 @@ signals:
private:
QWidget *m_widget = nullptr;
};
#endif // VISUAL_H

View File

@@ -1,5 +1,4 @@
#ifndef CABLE_H
#define CABLE_H
#pragma once
#include <QCursor>
#include <QGraphicsObject>
@@ -119,5 +118,3 @@ private:
// Do not access directly, use updateBoundingRect() to update repaint.
QRectF m_bounding_rect;
};
#endif // CABLE_H

View File

@@ -1,5 +1,4 @@
#ifndef NODE_GRAPHICSITEM_H
#define NODE_GRAPHICSITEM_H
#pragma once
#include <QFontMetrics>
#include <QGraphicsItem>
@@ -57,5 +56,3 @@ private:
QString m_object_name;
QList<QMetaObject::Connection> m_node_connections;
};
#endif // NODE_GRAPHICSITEM_H

View File

@@ -1,5 +1,4 @@
#ifndef PAD_H
#define PAD_H
#pragma once
#include <QCursor>
#include <QGraphicsObject>
@@ -67,5 +66,3 @@ private:
const PadSide m_pad_side;
Interface *m_represented_interface;
};
#endif // PAD_H

View File

@@ -1,5 +1,4 @@
#ifndef NodeEditor_H
#define NodeEditor_H
#pragma once
#include <QGraphicsView>
#include <QLoggingCategory>
@@ -29,5 +28,3 @@ private:
bool m_dragging = false;
QPoint m_last_drag_pos;
};
#endif // NodeEditor_H

View File

@@ -1,5 +1,4 @@
#ifndef NODEEDITOR_SCENE_H
#define NODEEDITOR_SCENE_H
#pragma once
#include <QGraphicsScene>
#include <QGuiApplication>
@@ -30,5 +29,3 @@ private:
QCursor m_cursor_before_pad;
QPointer<Cable> m_last_cable = nullptr;
};
#endif // NODEEDITOR_SCENE_H

View File

@@ -1,5 +1,4 @@
#ifndef PANEL_H
#define PANEL_H
#pragma once
#include <QGuiApplication>
#include <QLoggingCategory>
@@ -169,5 +168,3 @@ private:
QList<RbbWidgetPair> m_selection;
};
#endif // PANEL_H

View File

@@ -1,5 +1,4 @@
#ifndef RESIZEBOUNDINGBOX_H
#define RESIZEBOUNDINGBOX_H
#pragma once
#include <QCursor>
#include <QMargins>
@@ -74,5 +73,3 @@ private:
QPointF last_global_position;
QRect last_geometry;
};
#endif // RESIZEBOUNDINGBOX_H

View File

@@ -1,5 +1,4 @@
#ifndef VISUAL_CONTAINER_H
#define VISUAL_CONTAINER_H
#pragma once
#include "../node/node.h"
#include <QChildEvent>
@@ -25,5 +24,3 @@ protected:
private:
Node *m_node = nullptr;
};
#endif // VISUAL_CONTAINER_H