From cde75446674732fdc7386f41d27eaaf92cd49dfc Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sat, 21 Mar 2015 14:42:56 +1100 Subject: WIP --- heimdall-frontend/source/PackageData.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'heimdall-frontend/source/PackageData.cpp') 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()); } -- cgit v1.2.3