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

ossia / score / 30213925900

26 Jul 2026 06:03PM UTC coverage: 15.298% (-0.01%) from 15.311%
30213925900

push

github

jcelerier
3rdparty: bump libossia for the network-context poll fix

Brings in ossia/libossia#913: SDL joystick init no longer requires haptic
support (which the Emscripten SDL2 port does not have), and
network_context::poll() restarts the io_context, without which the
WebAssembly polling path stops after its first tick.

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

30400 of 198713 relevant lines covered (15.3%)

997.67 hits per line

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

14.29
/src/plugins/score-plugin-library/Library/ProcessTreeView.cpp
1
#include "ProcessTreeView.hpp"
2

3
#include <Library/PresetListView.hpp>
4

5
#include <score/widgets/Pixmap.hpp>
6
#if defined(__EMSCRIPTEN__)
7
#include <score/widgets/ItemViewDrag.hpp>
8

9
#include <QStyleOptionViewItem>
10
#endif
11

12
#include <QDrag>
13
#include <QGuiApplication>
14
#include <QMimeData>
15
#include <QMouseEvent>
16
#include <QSortFilterProxyModel>
17

18
#include <wobjectimpl.h>
19

20
W_OBJECT_IMPL(Library::ProcessTreeView)
276✔
21
W_OBJECT_IMPL(Library::PresetListView)
236✔
22
namespace Library
23
{
24
Library::ProcessData* ProcessTreeView::dataFromViewIndex(QModelIndex idx)
×
25
{
26
  SCORE_ASSERT(idx.isValid());
×
27
  auto proxy = (QSortFilterProxyModel*)this->model();
×
28
  auto model_idx = proxy->mapToSource(idx);
×
29
  auto data = reinterpret_cast<TreeNode<ProcessData>*>(model_idx.internalPointer());
×
30
  return data;
×
31
}
32

33
void ProcessTreeView::selectionChanged(
8✔
34
    const QItemSelection& sel, const QItemSelection& desel)
35
{
36
  setDropIndicatorShown(true);
8✔
37

38
  if(!sel.isEmpty())
8✔
39
  {
40
    // guard against transient null internalPointer from async scan rebuild
41
    if(auto* data = dataFromViewIndex(sel.indexes().front()))
×
42
      selected(*data);
×
43
  }
×
44
  else if(desel.size() > 0)
8✔
45
  {
46
    selected({});
×
47
  }
×
48
}
8✔
49

50
QModelIndexList ProcessTreeView::selectedDraggableIndexes() const
×
51
{
52
  QModelIndexList indexes = selectedIndexes();
×
53
  auto m = QTreeView::model();
×
54
  auto isNotDragEnabled = [m](const QModelIndex& index) {
×
55
    return !(m->flags(index) & Qt::ItemIsDragEnabled);
×
56
  };
57
  indexes.erase(
×
58
      std::remove_if(indexes.begin(), indexes.end(), isNotDragEnabled), indexes.end());
×
59
  return indexes;
×
60
}
×
61

62
void ProcessTreeView::startDrag(Qt::DropActions)
×
63
{
64
  QModelIndexList indexes = selectedDraggableIndexes();
×
65
  if(indexes.count() == 1)
×
66
  {
67
    // auto proxy = (QSortFilterProxyModel*)this->model();
68
    // auto model_idx = proxy->mapFromSource(indexes.first());
69

70
    // QMimeData* data = proxy->mimeData(QModelIndexList{model_idx});
71
    QMimeData* data = QTreeView::model()->mimeData(indexes);
×
72
    if(!data)
×
73
      return;
×
74

75
    QDrag* drag = new QDrag(this);
×
76
    drag->setMimeData(data);
×
77
    /*
78
    auto p =
79
    score::get_pixmap(QStringLiteral(":/icons/cursor_process_audio.png"));
80
    drag->setDragCursor(p, Qt::CopyAction);
81
    drag->setDragCursor(p, Qt::MoveAction);
82
    */
83
#if defined(__EMSCRIPTEN__)
84
    QStyleOptionViewItem opt;
85
    initViewItemOption(&opt);
86
    score::setItemViewDragPixmap(*drag, *this, opt, indexes);
87
#endif
88
    drag->exec();
×
89
  }
×
90
}
×
91

92
void ProcessTreeView::mouseDoubleClickEvent(QMouseEvent* event)
×
93
{
94
  auto index = indexAt(event->pos());
×
95
  if(index.isValid())
×
96
  {
97
    auto data = dataFromViewIndex(index);
×
98
    if(data->key != UuidKey<Process::ProcessModel>{})
×
99
    {
100
      doubleClicked(*data);
×
101
      event->accept();
×
102
      return;
×
103
    }
104
  }
×
105
  QTreeView::mouseDoubleClickEvent(event);
×
106
}
×
107

108
}
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