• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ossia / score / 37965809739

09 Oct 2026 05:22PM UTC coverage: 48.076% (-0.5%) from 48.588%
37965809739

push

github

jcelerier
3rdparty: pin avendish to main, now that #219 is merged

celtera/avendish#219 merged as 797b3c9d7e, so the ColorDisplay fix this
branch needs is on main and the pin no longer has to name
fix/color-display-unit-aliases. Pinned to main's tip a1f6471c53, which
also picks up #220.

Content is unchanged where it matters: the tree at the old pin and at
797b3c9d7e is byte-identical (`git diff` reports no files), and #220 on
top touches one line -- a Catch2 tag inside `if(BUILD_TESTING)` in
cmake/avendish.tests.cmake -- which score never evaluates.

Note `git cherry` is useless for checking this: #219 was squash-merged, so
its 7 commits collapsed into 1 and no patch-id matches. Compare trees, not
commits. A pin on a feature branch dies when that branch is tidied up,
which is why this matters beyond neatness.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QYyvhRXvSMSRQPaq12Teq

156491 of 325507 relevant lines covered (48.08%)

146731.39 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

1.79
/src/plugins/score-plugin-dataflow/Dataflow/DropPortInScenario.cpp
1
#include "DropPortInScenario.hpp"
2

3
#include <Scenario/Application/Drops/ScenarioDropHandler.hpp>
4
#include <Scenario/Commands/CommandAPI.hpp>
5
#include <Scenario/Commands/Interval/AddProcessToInterval.hpp>
6
#include <Scenario/Process/Algorithms/Accessors.hpp>
7
#include <Scenario/Process/ScenarioPresenter.hpp>
8

9
#include <Dataflow/PortItem.hpp>
10
namespace Dataflow
11
{
12
DropPortInScenario::DropPortInScenario() { }
3,318 ✔
13

14
bool DropPortInScenario::canDrop(const QMimeData& mime) const noexcept
×
15
{
16
  if(mime.hasFormat(score::mime::port()))
×
17
  {
18
    auto base_port = Dataflow::PortItem::clickedPort;
×
19
    if(!base_port || base_port->port().type() != Process::PortType::Message
×
20
       || qobject_cast<const Process::Outlet*>(&base_port->port()))
×
21
      return false;
×
22

23
    return bool(dynamic_cast<Dataflow::AutomatablePortItem*>(base_port));
×
24
  }
25
  return false;
×
26
}
×
27

28
bool DropPortInScenario::drop(
×
29
    const Scenario::ScenarioPresenter& pres, QPointF pos, const QMimeData& mime)
30
{
31
  if(mime.hasFormat(score::mime::port()))
×
32
  {
33
    auto base_port = Dataflow::PortItem::clickedPort;
×
34
    if(!base_port || base_port->port().type() != Process::PortType::Message
×
35
       || qobject_cast<const Process::Outlet*>(&base_port->port()))
×
36
      return false;
×
37

38
    auto port = dynamic_cast<Dataflow::AutomatablePortItem*>(base_port);
×
39
    if(!port)
×
40
      return false;
×
41

42
    Scenario::Command::Macro m{
×
43
        new Scenario::Command::AddProcessInNewBoxMacro, pres.context().context};
×
44

45
    // Create a box.
46
    const Scenario::ProcessModel& scenar = pres.model();
×
47
    Scenario::Point pt = pres.toScenarioPoint(pos);
×
48

49
    // 5 seconds.
50
    // TODO instead use a percentage of the currently displayed view
51
    TimeVal t = TimeVal::fromMsecs(5000);
×
52

53
    auto& interval = m.createBox(scenar, pt.date, pt.date + t, pt.y);
×
54

55
    // The box is always in the void, not after anything that would start it:
56
    // it starts on play, as a double-click's does, Alt or not.
57
    Scenario::addStartOnPlayTrigger(m, Scenario::startTimeSync(interval, scenar));
×
58

59
    // Create process
60
    auto ok = port->on_createAutomation(
×
61
        interval, [&](score::Command* cmd) { m.submit(cmd); }, pres.context().context);
×
62
    if(!ok)
×
63
    {
64
      return false;
×
65
    }
66

67
    m.showRack(interval);
×
68

69
    m.commit();
×
70
    return true;
×
71
  }
×
72

73
  return false;
×
74
}
×
75

76
bool DropPortInInterval::drop(
×
77
    const score::DocumentContext& ctx, const Scenario::IntervalModel& interval,
78
    QPointF p, const QMimeData& mime)
79
{
80
  if(mime.hasFormat(score::mime::port()))
×
81
  {
82
    auto base_port = Dataflow::PortItem::clickedPort;
×
83
    if(!base_port || base_port->port().type() != Process::PortType::Message
×
84
       || qobject_cast<const Process::Outlet*>(&base_port->port()))
×
85
      return false;
×
86

87
    auto port = dynamic_cast<Dataflow::AutomatablePortItem*>(base_port);
×
88
    if(!port)
×
89
      return false;
×
90

91
    Scenario::Command::Macro m{new Scenario::Command::DropProcessInIntervalMacro, ctx};
×
92
    auto ok = port->on_createAutomation(
×
93
        interval, [&](score::Command* cmd) { m.submit(cmd); }, ctx);
×
94
    if(!ok)
×
95
    {
96
      return false;
×
97
    }
98

99
    m.showRack(interval);
×
100
    m.commit();
×
101
    return true;
×
102
  }
×
103

104
  return false;
×
105
}
×
106

107
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc