From 1d778f46005454bbac4add01d6e0987c50c0d605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 25 Aug 2013 16:17:20 +0200 Subject: [PATCH] c++ cannot invoke other constructors BUG: 324004 FIXED-IN: 4.11.1 BUG: 112274 --- libkwineffects/kwinxrenderutils.cpp | 7 ++++++- libkwineffects/kwinxrenderutils.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libkwineffects/kwinxrenderutils.cpp b/libkwineffects/kwinxrenderutils.cpp index cfd3bc5859..270474f581 100644 --- a/libkwineffects/kwinxrenderutils.cpp +++ b/libkwineffects/kwinxrenderutils.cpp @@ -110,13 +110,18 @@ static xcb_render_picture_t createPicture(xcb_pixmap_t pix, int depth) XRenderPicture::XRenderPicture(const QPixmap &pix) { if (Extensions::nonNativePixmaps()) { - XRenderPicture(pix.toImage()); + fromImage(pix.toImage()); } else { d = new XRenderPictureData(createPicture(pix.handle(), pix.depth())); } } XRenderPicture::XRenderPicture(const QImage &img) +{ + fromImage(img); +} + +void XRenderPicture::fromImage(const QImage &img) { const int depth = img.depth(); xcb_pixmap_t xpix = xcb_generate_id(connection()); diff --git a/libkwineffects/kwinxrenderutils.h b/libkwineffects/kwinxrenderutils.h index a02028d766..697c82d691 100644 --- a/libkwineffects/kwinxrenderutils.h +++ b/libkwineffects/kwinxrenderutils.h @@ -74,6 +74,7 @@ public: XRenderPicture(xcb_pixmap_t pix, int depth); operator xcb_render_picture_t(); private: + void fromImage(const QImage &img); KSharedPtr< XRenderPictureData > d; };