diff options
author | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2015-03-21 04:42:56 +0100 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2015-03-21 04:42:56 +0100 |
commit | cde75446674732fdc7386f41d27eaaf92cd49dfc (patch) | |
tree | 773f48f3e8c4fe1003e9486a8dd4cb5546c9d0b3 /heimdall-frontend/source/PackageData.cpp | |
parent | QList properties are now accessible in QML via QQmlListProperty (diff) | |
download | Heimdall-upstream/master.tar Heimdall-upstream/master.tar.gz Heimdall-upstream/master.tar.bz2 Heimdall-upstream/master.tar.lz Heimdall-upstream/master.tar.xz Heimdall-upstream/master.tar.zst Heimdall-upstream/master.zip |
Diffstat (limited to '')
-rw-r--r-- | heimdall-frontend/source/PackageData.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/heimdall-frontend/source/PackageData.cpp b/heimdall-frontend/source/PackageData.cpp index c17917b..42718bf 100644 --- a/heimdall-frontend/source/PackageData.cpp +++ b/heimdall-frontend/source/PackageData.cpp @@ -38,17 +38,17 @@ PackageData::PackageData() PackageData::~PackageData() { - Clear(true); + Clear(); } -void PackageData::Clear(bool deletePackageDirectory) +void PackageData::Clear(void) { - if (deletePackageDirectory) + for (QDir& dir : ownedDirectories) { - packageDirectory.removeRecursively(); + dir.removeRecursively(); } - packageDirectory.setPath(QString()); + ownedDirectories.clear(); firmwareInfo.Clear(); filePaths.clear(); } @@ -71,7 +71,7 @@ bool PackageData::ReadFirmwareInfo(const QString& path) bool PackageData::IsCleared(void) const { - return (packageDirectory.path().length() == 0 + return (ownedDirectories.length() == 0 && firmwareInfo.IsCleared() && filePaths.isEmpty()); } |