Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix QTMPipeLink's usage of QProcess #74

Open
wants to merge 1 commit into
base: qt6
Choose a base branch
from
Open

Conversation

daym
Copy link

@daym daym commented Apr 24, 2024

Fix launching of commands.

In qt4.8 there was a QProcess::start(command_line) which would automatically split the command line into args and then exec that.

In qt5 that disappeared in favor of QProcess::splitCommand and then QProcess::start--and written in a way so you can't call QProcess::start with just one string.

In qt6 that changed to start(const QString &program, const QStringList &arguments = {}, QIODeviceBase::OpenMode mode = ReadWrite), which we called as start(command_line) which did the wrong thing.

Fix it so that it works on Qt6.

If we wanted, we could also try to figure out the Qt version and then statically do the right thing.

As it is in this PR it will loudly fail compilation on Qt version < 6.

Fix launching of commands.

In qt4.8 there was a QProcess::start(command_line) which would automatically split the command line into args and then exec that.

In qt5 that disappeared in favor of QProcess::splitCommand and then QProcess::start--and written in a way so you can't all QProcess::start with just one string.

In qt6 that changed to start(const QString &program, const QStringList &arguments = {}, QIODeviceBase::OpenMode mode = ReadWrite), which we call as start(command_line) which did the wrong thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant