Dialer segfaults on master branch (migration to Qt6)
Hi, someone may already have recognized this, but I haven't found any trace of activity on this, then I will try and report this to make it evident.
Plasma dialer on the master branch segfaults at start. Tested on pmOS edge with nightly Plasma6 repository on my op6-enchilada.
As far as I can tell, this happens because Qt5 had
void QWaylandClientExtension::addRegistryListener()
{
Q_D(QWaylandClientExtension);
if (!d->registered) {
d->waylandIntegration->display()->addRegistryListener(&QWaylandClientExtensionPrivate::handleRegistryGlobal, this);
d->registered = true;
}
}
but that method is no more available in Qt6. That method got changed (commit ) from QWaylandClientExtension::addRegistryListener()
to QWaylandClientExtension::initialize()
, later modified further.
Actual method is
void QWaylandClientExtension::initialize()
{
Q_D(QWaylandClientExtension);
if (d->active) {
return;
}
const QtWaylandClient::QWaylandDisplay *display = d->waylandIntegration->display();
const auto globals = display->globals();
auto global =
std::find_if(globals.cbegin(), globals.cend(), [this](const RegistryGlobal &global) {
return global.interface == QLatin1String(extensionInterface()->name);
});
if (global != globals.cend()) {
bind(global->registry, global->id, global->version);
d->active = true;
emit activeChanged();
}
}
Could anybody please check if method behaves the same as the old one, i.e. if we can just change QWaylandClientExtension::addRegistryListener()
to QWaylandClientExtension::initialize()
in plasma-dialer/src/main.cpp#L83?