Changeset View
Changeset View
Standalone View
Standalone View
krusader/Archive/kr7zencryptionchecker.cpp
Show All 18 Lines | |||||
19 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | 19 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | ||
20 | *****************************************************************************/ | 20 | *****************************************************************************/ | ||
21 | 21 | | |||
22 | #include "kr7zencryptionchecker.h" | 22 | #include "kr7zencryptionchecker.h" | ||
23 | 23 | | |||
24 | Kr7zEncryptionChecker::Kr7zEncryptionChecker() : KProcess(), encrypted(false), lastData() | 24 | Kr7zEncryptionChecker::Kr7zEncryptionChecker() : KProcess(), encrypted(false), lastData() | ||
25 | { | 25 | { | ||
26 | setOutputChannelMode(KProcess::SeparateChannels); // without this output redirection has no effect! | 26 | setOutputChannelMode(KProcess::SeparateChannels); // without this output redirection has no effect! | ||
27 | connect(this, SIGNAL(readyReadStandardOutput()), SLOT(receivedOutput())); | 27 | connect(this, &Kr7zEncryptionChecker::readyReadStandardOutput, this, [=]() {receivedOutput(); }); | ||
28 | } | 28 | } | ||
29 | 29 | | |||
30 | void Kr7zEncryptionChecker::setupChildProcess() | 30 | void Kr7zEncryptionChecker::setupChildProcess() | ||
31 | { | 31 | { | ||
32 | // This function is called after the fork but for the exec. We create a process group | 32 | // This function is called after the fork but for the exec. We create a process group | ||
33 | // to work around a broken wrapper script of 7z. Without this only the wrapper is killed. | 33 | // to work around a broken wrapper script of 7z. Without this only the wrapper is killed. | ||
34 | setsid(); // make this process leader of a new process group | 34 | setsid(); // make this process leader of a new process group | ||
35 | } | 35 | } | ||
Show All 28 Lines |