Changeset View
Changeset View
Standalone View
Standalone View
libk3b/tools/qprocess/k3bqprocess.cpp
Show First 20 Lines • Show All 1785 Lines • ▼ Show 20 Line(s) | 1780 | /*! | |||
---|---|---|---|---|---|
1786 | The environment and working directory are inherited by the calling | 1786 | The environment and working directory are inherited by the calling | ||
1787 | process. | 1787 | process. | ||
1788 | 1788 | | |||
1789 | On Windows, arguments that contain spaces are wrapped in quotes. | 1789 | On Windows, arguments that contain spaces are wrapped in quotes. | ||
1790 | */ | 1790 | */ | ||
1791 | int K3bQProcess::execute(const QString &program, const QStringList &arguments) | 1791 | int K3bQProcess::execute(const QString &program, const QStringList &arguments) | ||
1792 | { | 1792 | { | ||
1793 | QProcess process; | 1793 | QProcess process; | ||
1794 | process.setReadChannelMode(::QProcess::ForwardedChannels); | 1794 | process.setProcessChannelMode(::QProcess::ForwardedChannels); | ||
1795 | process.start(program, arguments); | 1795 | process.start(program, arguments); | ||
1796 | process.waitForFinished(-1); | 1796 | process.waitForFinished(-1); | ||
1797 | return process.exitCode(); | 1797 | return process.exitCode(); | ||
1798 | } | 1798 | } | ||
1799 | 1799 | | |||
1800 | /*! | 1800 | /*! | ||
1801 | \overload | 1801 | \overload | ||
1802 | 1802 | | |||
1803 | Starts the program \a program in a new process. \a program is a | 1803 | Starts the program \a program in a new process. \a program is a | ||
1804 | single string of text containing both the program name and its | 1804 | single string of text containing both the program name and its | ||
1805 | arguments. The arguments are separated by one or more spaces. | 1805 | arguments. The arguments are separated by one or more spaces. | ||
1806 | */ | 1806 | */ | ||
1807 | int K3bQProcess::execute(const QString &program) | 1807 | int K3bQProcess::execute(const QString &program) | ||
1808 | { | 1808 | { | ||
1809 | QProcess process; | 1809 | QProcess process; | ||
1810 | process.setReadChannelMode(::QProcess::ForwardedChannels); | 1810 | process.setProcessChannelMode(::QProcess::ForwardedChannels); | ||
1811 | process.start(program); | 1811 | process.start(program); | ||
1812 | process.waitForFinished(-1); | 1812 | process.waitForFinished(-1); | ||
1813 | return process.exitCode(); | 1813 | return process.exitCode(); | ||
1814 | } | 1814 | } | ||
1815 | 1815 | | |||
1816 | /*! | 1816 | /*! | ||
1817 | Starts the program \a program with the arguments \a arguments in a | 1817 | Starts the program \a program with the arguments \a arguments in a | ||
1818 | new process, and detaches from it. Returns true on success; | 1818 | new process, and detaches from it. Returns true on success; | ||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |