From 1ec7ec1bda20f0c037b4d2fa834f4acf0d35e9d3 Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Sun, 11 Jan 2015 00:41:59 +0100 Subject: Manual heap object deletion is leaky - let's not do it --- daemon/appinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'daemon/appinfo.cpp') diff --git a/daemon/appinfo.cpp b/daemon/appinfo.cpp index 939b569..f4a32c3 100644 --- a/daemon/appinfo.cpp +++ b/daemon/appinfo.cpp @@ -179,7 +179,7 @@ QString AppInfo::getJSApp() const { if (!isValid() || !isLocal()) return QString(); - QIODevice *appJS = openFile(AppInfo::APPJS); + QScopedPointer appJS(openFile(AppInfo::APPJS)); if (!appJS) { qCWarning(l) << "cannot find app" << d->path << "app.js"; return QString(); @@ -205,7 +205,7 @@ AppInfo AppInfo::fromPath(const QString &path) info.d->path = path; - QIODevice *appInfoJSON = info.openFile(AppInfo::INFO); + QScopedPointer appInfoJSON(info.openFile(AppInfo::INFO)); if (!appInfoJSON) { qCWarning(l) << "cannot find app" << path << "info json"; return AppInfo(); -- cgit v1.2.3