Apply text change suggestions from code review
Co-authored-by: seth <getchoo@tuta.io> Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
2fb3e12492
commit
1a66db78a9
@ -67,7 +67,7 @@ void ArchiveDownloadTask::extractJava(QString input)
|
|||||||
{
|
{
|
||||||
setStatus(tr("Extracting java"));
|
setStatus(tr("Extracting java"));
|
||||||
if (input.endsWith("tar")) {
|
if (input.endsWith("tar")) {
|
||||||
setStatus(tr("Extracting java(the progress will not be reported for tar)"));
|
setStatus(tr("Extracting Java (Progress is not reported for tar archives)"));
|
||||||
QFile in(input);
|
QFile in(input);
|
||||||
if (!in.open(QFile::ReadOnly)) {
|
if (!in.open(QFile::ReadOnly)) {
|
||||||
emitFailed(tr("Unable to open supplied tar file."));
|
emitFailed(tr("Unable to open supplied tar file."));
|
||||||
@ -80,7 +80,7 @@ void ArchiveDownloadTask::extractJava(QString input)
|
|||||||
emitSucceeded();
|
emitSucceeded();
|
||||||
return;
|
return;
|
||||||
} else if (input.endsWith("tar.gz") || input.endsWith("taz") || input.endsWith("tgz")) {
|
} else if (input.endsWith("tar.gz") || input.endsWith("taz") || input.endsWith("tgz")) {
|
||||||
setStatus(tr("Extracting java(the progress will not be reported for tar)"));
|
setStatus(tr("Extracting Java (Progress is not reported for tar archives)"));
|
||||||
if (!GZTar::extract(input, QDir(m_final_path).absolutePath())) {
|
if (!GZTar::extract(input, QDir(m_final_path).absolutePath())) {
|
||||||
emitFailed(tr("Unable to extract supplied tar file."));
|
emitFailed(tr("Unable to extract supplied tar file."));
|
||||||
return;
|
return;
|
||||||
@ -95,7 +95,7 @@ void ArchiveDownloadTask::extractJava(QString input)
|
|||||||
}
|
}
|
||||||
auto files = zip->getFileNameList();
|
auto files = zip->getFileNameList();
|
||||||
if (files.isEmpty()) {
|
if (files.isEmpty()) {
|
||||||
emitFailed("Empty archive");
|
emitFailed(tr("Empty archive"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_task = makeShared<MMCZip::ExtractZipTask>(zip, m_final_path, files[0]);
|
m_task = makeShared<MMCZip::ExtractZipTask>(zip, m_final_path, files[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user