Skip to content

KPtryProcess: we need to call childProcessModifier() of parent class first

Ahmad Samir requested to merge work/ahmad/childprocess into master

I saw this issue while porting Konsole to Qt6:

  • KPtyProcess calls setChildProcessModifier()
  • Konsole's Pty sub-class calls setChildProcessModifier(), which replaces the std::function object that was previously set by KPtyProcess, and which was stored internally in QProcess
  • The resulting QProcess would be messed up (e.g. processId() returns 0)

AFAIU, if we call setChildProcessModifier() in a sub-class, we need to first call any existing childProcessModifier().

Edited by Ahmad Samir

Merge request reports