diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-11 00:41:59 +0100 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-11 00:41:59 +0100 |
| commit | 1ec7ec1bda20f0c037b4d2fa834f4acf0d35e9d3 (patch) | |
| tree | 3e81b8b84481a3c1ea0a07efa0b16fa11e97e436 /daemon/appinfo.cpp | |
| parent | f92941ec79d8ddaf772a7f1e21600c447af87ecd (diff) | |
Manual heap object deletion is leaky - let's not do it
Diffstat (limited to 'daemon/appinfo.cpp')
| -rw-r--r-- | daemon/appinfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<QIODevice> 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<QIODevice> appInfoJSON(info.openFile(AppInfo::INFO)); if (!appInfoJSON) { qCWarning(l) << "cannot find app" << path << "info json"; return AppInfo(); |
