Changeset View
Changeset View
Standalone View
Standalone View
krusader/krslots.cpp
Show First 20 Lines • Show All 679 Lines • ▼ Show 20 Line(s) | 678 | if (*KrActions::execTypeArray[i] == KrActions::actExecTerminalEmbedded) { | |||
---|---|---|---|---|---|
680 | MAIN_VIEW->terminalDock()->initialise(); | 680 | MAIN_VIEW->terminalDock()->initialise(); | ||
681 | } | 681 | } | ||
682 | KConfigGroup grp(krConfig, "Private"); | 682 | KConfigGroup grp(krConfig, "Private"); | ||
683 | grp.writeEntry("Command Execution Mode", i); | 683 | grp.writeEntry("Command Execution Mode", i); | ||
684 | break; | 684 | break; | ||
685 | } | 685 | } | ||
686 | } | 686 | } | ||
687 | 687 | | |||
688 | void KRslots::slotDiskUsage() | 688 | void KRslots::slotDiskUsage() | ||
abika: Memory leak here! | |||||
Alex, I'm actually not sure how to resolve this leak. It's the creation of a new window which is destructed by closing it or closing Krusader. Other non-modal windows (Synchronizer, Search, Locate) are created in similar fashion. I'm probably not experienced enough for this, please advise :). martinkostolny: Alex, I'm actually not sure how to resolve this leak. It's the creation of a new window which… | |||||
Hello, DiskUsageGUI *du = new DiskUsageGUI(ACTIVE_PANEL->virtualPath(), 0); du->setAttribute(Qt::WA_DeleteOnClose); du->show(); miroslavm: Hello,
I have also thought that the destructor will destroy the object after closing. I have… | |||||
689 | { | 689 | { | ||
690 | DiskUsageGUI du(ACTIVE_PANEL->virtualPath(), MAIN_VIEW); | 690 | DiskUsageGUI *du = new DiskUsageGUI(ACTIVE_PANEL->virtualPath(), 0); | ||
691 | du->showConditional(); | ||||
691 | } | 692 | } | ||
692 | 693 | | |||
693 | void KRslots::applicationStateChanged() | 694 | void KRslots::applicationStateChanged() | ||
694 | { | 695 | { | ||
695 | if (MAIN_VIEW == 0) { /* CRASH FIX: it's possible that the method is called after destroying the main view */ | 696 | if (MAIN_VIEW == 0) { /* CRASH FIX: it's possible that the method is called after destroying the main view */ | ||
696 | return; | 697 | return; | ||
697 | } | 698 | } | ||
698 | if(qApp->applicationState() == Qt::ApplicationActive || | 699 | if(qApp->applicationState() == Qt::ApplicationActive || | ||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |
Memory leak here!