[education/rkward] rkward/windows: Fix minor leak
Thomas Friedrichsmeier
null at kde.org
Sat Mar 26 14:38:57 GMT 2022
Git commit cdea00a4bb6d138af4a5c7f2a796bce3f2ee6dcb by Thomas Friedrichsmeier.
Committed on 26/03/2022 at 14:38.
Pushed by tfry into branch 'master'.
Fix minor leak
M +4 -3 rkward/windows/rktoplevelwindowgui.cpp
https://invent.kde.org/education/rkward/commit/cdea00a4bb6d138af4a5c7f2a796bce3f2ee6dcb
diff --git a/rkward/windows/rktoplevelwindowgui.cpp b/rkward/windows/rktoplevelwindowgui.cpp
index 5f393d38..6aa4ef04 100644
--- a/rkward/windows/rktoplevelwindowgui.cpp
+++ b/rkward/windows/rktoplevelwindowgui.cpp
@@ -92,12 +92,12 @@ RKTopLevelWindowGUI::RKTopLevelWindowGUI(KXmlGuiWindow *for_window) : QObject(fo
action->setText (i18n ("Activate Document view"));
actionCollection ()->setDefaultShortcut (action, Qt::AltModifier + Qt::Key_0);
- action = new QAction(i18n("Show Output"));
+ action = actionCollection()->addAction("output_show");
+ action->setText(i18n("Show Output"));
+ action->setIcon(RKStandardIcons::getIcon(RKStandardIcons::WindowOutput));
action->setMenu(output_windows_menu = new QMenu());
connect(output_windows_menu, &QMenu::aboutToShow, this, &RKTopLevelWindowGUI::populateOutputWindowsMenu);
connect(output_windows_menu, &QMenu::triggered, this, &RKTopLevelWindowGUI::slotOutputShow);
- action->setIcon(RKStandardIcons::getIcon(RKStandardIcons::WindowOutput));
- actionCollection()->addAction("output_show", action);
// settings
KStandardAction::keyBindings (this, SLOT (configureShortcuts()), actionCollection ());
@@ -107,6 +107,7 @@ RKTopLevelWindowGUI::RKTopLevelWindowGUI(KXmlGuiWindow *for_window) : QObject(fo
RKTopLevelWindowGUI::~RKTopLevelWindowGUI () {
RK_TRACE (APP);
delete help_menu_dummy;
+ delete output_windows_menu;
}
void RKTopLevelWindowGUI::initToolWindowActions () {
More information about the rkward-tracker
mailing list