fix: remaining issues recorded during test coverage work

- RenderManager: GPU-side members (context_, decoder_cache_,
  shader_cache_, auto_cacher_, worker_pool_, decoder_clear_timer_) were
  left uninitialized when the configured graphics backend is unknown
  (e.g. dummy); ViewerWidget then dereferenced garbage and crashed.
  Initialize them at declaration
- CurveView::SelectKeyframesOfInput ignored its reference parameter and
  selected keyframes of every connected track; select only the
  requested track's keyframes
- SeekableWidget::SeekToScenePoint dereferenced GetViewerNode()
  unconditionally; skip the playhead update when no viewer is connected
- LoadOTIOTask: unknown root schema leaked the freshly allocated
  project_ (delete + reset; OTIO is not enabled in local builds so this
  file is compile-verified by inspection only)

Locked by new tests: RenderManagerDummyBackend,
TimeRuler.SeekToScenePointWithoutViewerIsNoOp,
CurveViewTest.SelectKeyframesOfInputSelectsOnlyRequestedTrack
This commit is contained in:
2026-07-17 17:20:50 +08:00
parent 7223900b6d
commit 004e942cf9
7 changed files with 77 additions and 13 deletions
@@ -344,6 +344,34 @@ TEST_F(CurveViewTest, SetKeyframeTrackColorAppliesToBrush)
EXPECT_EQ(connection->GetBrush().color(), QColor(Qt::blue));
}
TEST_F(CurveViewTest, SelectKeyframesOfInputSelectsOnlyRequestedTrack)
{
class SelectionProbeCurveView : public CurveView {
public:
using KeyframeView::IsKeyframeSelected;
};
SelectionProbeCurveView view;
view.ConnectInput(ColorTrackRef(0));
view.ConnectInput(ColorTrackRef(1));
NodeKeyframe *key0 =
InsertKeyframe(solid_, SolidGenerator::kColorInput, rational(0), 0.5, 0);
NodeKeyframe *key1 =
InsertKeyframe(solid_, SolidGenerator::kColorInput, rational(1), 0.6, 1);
// Previously the reference was ignored and keyframes of every connected
// track got selected.
view.SelectKeyframesOfInput(ColorTrackRef(0));
EXPECT_TRUE(view.IsKeyframeSelected(key0));
EXPECT_FALSE(view.IsKeyframeSelected(key1));
// Selecting the other track replaces the selection (DeselectAll first)
view.SelectKeyframesOfInput(ColorTrackRef(1));
EXPECT_FALSE(view.IsKeyframeSelected(key0));
EXPECT_TRUE(view.IsKeyframeSelected(key1));
}
TEST(CurveWidget, VerticalScaleRoundTripsThroughView)
{
ColorManager::SetUpDefaultConfig();