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
+1 -1
View File
@@ -23,7 +23,7 @@
// (common/filefunctions.h) which is on the public include path; these
// definitions resolve the symbols locally in the app binary.
#include "common/filefunctions.h"
#include "oakutil/filefunctions.h"
#include <QCoreApplication>
#include <QDir>
+2 -2
View File
@@ -29,12 +29,12 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include "common/xmlutils.h"
#include "oakutil/xmlutils.h"
#include <QDebug>
#include <QTextBlock>
#include "common/xmlutils.h"
#include "oakutil/xmlutils.h"
namespace olive
{
+1 -1
View File
@@ -18,7 +18,7 @@
***/
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
namespace olive
{
+3 -3
View File
@@ -21,19 +21,19 @@
// App-side implementation of xml_read_next_start_element
// Provides a local definition so the app doesn't import this from liboakengine.
#include "common/xmlutils.h"
#include "oakutil/xmlutils.h"
namespace olive
{
bool xml_read_next_start_element(QXmlStreamReader *reader,
CancelAtom *cancel_atom)
void *cancel_atom)
{
QXmlStreamReader::TokenType token;
while ((token = reader->readNext()) != QXmlStreamReader::Invalid &&
token != QXmlStreamReader::EndDocument &&
(!cancel_atom || !cancel_atom->is_cancelled())) {
(!cancel_atom)) {
if (reader->isEndElement()) {
return false;
} else if (reader->isStartElement()) {
+2 -2
View File
@@ -47,8 +47,8 @@
#endif
#include "dialog/task/task.h"
#include "common/filefunctions.h"
#include "common/xmlutils.h"
#include "oakutil/filefunctions.h"
#include "oakutil/xmlutils.h"
#include "common/configwrapper.h"
#include "dialog/about/about.h"
#include "dialog/autorecovery/autorecoverydialog.h"
+2 -2
View File
@@ -37,8 +37,8 @@
#include <QTimer>
#include <QVBoxLayout>
#include "common/crashpadutils.h"
#include "common/filefunctions.h"
#include "oakutil/crashpadutils.h"
#include "oakutil/filefunctions.h"
#include "version.h"
namespace olive
+1 -1
View File
@@ -29,7 +29,7 @@
#include <QPushButton>
#include <QTextEdit>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QCheckBox>
#include <QDialog>
#include "common/define.h"
#include "oakutil/define.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
@@ -28,7 +28,7 @@
#include <QMenu>
#include <QMenuBar>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QDialog>
#include <QTreeWidget>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QSplitter>
#include <QVBoxLayout>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
namespace olive
{
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QGridLayout>
#include <QLabel>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "widget/slider/integerslider.h"
namespace olive
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QGridLayout>
#include <QLabel>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "widget/slider/integerslider.h"
namespace olive
+2 -2
View File
@@ -31,8 +31,8 @@
#include <QSplitter>
#include <QStandardPaths>
#include "common/digit.h"
#include "common/qtutils.h"
#include "oakutil/digit.h"
#include "oakutil/qtutils.h"
#include "codec/exportcodec.h"
#include "codec/exportformat.h"
#include "dialog/msgbox.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QComboBox>
#include <QWidget>
#include "common/define.h"
#include "oakutil/define.h"
#include "widget/slider/integerslider.h"
#include "widget/standardcombos/standardcombos.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QComboBox>
#include <QLabel>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "dialog/export/exportformatcombobox.h"
namespace olive
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QComboBox>
#include <QWidget>
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "dialog/export/codec/av1section.h"
#include "dialog/export/codec/cineformsection.h"
#include "dialog/export/codec/codecstack.h"
@@ -24,7 +24,7 @@
#include <QWidget>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -23,7 +23,7 @@
#include <QDialog>
#include <QTreeWidget>
#include "common/define.h"
#include "oakutil/define.h"
#include "opentimelineio/timeline.h"
#include "node/project/sequence/sequence.h"
#include "node/project.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QKeySequenceEdit>
#include "common/debug.h"
#include "common/debugapp.h"
namespace olive
{
@@ -28,7 +28,7 @@
#include <QLabel>
#include <QMessageBox>
#include "common/filefunctions.h"
#include "oakutil/filefunctions.h"
#include "common/configwrapper.h"
#include "oakengine/disk.h"
#include "olive/core/core.h"
@@ -26,7 +26,7 @@
#include <QLabel>
#include <QPushButton>
#include "common/autoscroll.h"
#include "oakutil/autoscroll.h"
#include "core.h"
#include "preferencesbehaviortab.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QDialog>
#include <QProgressBar>
#include "common/debug.h"
#include "common/debugapp.h"
#include "widget/taskview/elapsedcounterwidget.h"
namespace olive
@@ -24,7 +24,7 @@
#include <QDialog>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
@@ -29,7 +29,7 @@
#include <QMessageBox>
#include <QPushButton>
#include "common/filefunctions.h"
#include "oakutil/filefunctions.h"
#include "oakengine/color.h"
#include "oakengine/disk.h"
#include "oakengine/project.h"
+3 -3
View File
@@ -32,9 +32,9 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include "common/define.h"
#include "common/filefunctions.h"
#include "common/xmlutils.h"
#include "oakutil/define.h"
#include "oakutil/filefunctions.h"
#include "oakutil/xmlutils.h"
namespace olive
{
+1 -1
View File
@@ -31,7 +31,7 @@
#include <QVBoxLayout>
#include "common/configwrapper.h"
#include "common/qtutils.h"
#include "oakutil/qtutils.h"
#include "dialog/msgbox.h"
#include "oakengine/node.h"
#include "oakengine/timeline.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#include <olive/core/core.h>
#include <QXmlStreamWriter>
#include "common/xmlutils.h"
#include "oakutil/xmlutils.h"
#include "dialog/sequence/presetmanager.h"
#include "render/videoparams.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QFontComboBox>
#include <QPlainTextEdit>
#include "common/define.h"
#include "oakutil/define.h"
#include "widget/slider/floatslider.h"
namespace olive
+1 -1
View File
@@ -28,7 +28,7 @@
#include <kddockwidgets/DockWidget.h>
#include <QEvent>
#include "common/define.h"
#include "oakutil/define.h"
#include <QTabWidget>
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QIcon>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QSettings>
#include <QWidget>
#include "common/define.h"
#include "oakutil/define.h"
namespace olive
{
+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