add Utils::QtcProcess
this is a wrapper around QProcess with these features: - setEnvironment() takes a Utils::Environment instead of a QStringList - instead of taking a stringlist with arguments, take a single shell command string which is fully compatible with the system's native shell (the bourne shell on unix and cmd.exe on windows) - with support for environment variable expansion, and subject to the shell's splitting and quoting rules. if the command is too complex (e.g., contains redirections), it is transparently executed through a real shell. - additionally, the class contains a set of helper functions for manipulating (constructing, splitting, etc.) shell command lines. in particular, it contains a shell-safe macro expander and the nested class ArgIterator which can be used for inspecting and manipulating a shell command line without going through the stringlist indirection (which is potentially lossy). some of this is based on KDE code (KShell and KMacroExpander) which i have written myself.
Showing
- src/libs/utils/qtcprocess.cpp 1387 additions, 0 deletionssrc/libs/utils/qtcprocess.cpp
- src/libs/utils/qtcprocess.h 149 additions, 0 deletionssrc/libs/utils/qtcprocess.h
- src/libs/utils/utils-lib.pri 2 additions, 0 deletionssrc/libs/utils/utils-lib.pri
- tests/auto/auto.pro 1 addition, 0 deletionstests/auto/auto.pro
- tests/auto/qtcprocess/qtcprocess.pro 22 additions, 0 deletionstests/auto/qtcprocess/qtcprocess.pro
- tests/auto/qtcprocess/tst_qtcprocess.cpp 698 additions, 0 deletionstests/auto/qtcprocess/tst_qtcprocess.cpp
src/libs/utils/qtcprocess.cpp
0 → 100644
This diff is collapsed.
src/libs/utils/qtcprocess.h
0 → 100644
tests/auto/qtcprocess/qtcprocess.pro
0 → 100644
tests/auto/qtcprocess/tst_qtcprocess.cpp
0 → 100644
This diff is collapsed.
Please register or sign in to comment