Changeset 916


Ignore:
Timestamp:
Jul 27, 2011, 10:48:24 PM (9 years ago)
Author:
Dmitry A. Kuminov
Message:

test: process-async.cmd: Added mch and sch commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/process/process-async/process-async.cpp

    r903 r916  
    148148            mProcess->start(text);
    149149        }
     150        else if (cmd == "mch" || cmd == "sch")
     151        {
     152            /* merge/separate stdout & stderr */
     153
     154            if (mProcess->state() != QProcess::NotRunning)
     155            {
     156                mEditor->append(tr("> ERROR: Process is already running"));
     157                return;
     158            }
     159
     160            mProcess->setProcessChannelMode(cmd == "mch" ? QProcess::MergedChannels :
     161                                                           QProcess::SeparateChannels);
     162            if (cmd == "mch")
     163                mEditor->append(tr("> Merged standard error stream to standard output"));
     164            else
     165                mEditor->append(tr("> Separated standard error stream from standard output"));
     166        }
    150167        else if (cmd == "rso" || cmd == "rse")
    151168        {
Note: See TracChangeset for help on using the changeset viewer.