This commit is contained in:
Joey Yakimowich-Payne 2026-01-30 08:10:51 -07:00
commit befe57530a
3 changed files with 20 additions and 42 deletions

View file

@ -36,7 +36,7 @@ target_include_directories(warppipe
$<INSTALL_INTERFACE:include>
)
target_compile_features(warppipe PUBLIC cxx_std_17)
target_compile_features(warppipe PUBLIC cxx_std_20)
target_link_libraries(warppipe PUBLIC PkgConfig::PIPEWIRE PRIVATE nlohmann_json::nlohmann_json)
if(WARPPIPE_BUILD_EXAMPLES)

View file

@ -361,23 +361,13 @@ void WarpGraphModel::refreshFromClient() {
}
if (m_ghostNodes.erase(qtId)) {
std::vector<QtNodes::ConnectionId> gcToRemove;
for (auto gcIt = m_ghostConnections.begin();
gcIt != m_ghostConnections.end();) {
if (gcIt->outNodeId == qtId || gcIt->inNodeId == qtId) {
gcToRemove.push_back(*gcIt);
gcIt = m_ghostConnections.erase(gcIt);
} else {
++gcIt;
}
}
for (const auto &gc : gcToRemove) {
auto cIt = m_connections.find(gc);
if (cIt != m_connections.end()) {
m_connections.erase(cIt);
Q_EMIT connectionDeleted(gc);
}
}
std::erase_if(m_ghostConnections, [&](const auto &gc) {
if (gc.outNodeId != qtId && gc.inNodeId != qtId)
return false;
m_connections.erase(gc);
Q_EMIT connectionDeleted(gc);
return true;
});
Q_EMIT nodeUpdated(qtId);
}
continue;
@ -396,25 +386,13 @@ void WarpGraphModel::refreshFromClient() {
if (ghostMatch != 0) {
m_ghostNodes.erase(ghostMatch);
{
std::vector<QtNodes::ConnectionId> gcToRemove;
for (auto gcIt = m_ghostConnections.begin();
gcIt != m_ghostConnections.end();) {
if (gcIt->outNodeId == ghostMatch || gcIt->inNodeId == ghostMatch) {
gcToRemove.push_back(*gcIt);
gcIt = m_ghostConnections.erase(gcIt);
} else {
++gcIt;
}
}
for (const auto &gc : gcToRemove) {
auto cIt = m_connections.find(gc);
if (cIt != m_connections.end()) {
m_connections.erase(cIt);
Q_EMIT connectionDeleted(gc);
}
}
}
std::erase_if(m_ghostConnections, [&](const auto &gc) {
if (gc.outNodeId != ghostMatch && gc.inNodeId != ghostMatch)
return false;
m_connections.erase(gc);
Q_EMIT connectionDeleted(gc);
return true;
});
m_pwToQt.emplace(nodeInfo.id.value, ghostMatch);
auto &data = m_nodes[ghostMatch];
data.info = nodeInfo;

View file

@ -158,7 +158,7 @@ void LinkProxyError(void* data, int, int res, const char* message) {
}
static const pw_proxy_events kLinkProxyEvents = {
PW_VERSION_PROXY_EVENTS,
.version = PW_VERSION_PROXY_EVENTS,
.bound = LinkProxyBound,
.removed = LinkProxyRemoved,
.error = LinkProxyError,
@ -234,7 +234,7 @@ void StreamStateChanged(void* data,
}
static const pw_stream_events kStreamEvents = {
PW_VERSION_STREAM_EVENTS,
.version = PW_VERSION_STREAM_EVENTS,
.state_changed = StreamStateChanged,
.process = StreamProcess,
};
@ -390,7 +390,7 @@ void Client::Impl::RegistryGlobal(void* data,
PW_VERSION_METADATA, 0));
if (impl->metadata_proxy) {
static const pw_metadata_events metadata_events = {
PW_VERSION_METADATA_EVENTS,
.version = PW_VERSION_METADATA_EVENTS,
.property = MetadataProperty,
};
pw_metadata_add_listener(
@ -700,7 +700,7 @@ Status Client::Impl::ConnectLocked() {
}
static const pw_core_events core_events = {
PW_VERSION_CORE_EVENTS,
.version = PW_VERSION_CORE_EVENTS,
.done = CoreDone,
.error = CoreError,
};
@ -713,7 +713,7 @@ Status Client::Impl::ConnectLocked() {
}
static const pw_registry_events registry_events = {
PW_VERSION_REGISTRY_EVENTS,
.version = PW_VERSION_REGISTRY_EVENTS,
.global = RegistryGlobal,
.global_remove = RegistryGlobalRemove,
};