Commit 0758d112 authored by Stefano Bonicatti's avatar Stefano Bonicatti

Another round of memory leak fixes

I've reverted one of the changes done in
3a994d66 since it was
redundant/unnecessary.
parent a11fc4f2
......@@ -42,10 +42,15 @@ public:
public:
KisUpdateJobItem(QReadWriteLock *exclusiveJobLock)
: m_exclusiveJobLock(exclusiveJobLock),
m_type(EMPTY)
m_type(EMPTY),
m_runnableJob(0)
{
setAutoDelete(false);
}
~KisUpdateJobItem()
{
delete m_runnableJob;
}
void run() {
if(m_exclusive) {
......@@ -60,6 +65,7 @@ public:
Q_ASSERT(m_type == STROKE || m_type == SPONTANEOUS);
m_runnableJob->run();
delete m_runnableJob;
m_runnableJob = 0;
}
setDone();
......
......@@ -83,6 +83,7 @@ KisUpdateScheduler::KisUpdateScheduler()
KisUpdateScheduler::~KisUpdateScheduler()
{
delete m_d->progressUpdater;
delete m_d;
}
void KisUpdateScheduler::connectSignals()
......
......@@ -29,6 +29,10 @@ class KisInputProfile::Private
{
public:
Private() { }
~Private()
{
qDeleteAll(shortcuts);
}
QString name;
QMultiHash<KisAbstractInputAction *, KisShortcutConfiguration *> shortcuts;
......@@ -42,7 +46,7 @@ KisInputProfile::KisInputProfile(QObject *parent)
KisInputProfile::~KisInputProfile()
{
delete d;
}
QString KisInputProfile::name() const
......
......@@ -433,6 +433,10 @@ KisPaintopBox::~KisPaintopBox()
m_presetsPopup->setPaintOpSettingsWidget(0);
qDeleteAll(m_paintopOptionWidgets);
delete m_favoriteResourceManager;
for (int i = 0; i < 3; ++i) {
delete m_sliderChooser[i];
}
}
void KisPaintopBox::restoreResource(KoResource* resource)
......
......@@ -168,8 +168,11 @@ KisColorFilterCombo::KisColorFilterCombo(QWidget *parent)
setModel(newModel);
setView(new FullSizedListView);
view()->installEventFilter(new ComboEventFilter(this));
view()->viewport()->installEventFilter(new ComboEventFilter(this));
m_eventFilters.append(new ComboEventFilter(this));
m_eventFilters.append(new ComboEventFilter(this));
view()->installEventFilter(m_eventFilters[0]);
view()->viewport()->installEventFilter(m_eventFilters[1]);
KisNodeViewColorScheme scm;
......@@ -206,6 +209,7 @@ KisColorFilterCombo::KisColorFilterCombo(QWidget *parent)
KisColorFilterCombo::~KisColorFilterCombo()
{
qDeleteAll(m_eventFilters);
}
void collectAvailableLabels(KisNodeSP root, QSet<int> *labels)
......
......@@ -24,6 +24,7 @@
#include "kritaui_export.h"
#include "kis_types.h"
class ComboEventFilter;
class KRITAUI_EXPORT KisColorFilterCombo : public QComboBox
{
......@@ -49,6 +50,7 @@ private:
private:
struct Private;
const QScopedPointer<Private> m_d;
QList<ComboEventFilter *> m_eventFilters;
};
#endif /* __KIS_COLOR_FILTER_COMBO_H */
......@@ -58,6 +58,8 @@ KisWidgetChooser::KisWidgetChooser(int id, QWidget* parent)
KisWidgetChooser::~KisWidgetChooser()
{
delete m_buttons;
delete m_popup;
delete m_arrowButton;
}
void KisWidgetChooser::updateArrowIcon()
......
......@@ -189,6 +189,7 @@ protected:
{
delete d->colorProfile;
delete[] d->qcolordata;
delete d->defaultTransformations;
delete d;
}
......
......@@ -186,6 +186,9 @@ PaletteDockerDock::~PaletteDockerDock()
KisConfig cfg;
cfg.setDefaultPalette(m_currentColorSet->name());
}
delete m_wdgPaletteDock->paletteView->itemDelegate();
delete m_wdgPaletteDock;
}
void PaletteDockerDock::setMainWindow(KisViewManager* kisview)
......
......@@ -37,7 +37,7 @@ class PAINTOP_EXPORT KisCurveOptionWidget : public KisPaintOpOption
Q_OBJECT
public:
KisCurveOptionWidget(KisCurveOption* curveOption, const QString &minLabel, const QString &maxLabel, bool hideSlider = false);
virtual ~KisCurveOptionWidget();
~KisCurveOptionWidget();
virtual void writeOptionSetting(KisPropertiesConfiguration* setting) const;
virtual void readOptionSetting(const KisPropertiesConfiguration* setting);
......
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