Changeset View
Changeset View
Standalone View
Standalone View
krArc/krarc.cpp
Show First 20 Lines • Show All 481 Lines • ▼ Show 20 Line(s) | 476 | } else { | |||
---|---|---|---|---|---|
482 | if (mt.isValid()) | 482 | if (mt.isValid()) | ||
483 | emit mimeType(mt.name()); | 483 | emit mimeType(mt.name()); | ||
484 | 484 | | |||
485 | QString escapedFilename = file; | 485 | QString escapedFilename = file; | ||
486 | if(arcType == "zip") // left bracket needs to be escaped | 486 | if(arcType == "zip") // left bracket needs to be escaped | ||
487 | escapedFilename.replace('[', "[[]"); | 487 | escapedFilename.replace('[', "[[]"); | ||
488 | proc << getCmd << getPath(arcFile->url()); | 488 | proc << getCmd << getPath(arcFile->url()); | ||
489 | if (arcType != "gzip" && arcType != "bzip2" && arcType != "lzma" && arcType != "xz") proc << localeEncodedString(escapedFilename); | 489 | if (arcType != "gzip" && arcType != "bzip2" && arcType != "lzma" && arcType != "xz") proc << localeEncodedString(escapedFilename); | ||
490 | connect(&proc, SIGNAL(newOutputData(KProcess*,QByteArray&)), | 490 | connect(&proc, &KrLinecountingProcess::newOutputData, this, &kio_krarcProtocol::receivedData); | ||
491 | this, SLOT(receivedData(KProcess*,QByteArray&))); | | |||
492 | proc.setMerge(false); | 491 | proc.setMerge(false); | ||
493 | } | 492 | } | ||
494 | infoMessage(i18n("Unpacking %1...", url.fileName())); | 493 | infoMessage(i18n("Unpacking %1...", url.fileName())); | ||
495 | // change the working directory to our arcTempDir | 494 | // change the working directory to our arcTempDir | ||
496 | QDir::setCurrent(arcTempDir); | 495 | QDir::setCurrent(arcTempDir); | ||
497 | 496 | | |||
498 | SET_KRCODEC | 497 | SET_KRCODEC | ||
499 | proc.setTextModeEnabled(false); | 498 | proc.setTextModeEnabled(false); | ||
▲ Show 20 Lines • Show All 1231 Lines • ▼ Show 20 Line(s) | 1724 | if (QStandardPaths::findExecutable(tester).isEmpty()) { | |||
1731 | } | 1730 | } | ||
1732 | } | 1731 | } | ||
1733 | 1732 | | |||
1734 | QString testCmd = tester + " t -y "; | 1733 | QString testCmd = tester + " t -y "; | ||
1735 | lastData = encryptedArchPath = ""; | 1734 | lastData = encryptedArchPath = ""; | ||
1736 | 1735 | | |||
1737 | KrLinecountingProcess proc; | 1736 | KrLinecountingProcess proc; | ||
1738 | proc << testCmd << fileName; | 1737 | proc << testCmd << fileName; | ||
1739 | connect(&proc, SIGNAL(newOutputData(KProcess*,QByteArray&)), | 1738 | connect(&proc, &KrLinecountingProcess::newOutputData, this, &kio_krarcProtocol::checkOutputForPassword); | ||
1740 | this, SLOT(checkOutputForPassword(KProcess*,QByteArray&))); | | |||
1741 | proc.start(); | 1739 | proc.start(); | ||
1742 | proc.waitForFinished(); | 1740 | proc.waitForFinished(); | ||
1743 | encrypted = this->encrypted; | 1741 | encrypted = this->encrypted; | ||
1744 | 1742 | | |||
1745 | if (encrypted) | 1743 | if (encrypted) | ||
1746 | encryptedArchPath = fileName; | 1744 | encryptedArchPath = fileName; | ||
1747 | } | 1745 | } | ||
1748 | } | 1746 | } | ||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |