Commit e51c7d73 authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Eliminate deprecated QProcess::start(const QString &)

By removing the two overloaded versions of K3bQProcess(),
which were never used.  This makes the library not BC and so
its major version is changed from 7 to 8.
parent a54e3df4
......@@ -19,7 +19,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" "${ECM_MODULE_
set(K3B_VERSION_STRING ${RELEASE_SERVICE_VERSION})
# increase on BC breakage
set(K3B_LIB_VERSION_MAJOR 7)
set(K3B_LIB_VERSION_MAJOR 8)
# increase after adding functionality
set(K3B_LIB_VERSION_MINOR 0)
......
......@@ -1776,42 +1776,6 @@ int K3bQProcess::exitCode() const
return d->exitStatus;
}
/*!
Starts the program \a program with the arguments \a arguments in a
new process, waits for it to finish, and then returns the exit
code of the process. Any data the new process writes to the
console is forwarded to the calling process.
The environment and working directory are inherited by the calling
process.
On Windows, arguments that contain spaces are wrapped in quotes.
*/
int K3bQProcess::execute(const QString &program, const QStringList &arguments)
{
QProcess process;
process.setProcessChannelMode(::QProcess::ForwardedChannels);
process.start(program, arguments);
process.waitForFinished(-1);
return process.exitCode();
}
/*!
\overload
Starts the program \a program in a new process. \a program is a
single string of text containing both the program name and its
arguments. The arguments are separated by one or more spaces.
*/
int K3bQProcess::execute(const QString &program)
{
QProcess process;
process.setProcessChannelMode(::QProcess::ForwardedChannels);
process.start(program);
process.waitForFinished(-1);
return process.exitCode();
}
/*!
Starts the program \a program with the arguments \a arguments in a
new process, and detaches from it. Returns true on success;
......
......@@ -163,9 +163,6 @@ public:
bool isReadyWrite() const;
static int execute(const QString &program, const QStringList &arguments);
static int execute(const QString &program);
static bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory,
qint64 *pid = 0);
static bool startDetached(const QString &program, const QStringList &arguments);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment