SVN commit 488410 by cgilles:
Digikam from stable : fix memory leak : KAboutData isn't cleaned automaticly by KDE lib. CCMAIL: [hidden email] M +1 -0 ctrlpaneldialog.cpp M +7 -1 imagedialogbase.cpp M +3 -1 imagedialogbase.h M +6 -1 imageguidedialog.cpp M +2 -0 imageguidedialog.h --- branches/stable/extragear/graphics/digikamimageplugins/common/dialogs/ctrlpaneldialog.cpp #488409:488410 @@ -67,6 +67,7 @@ m_currentRenderingMode = NoneRendering; m_timer = 0L; m_threadedFilter = 0L; + m_about = 0L; QString whatsThis; setButtonWhatsThis ( Default, i18n("<p>Reset all filter parameters to their default values.") ); --- branches/stable/extragear/graphics/digikamimageplugins/common/dialogs/imagedialogbase.cpp #488409:488410 @@ -68,6 +68,8 @@ { kapp->setOverrideCursor( KCursor::waitCursor() ); + m_about = 0L; + setButtonWhatsThis ( Default, i18n("<p>Reset all filter parameters to their default values.") ); setButtonWhatsThis ( User3, i18n("<p>Load all filter parameters from settings text file.") ); setButtonWhatsThis ( User2, i18n("<p>Save all filter parameters to settings text file.") ); @@ -94,6 +96,9 @@ ImageDialogBase::~ImageDialogBase() { saveDialogSize(m_name + QString::QString(" Tool Dialog")); + + if (m_about) + delete m_about; } void ImageDialogBase::slotHelp() @@ -103,8 +108,9 @@ void ImageDialogBase::setAboutData(KAboutData *about) { + m_about = about; QPushButton *helpButton = actionButton( Help ); - KHelpMenu* helpMenu = new KHelpMenu(this, about, false); + KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); helpButton->setPopup( helpMenu->menu() ); --- branches/stable/extragear/graphics/digikamimageplugins/common/dialogs/imagedialogbase.h #488409:488410 @@ -60,7 +60,9 @@ QWidget *m_parent; QString m_name; - + + KAboutData *m_about; + private slots: void slotHelp(); --- branches/stable/extragear/graphics/digikamimageplugins/common/dialogs/imageguidedialog.cpp #488409:488410 @@ -72,6 +72,7 @@ m_currentRenderingMode = NoneRendering; m_timer = 0L; m_threadedFilter = 0L; + m_about = 0L; QString whatsThis; setButtonWhatsThis ( Default, i18n("<p>Reset all filter parameters to their default values.") ); @@ -164,6 +165,9 @@ if (m_threadedFilter) delete m_threadedFilter; + + if (m_about) + delete m_about; } void ImageGuideDialog::readSettings(void) @@ -212,8 +216,9 @@ void ImageGuideDialog::setAboutData(KAboutData *about) { + m_about = about; QPushButton *helpButton = actionButton( Help ); - KHelpMenu* helpMenu = new KHelpMenu(this, about, false); + KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); helpButton->setPopup( helpMenu->menu() ); --- branches/stable/extragear/graphics/digikamimageplugins/common/dialogs/imageguidedialog.h #488409:488410 @@ -98,6 +98,8 @@ KProgress *m_progressBar; KColorButton *m_guideColorBt; + + KAboutData *m_about; private slots: _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |