Browse Source

Revert "Call close(); on QProcess"

master
probonopd 7 years ago
committed by GitHub
parent
commit
c8016ad707
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      tools/linuxdeployqt/shared.cpp

11
tools/linuxdeployqt/shared.cpp

@ -307,7 +307,6 @@ bool copyCopyrightFile(QString libPath){
myProcess->start(dpkgPath, arguments);
myProcess->waitForFinished();
QString strOut = myProcess->readAllStandardOutput().split(':')[0];
myProcess.close();
if(strOut == "") return false;
/* Find out the copyright file in that package */
@ -315,7 +314,6 @@ bool copyCopyrightFile(QString libPath){
myProcess->start(dpkgQueryPath, arguments);
myProcess->waitForFinished();
strOut = myProcess->readAllStandardOutput();
myProcess.close();
QStringList outputLines = strOut.split("\n", QString::SkipEmptyParts);
@ -357,7 +355,6 @@ LddInfo findDependencyInfo(const QString &binaryPath)
QProcess ldd;
ldd.start("ldd", QStringList() << binaryPath);
ldd.waitForFinished();
myProcess.close();
if (ldd.exitStatus() != QProcess::NormalExit || ldd.exitCode() != 0) {
LogError() << "findDependencyInfo:" << ldd.readAllStandardError();
@ -613,7 +610,6 @@ QSet<QString> getBinaryRPaths(const QString &path, bool resolve = true, QString
}
objdump.waitForFinished();
objdump.close();
if (objdump.exitCode() != 0) {
LogError() << "getBinaryRPaths:" << objdump.readAllStandardError();
@ -780,7 +776,6 @@ QString runPatchelf(QStringList options)
exit(1);
}
patchelftool.waitForFinished();
patchelftool.close();
if (patchelftool.exitCode() != 0) {
LogError() << "runPatchelf:" << patchelftool.readAllStandardError();
// LogError() << "runPatchelf:" << patchelftool.readAllStandardOutput();
@ -929,7 +924,6 @@ void runStrip(const QString &binaryPath)
// exit(1); // Do not exit because this could be a script that patchelf can't work on
}
patchelfread.waitForFinished();
patchelfread.close();
if (patchelfread.exitCode() != 0){
LogError() << "Error reading rpath with patchelf" << QFileInfo(resolvedPath).completeBaseName() << ":" << patchelfread.readAllStandardError();
@ -959,7 +953,6 @@ void runStrip(const QString &binaryPath)
exit(1);
}
strip.waitForFinished();
strip.close();
if (strip.exitCode() == 0)
return;
@ -1059,7 +1052,7 @@ static QString captureOutput(const QString &command)
QProcess process;
process.start(command, QIODevice::ReadOnly);
process.waitForFinished();
process.close();
if (process.exitStatus() != QProcess::NormalExit) {
LogError() << command << "crashed:" << process.readAllStandardError();
} else if (process.exitCode() != 0) {
@ -1525,7 +1518,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo,
return false;
}
qmlImportScanner.waitForFinished();
qmlImportScanner.close();
// log qmlimportscanner errors
qmlImportScanner.setReadChannel(QProcess::StandardError);
QByteArray errors = qmlImportScanner.readAll();

Loading…
Cancel
Save