kemu: plug memory leak

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-08-08 00:49:27 +03:00
parent 13de02bdd6
commit 30195010f1
3 changed files with 4 additions and 6 deletions

View file

@ -153,6 +153,7 @@ KEmuMainWindow::~KEmuMainWindow()
m_settings->sync();
}
m_settings->deleteLater();
m_interface->deleteLater();
delete m_kemuui;
}

View file

@ -29,7 +29,7 @@ KEmuControlRunner::KEmuControlRunner(QObject *parent, const QVariantList& args)
{
Q_UNUSED(args);
setObjectName(QLatin1String("QEMU virtual machine manager runner"));
setObjectName("QEMU virtual machine manager runner");
setSpeed(AbstractRunner::SlowSpeed);
connect(this, SIGNAL(prepare()), this, SLOT(prep()));
@ -64,7 +64,7 @@ void KEmuControlRunner::match(Plasma::RunnerContext &context)
if (!isrunning) {
Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::PossibleMatch);
match.setIcon(KIcon(QLatin1String("system-run")));
match.setIcon(KIcon("system-run"));
match.setText(i18n("Start %1 virtual machine", machine));
match.setData(QStringList() << "start" << machine);
context.addMatch(term, match);
@ -76,7 +76,7 @@ void KEmuControlRunner::match(Plasma::RunnerContext &context)
if (isrunning) {
Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::PossibleMatch);
match.setIcon(KIcon(QLatin1String("system-shutdown")));
match.setIcon(KIcon("system-shutdown"));
match.setText(i18n("Stop %1 virtual machine", machine));
match.setData(QStringList() << "stop" << machine);
context.addMatch(term, match);

View file

@ -21,9 +21,6 @@
#include <plasma/abstractrunner.h>
#include <KIcon>
#include <KUrl>
class KEmuControlRunner : public Plasma::AbstractRunner
{
Q_OBJECT