The pointer is out of scope by the time it's sent through wayland.
Change-Id: I00e9f050dfa47bf078921600d2bf63502f0b4897
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Ian Monroe <ian.monroe@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
}
-void ExtendedSurface::sendGenericProperty(const char *name, const QVariant &variant)
+void ExtendedSurface::sendGenericProperty(const QString &name, const QVariant &variant)
{
QByteArray byteValue;
QDataStream ds(&byteValue, QIODevice::WriteOnly);
data.size = byteValue.size();
data.data = (void*) byteValue.constData();
data.alloc = 0;
- wl_resource_post_event(m_extended_surface_resource,WL_EXTENDED_SURFACE_SET_GENERIC_PROPERTY, name,&data);
+ wl_resource_post_event(m_extended_surface_resource,WL_EXTENDED_SURFACE_SET_GENERIC_PROPERTY, qPrintable(name), &data);
}
ExtendedSurface(struct wl_client *client, uint32_t id, Surface *surface);
~ExtendedSurface();
- void sendGenericProperty(const char *name, const QVariant &variant);
+ void sendGenericProperty(const QString &name, const QVariant &variant);
void sendOnScreenVisibllity(bool visible);
void setSubSurface(ExtendedSurface *subSurface,int x, int y);
d->windowProperties.insert(name, value);
handle()->windowPropertyChanged(name,value);
if (writeUpdateToClient && d->extendedSurface) {
- const char *property = qPrintable(name);
- d->extendedSurface->sendGenericProperty(property,value);
+ d->extendedSurface->sendGenericProperty(name, value);
}
}