summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-10-30 10:22:36 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-11-03 23:24:58 +0100
commitdce44534850548eefb8f060e51869fe906ca5ad4 (patch)
tree504d7d96d7ed55af8c79c6c1139708b358bb5dbe /src/plugins/platforms
parentcca4eb45c5e1a70d2c39cad2d77abf0b986bc087 (diff)
Prevent a leak of QXcbXSettingsPrivate
The private was not deleted. Adding the dtor in turn causes a warning about not having a virtual dtor in the base class, so add that as well. Change-Id: I24a90caf2cf6192a6f17cf5af96b8f77010d9127 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h1
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 51c7c91bf6..f31ecf8e03 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -324,6 +324,7 @@ private:
class QXcbWindowEventListener
{
public:
+ virtual ~QXcbWindowEventListener() {}
virtual bool handleGenericEvent(xcb_generic_event_t *, long *) { return false; }
virtual void handleExposeEvent(const xcb_expose_event_t *) {}
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp
index 6f2e60c9be..13d42832db 100644
--- a/src/plugins/platforms/xcb/qxcbxsettings.cpp
+++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp
@@ -262,6 +262,12 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen)
d_ptr->initialized = true;
}
+QXcbXSettings::~QXcbXSettings()
+{
+ delete d_ptr;
+ d_ptr = 0;
+}
+
bool QXcbXSettings::initialized() const
{
Q_D(const QXcbXSettings);
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.h b/src/plugins/platforms/xcb/qxcbxsettings.h
index 717fe559c9..3496cedf36 100644
--- a/src/plugins/platforms/xcb/qxcbxsettings.h
+++ b/src/plugins/platforms/xcb/qxcbxsettings.h
@@ -45,6 +45,7 @@ class QXcbXSettings : public QXcbWindowEventListener
Q_DECLARE_PRIVATE(QXcbXSettings)
public:
QXcbXSettings(QXcbScreen *screen);
+ ~QXcbXSettings();
bool initialized() const;
QVariant setting(const QByteArray &property) const;