Commit 97755954 authored by Toni Asensi Esteve's avatar Toni Asensi Esteve

Rename a variable because it's only related to 7z archives

Revision: !29
parent 070f0bdd
......@@ -101,7 +101,7 @@ bool KrArcBaseManager::checkStatus(const QString &arcType, int exitCode)
return exitCode == 0;
}
QString KrArcBaseManager::detectArchive(bool &encrypted, const QString& fileName, bool checkEncrypted, bool fast)
QString KrArcBaseManager::detectArchive(bool &encrypted, const QString& fileName, bool check7zEncrypted, bool fast)
{
encrypted = false;
......@@ -196,7 +196,7 @@ QString KrArcBaseManager::detectArchive(bool &encrypted, const QString& fileName
}
} else if (type == "7z") {
// encryption check is expensive, check only if it's necessary
if (checkEncrypted)
if (check7zEncrypted)
checkIf7zIsEncrypted(encrypted, fileName);
}
return type;
......
......@@ -686,9 +686,9 @@ bool KrArcHandler::isArchive(const QUrl &url)
else return false;
}
QString KrArcHandler::getType(bool &encrypted, QString fileName, const QString& mime, bool checkEncrypted, bool fast)
QString KrArcHandler::getType(bool &encrypted, QString fileName, const QString& mime, bool check7zEncrypted, bool fast)
{
QString result = detectArchive(encrypted, std::move(fileName), checkEncrypted, fast);
QString result = detectArchive(encrypted, std::move(fileName), check7zEncrypted, fast);
if (result.isNull()) {
// Then the type is based on the mime type
return getShortTypeFromMime(mime);
......
......@@ -73,7 +73,7 @@ public:
// returns `true` if the url is an archive (ie: tar:/home/test/file.tar.bz2)
static bool isArchive(const QUrl &url);
// used to determine the type of the archive
QString getType(bool &encrypted, QString fileName, const QString& mime, bool checkEncrypted = true, bool fast = false);
QString getType(bool &encrypted, QString fileName, const QString& mime, bool check7zEncrypted = true, bool fast = false);
// queries the password from the user
static QString getPassword(const QString& path);
// detects the archive type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment