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

ossia / score / 36173900300

25 Sep 2026 06:30PM UTC coverage: 42.234% (+0.004%) from 42.23%
36173900300

Pull #2304

github

web-flow
Merge f49c5df7b into c0c64ec39
Pull Request #2304: QML API additions, and three teardown fixes

135 of 408 new or added lines in 22 files covered. (33.09%)

181 existing lines in 15 files now uncovered.

125892 of 298079 relevant lines covered (42.23%)

117687.12 hits per line

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

0.0
/src/plugins/score-plugin-js/JS/Commands/ScriptCommand.cpp
1
#include "ScriptCommand.hpp"
2

3
#include <JS/ApplicationPlugin.hpp>
4

5
#include <score/application/GUIApplicationContext.hpp>
6
#include <score/serialization/DataStreamVisitor.hpp>
7

8
namespace JS
9
{
10

NEW
11
ScriptCommand::ScriptCommand(
×
12
    QString handler, QByteArray undoPayload, QByteArray redoPayload)
NEW
13
    : m_handler{std::move(handler)}
×
NEW
14
    , m_undo{std::move(undoPayload)}
×
NEW
15
    , m_redo{std::move(redoPayload)}
×
NEW
16
{
×
NEW
17
}
×
18

NEW
19
void ScriptCommand::undo(const score::DocumentContext&) const
×
20
{
NEW
21
  dispatch(m_undo);
×
NEW
22
}
×
23

NEW
24
void ScriptCommand::redo(const score::DocumentContext&) const
×
25
{
NEW
26
  dispatch(m_redo);
×
NEW
27
}
×
28

NEW
29
void ScriptCommand::dispatch(const QByteArray& payload) const
×
30
{
NEW
31
  auto plug = score::GUIAppContext().findGuiApplicationPlugin<JS::ApplicationPlugin>();
×
NEW
32
  if(!plug)
×
NEW
33
    return;
×
NEW
34
  plug->callCommandHandler(m_handler, payload);
×
NEW
35
}
×
36

NEW
37
void ScriptCommand::serializeImpl(DataStreamInput& s) const
×
38
{
NEW
39
  s << m_handler << m_undo << m_redo;
×
NEW
40
}
×
41

NEW
42
void ScriptCommand::deserializeImpl(DataStreamOutput& s)
×
43
{
NEW
44
  s >> m_handler >> m_undo >> m_redo;
×
NEW
45
}
×
46
}
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