R8 phase 1: extract app/engine shared utilities into shared/include/oakutil

Move the pure-header utilities shared by app/ and engine/ out of
engine/common/ into a new shared/include/oakutil/ layer (define, lerp,
decibel, digit, range, crashpadutils, autoscroll, qtutils, filefunctions
declarations, and a trimmed xmlutils exposing a CancelAtom-free void*
overload). engine/common/ keeps forwarding headers so internal include
paths are unchanged; app/ now includes oakutil/* directly.

engine/node/project.h gains an explicit NodeGroup forward declaration
previously obtained transitively through the old xmlutils.h.
This commit is contained in:
2026-07-27 17:14:56 +08:00
parent 17888a2dc1
commit c0dcd33de0
118 changed files with 898 additions and 726 deletions
+2 -2
View File
@@ -27,9 +27,9 @@
#include "audio/audiolevelmeter.h"
#include "audio/audiomanager.h"
#include "common/decibel.h"
#include "oakutil/decibel.h"
#include "oakengine/preview.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
namespace olive
{
+1 -1
View File
@@ -27,7 +27,7 @@
#include <QTimer>
#include "audio/audiovisualwaveform.h"
#include "common/define.h"
#include "oakutil/define.h"
#include "render/audiowaveformcache.h"
namespace olive
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QLabel>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QPushButton>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -21,7 +21,7 @@
#include "colorbutton.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "dialog/color/colordialog.h"
namespace olive
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QPainter>
#include <QWidgetAction>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "ui/colorcoding.h"
namespace olive
@@ -23,7 +23,7 @@
#include <QPainter>
#include "common/lerp.h"
#include "oakutil/lerp.h"
#include "node/node.h"
namespace olive
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QPainter>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
namespace olive
{
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QGridLayout>
#include "common/filefunctions.h"
#include "oakutil/filefunctions.h"
#include "widget/menu/menu.h"
namespace olive
@@ -24,7 +24,7 @@
#include <QGridLayout>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+2 -2
View File
@@ -28,10 +28,10 @@
#include <QScrollBar>
#include <QtMath>
#include "common/decibel.h"
#include "oakutil/decibel.h"
#include "common/nodevaluehandle.h"
#include "common/oakvaluehelper.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "oakengine/node.h"
#include "widget/keyframeview/keyframehandle.h"
+1 -1
View File
@@ -28,7 +28,7 @@
#include <QVBoxLayout>
#include "core.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "node/node.h"
#include "common/nodevaluehandle.h"
#include "oakengine/node.h"
@@ -24,7 +24,7 @@
#include <QLineEdit>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -27,7 +27,7 @@
#include "common/nodevaluehandle.h"
#include "common/oakvaluehelper.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "dialog/keyframeproperties/keyframeproperties.h"
#include "keyframehandle.h"
#include "node/node.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QMenu>
#include <QMetaMethod>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -23,7 +23,7 @@
#include <QHBoxLayout>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "core.h"
#include "node/node.h"
#include "oakengine/node.h"
@@ -24,7 +24,7 @@
#include <QCheckBox>
#include <QDebug>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "dialog/speedduration/speeddurationdialog.h"
#include "node/project/sequence/sequence.h"
#include "oakengine/node.h"
@@ -26,7 +26,7 @@
#include <QPushButton>
#include <QWidget>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -28,7 +28,7 @@
#include <QVector3D>
#include <QVector4D>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "core.h"
#include "nodeparambutton.h"
#include "node/node.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QtGlobal>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QGraphicsSceneMouseEvent>
#include <QStyleOptionGraphicsItem>
#include "common/lerp.h"
#include "oakutil/lerp.h"
#include "nodeview.h"
#include "nodeviewitem.h"
#include "nodeviewscene.h"
+1 -1
View File
@@ -29,7 +29,7 @@
#include <QPainter>
#include <QStyleOptionGraphicsItem>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "common/configwrapper.h"
#include "core.h"
#include "node/value.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QFileDialog>
#include <QHBoxLayout>
#include "common/filefunctions.h"
#include "oakutil/filefunctions.h"
namespace olive
{
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QLineEdit>
#include <QPushButton>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QPushButton>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -30,7 +30,7 @@
#include <QUrl>
#include <QVBoxLayout>
#include "common/define.h"
#include "oakutil/define.h"
#include "core.h"
#include "dialog/footageproperties/footageproperties.h"
#include "dialog/proxy/proxydialog.h"
@@ -23,7 +23,7 @@
#include <QPainter>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
namespace olive
{
@@ -24,7 +24,7 @@
#include <QStyledItemDelegate>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -24,7 +24,7 @@
#include <QListView>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -24,7 +24,7 @@
#include <QStyledItemDelegate>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -24,7 +24,7 @@
#include <QEvent>
#include <QHBoxLayout>
#include "common/define.h"
#include "oakutil/define.h"
#include "ui/icons/icons.h"
namespace olive
@@ -27,7 +27,7 @@
#include <QSlider>
#include <QWidget>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -24,7 +24,7 @@
#include <QTreeView>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -26,7 +26,7 @@
#include <QMimeData>
#include <QUrl>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "core.h"
#include "oakengine/project.h"
#include "oakengine/node.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QLineEdit>
#include <QPushButton>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -26,7 +26,7 @@
#include <QStyle>
#include <QStyleOptionSlider>
#include "common/range.h"
#include "oakutil/range.h"
namespace olive
{
@@ -24,7 +24,7 @@
#include <QScrollBar>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+2 -2
View File
@@ -26,8 +26,8 @@
#include <QPainter>
#include <QtMath>
#include "common/qtutils.h"
#include "common/filefunctions.h"
#include "oakutil/qtutils.h"
#include "oakutil/filefunctions.h"
#include "oakengine/display.h"
namespace olive
+2 -2
View File
@@ -24,8 +24,8 @@
#include <QPainter>
#include <QtMath>
#include "common/qtutils.h"
#include "common/filefunctions.h"
#include "oakutil/qtutils.h"
#include "oakutil/filefunctions.h"
#include "oakengine/color.h"
#include "oakengine/display.h"
+2 -2
View File
@@ -27,9 +27,9 @@
#include <QPainter>
#include <QtMath>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "common/configwrapper.h"
#include "common/filefunctions.h"
#include "oakutil/filefunctions.h"
#include "oakengine/color.h"
#include "oakengine/display.h"
+1 -1
View File
@@ -21,7 +21,7 @@
#include "numericsliderbase.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "common/configwrapper.h"
#include "core.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QEvent>
#include <QMessageBox>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "core.h"
#include "window/mainwindow/mainwindow.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QLabel>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+2 -2
View File
@@ -32,8 +32,8 @@
#include <ApplicationServices/ApplicationServices.h>
#endif
#include "common/lerp.h"
#include "common/qtutils.h"
#include "oakutil/lerp.h"
#include "oakutil/qtutils.h"
#include "common/configwrapper.h"
namespace olive
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QTimer>
#include <QWidget>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -24,7 +24,7 @@
#include <cmath>
#include <QDebug>
#include "common/decibel.h"
#include "oakutil/decibel.h"
namespace olive
{
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QTimer>
#include <QWidget>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -27,7 +27,7 @@
#include <QRubberBand>
#include <QToolTip>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "olive/core/util/timecodefunctions.h"
#include "oakengine/node.h"
#include "oakengine/undo.h"
+2 -2
View File
@@ -23,8 +23,8 @@
#include <QInputDialog>
#include "common/autoscroll.h"
#include "common/range.h"
#include "oakutil/autoscroll.h"
#include "oakutil/range.h"
#include "common/configwrapper.h"
#include "core.h"
#include "engineeventbridge.h"
+1 -1
View File
@@ -40,7 +40,7 @@
#include "oakengine/audio.h"
#include "core.h"
#include "engineeventbridge.h"
#include "common/range.h"
#include "oakutil/range.h"
#include "dialog/proxy/proxydialog.h"
#include "dialog/sequence/sequence.h"
#include "dialog/speedduration/speeddurationdialog.h"
+1 -1
View File
@@ -27,7 +27,7 @@
#include <QToolTip>
#include "common/configwrapper.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "core.h"
#include "dialog/sequence/sequence.h"
#include "node/audio/volume/volume.h"
+2 -2
View File
@@ -24,8 +24,8 @@
#include <QDebug>
#include <QToolTip>
#include "common/qtutils.h"
#include "common/range.h"
#include "oakutil/qtutils.h"
#include "oakutil/range.h"
#include "common/configwrapper.h"
#include "core.h"
#include "node/block/gap/gap.h"
@@ -24,7 +24,7 @@
#include <QSplitter>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -29,7 +29,7 @@
#include <QPen>
#include "common/configwrapper.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "../../timeruler/markerpainting.h"
#include "node/project/footage/footage.h"
#include "oakengine/timeline.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QApplication>
#include <QPalette>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "common/colorcodingapp.h"
namespace olive
+2 -2
View File
@@ -26,8 +26,8 @@
#include <QPainter>
#include <QtMath>
#include "common/qtutils.h"
#include "common/range.h"
#include "oakutil/qtutils.h"
#include "oakutil/range.h"
#include "core.h"
#include "dialog/markerproperties/markerpropertiesdialog.h"
#include "markerpainting.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QDebug>
#include <QPainter>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "common/configwrapper.h"
#include "core.h"
#include "oakengine/viewer.h"
+3 -3
View File
@@ -38,14 +38,14 @@
#include <cstring>
#include "audio/audiomanager.h"
#include "common/define.h"
#include "common/html.h"
#include "oakutil/define.h"
#include "common/htmlapp.h"
#include "oakengine/gizmo.h"
#include "oakengine/videoparams.h"
#include "oakengine/display.h"
#include "oakengine/undo.h"
#include "widget/viewer/vieweroutpututils.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "common/configwrapper.h"
#include "core.h"
#include "node/block/subtitle/subtitle.h"
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QtGlobal>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QtMath>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -30,7 +30,7 @@
#include <QTextBlock>
#include <QtMath>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "ui/icons/icons.h"
namespace olive