summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2013-11-26 09:29:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-27 22:17:11 +0100
commitb2052422d923350bd6e8a7d5426646227daebfc1 (patch)
tree9ea19f25a2e46280680d79e1720d0b8b9e07f19a /src/client/qwaylanddisplay.cpp
parentd747b0a3cac5e9a3d7c3f4f53bf9da3b88187698 (diff)
Use QScopedPointer in QWaylandDisplay for extensions
Change-Id: I783639fcefd36967f42f18417b0e07ec34b49dbb Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 3f771f1df..922c4bcb8 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -85,7 +85,7 @@ QWaylandClientBufferIntegration * QWaylandDisplay::clientBufferIntegration() con
QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() const
{
- return mWindowManagerIntegration;
+ return mWindowManagerIntegration.data();
}
QWaylandInputDevice *QWaylandDisplay::lastKeyboardFocusInputDevice() const
@@ -133,7 +133,7 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
connect(mEventThreadObject, SIGNAL(newEventsRead()), this, SLOT(flushRequests()));
- mWindowManagerIntegration = new QWaylandWindowManagerIntegration(this);
+ mWindowManagerIntegration.reset(new QWaylandWindowManagerIntegration(this));
blockingReadEvents();
@@ -213,28 +213,28 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
} else if (interface == QStringLiteral("wl_shm")) {
mShm = static_cast<struct wl_shm *>(wl_registry_bind(registry, id, &wl_shm_interface,1));
} else if (interface == QStringLiteral("wl_shell")){
- mShell = new QtWayland::wl_shell(registry, id);
+ mShell.reset(new QtWayland::wl_shell(registry, id));
} else if (interface == QStringLiteral("wl_seat")) {
QWaylandInputDevice *inputDevice = new QWaylandInputDevice(this, id);
mInputDevices.append(inputDevice);
} else if (interface == QStringLiteral("wl_data_device_manager")) {
- mDndSelectionHandler = new QWaylandDataDeviceManager(this, id);
+ mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
} else if (interface == QStringLiteral("qt_output_extension")) {
- mOutputExtension = new QtWayland::qt_output_extension(registry, id);
+ mOutputExtension.reset(new QtWayland::qt_output_extension(registry, id));
foreach (QPlatformScreen *screen, screens())
static_cast<QWaylandScreen *>(screen)->createExtendedOutput();
} else if (interface == QStringLiteral("qt_surface_extension")) {
- mWindowExtension = new QtWayland::qt_surface_extension(registry, id);
+ mWindowExtension.reset(new QtWayland::qt_surface_extension(registry, id));
} else if (interface == QStringLiteral("qt_sub_surface_extension")) {
- mSubSurfaceExtension = new QtWayland::qt_sub_surface_extension(registry, id);
+ mSubSurfaceExtension.reset(new QtWayland::qt_sub_surface_extension(registry, id));
} else if (interface == QStringLiteral("qt_touch_extension")) {
- mTouchExtension = new QWaylandTouchExtension(this, id);
+ mTouchExtension.reset(new QWaylandTouchExtension(this, id));
} else if (interface == QStringLiteral("qt_key_extension")) {
- mQtKeyExtension = new QWaylandQtKeyExtension(this, id);
+ mQtKeyExtension.reset(new QWaylandQtKeyExtension(this, id));
} else if (interface == QStringLiteral("wl_text_input_manager")) {
- mTextInputManager = new QtWayland::wl_text_input_manager(registry, id);
+ mTextInputManager.reset(new QtWayland::wl_text_input_manager(registry, id));
} else if (interface == QStringLiteral("qt_hardware_integration")) {
- mHardwareIntegration = new QWaylandHardwareIntegration(registry, id);
+ mHardwareIntegration.reset(new QWaylandHardwareIntegration(registry, id));
}
foreach (Listener l, mRegistryListeners)