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

ossia / score / 36095816006

25 Sep 2026 04:46AM UTC coverage: 42.219% (-0.01%) from 42.23%
36095816006

Pull #2304

github

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

39 of 229 new or added lines in 13 files covered. (17.03%)

160 existing lines in 12 files now uncovered.

125818 of 298010 relevant lines covered (42.22%)

117820.05 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