Commit 41c9008d authored by Boudewijn Rempt's avatar Boudewijn Rempt

fix memory leak

svn path=/trunk/koffice/; revision=1027694
parent d63cc82b
......@@ -123,6 +123,12 @@ KisPaintopBox::~KisPaintopBox()
{
// Do not delete the widget, since it it is global to the application, not owned by the view
m_presetsPopup->setPaintOpSettingsWidget(0);
foreach(const PresetMap& h, m_inputDevicePresets.values()) {
foreach(KisPaintOpPresetSP preset, h.values()) {
preset.clear();
}
}
}
void KisPaintopBox::addItem(const KoID & paintop, const QString & /*category*/)
......
......@@ -106,7 +106,8 @@ private:
typedef QHash<KoInputDevice, KoID> InputDevicePaintopMap;
InputDevicePaintopMap m_currentID;
typedef QHash<KoInputDevice, QHash<QString, KisPaintOpPresetSP> > InputDevicePresetsMap;
typedef QHash<QString, KisPaintOpPresetSP> PresetMap;
typedef QHash<KoInputDevice, PresetMap > InputDevicePresetsMap;
InputDevicePresetsMap m_inputDevicePresets;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment