Merge the pimpls, move the remaining functions to the base.
This leaves SynchronousProcess as a QtcProcess with an internal
special setup. Plan is still to unify this completely.
Change-Id: Ie95d35ace23a1b7e078174ea37b9fd70a3ebe178
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This is the last intermediate step before unification to keep the
merge small.
Change-Id: I5b320f9db4c467c49a384f665cea5e16bfef4f60
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Mechanical to prepare merging the actual classes.
Adapting #includes.
Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Effectively only a single flag controlling a call to setsid().
Change-Id: I6a2be35df1bddc81702575678ee3a065a71cecf5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Copy for now, original will vanish once all is ported.
Idea is still to reduce the number of process related classes.
To avoid a new dependency for qmlpuppet, handle questions to
the user only inside #ifdef.
Change-Id: Ib1354fc0370a87052b4f9c8460dfcf5d762a6c4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Clang 12 has added a template parameter as "CALLBACK",
which conflicts with the Windows "CALLBACK" define.
Change-Id: I773899d103dcb1a852b555a1900b2de4acb6d96f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Start using it in Utils::Archive.
The idea is to merge SynchronousProcess into QtcProcess (or avoid its
use) to have fewer classes to make "remote-aware".
Change-Id: Ieb08f6f66eab63fd058b75e3bafa79bfbf140387
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use it to avoid IDevice interface clutter.
Change-Id: I4a04f04e2c343593d937a402060e56ef94fcabf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Various Windows related issues and issues with additional QML designer
components.
Don't use very generic template definitions if the type has to provide
not so generic base functionality (in this case providing a stream
operator for QDataStream).
Task-number: QTCREATORBUG-24098
Change-Id: Id0729c249d1b81e4e939fdaeb2e02b8a64e7e8f9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Which is compiled against an older Qt version to keep it more
compatible.
Change-Id: Ifee61a524055ca383c83da9f237e50536a3fd0cb
Reviewed-by: hjk <hjk@qt.io>
And use QProcess::setChildProcessModifier when compiling against Qt6.
Task-number: QTCREATORBUG-24098
Change-Id: I4166a8e27f8f63dd661df119413cd2eb2ae1dc2e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Do not use QStringRef related API, replace with QStringView where
appropriate.
Adapt to removal of QAbstractItemView::viewOptions().
Task-number: QTCREATORBUG-24098
Change-Id: I5a7a9821984583222083733f91b46df39c21d592
Reviewed-by: hjk <hjk@qt.io>
This reverts commit 6a66ced594.
The patch that will introduce the alternative to setupChildProcess
(QProcess::setChildProcessModifier()) has not yet found its
way to qtbase and current Qt dev already identifies itself as
version 6.0.0, rendering the code here uncompilable.
Change-Id: I570b01598005070f0c17604226d245a3a381250e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
qWarning() and all of QMessageLogger will get to qFormatLogMessage(),
which locks a mutex. Additionally, qWarning may call a number of
different backends that, in turn, may have mutexes of their own. Locking
mutexes in child processes between fork() and execve() is a big no-no:
it may have been locked by another thread before fork(), so it's still
locked in the child process and will never get unlocked. Result:
deadlock.
Plus, qWarning reacts to QT_FATAL_WARNINGS, which I guess was not
intended for this class.
So just use a plain perror(), which is guaranteed by POSIX to be
"MT-Safe race:stderr".
Change-Id: I4e559af2a9a1455ab770fffd15f4a37a3fd113ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This should prevent slowdown of the IDE (and the rest of the system) while
building with all the CPU cores.
Fixes: QTCREATORBUG-5155
Change-Id: Icaadc53958f2d8e918035463e3c9344c91235615
Reviewed-by: hjk <hjk@qt.io>
The Environment class is supposed to support values with references to
other variables, but we failed to actually expand them in most places.
Fixes: QTCREATORBUG-22687
Change-Id: I108cb59d3b4571471423455240f6f4f1cf64bf05
Reviewed-by: hjk <hjk@qt.io>
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.
Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
ConsoleProcess stumbles over the special characters in the remote
command and as a result silently runs the command locally instead.
Prevent that. We can (and should) simply leave these characters alone,
as they have no special meaning on the local machine.
Change-Id: I31b3afe1cf170e51d431372b15f4df3656006959
Reviewed-by: hjk <hjk@qt.io>
Causes less #include hassle when using downstream instead of
command/argument pairs.
Change-Id: I0fa0d016374df0b8e0a22f3786623652af684d36
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We regularly pass around strings or filenames or pairs of strings
or filenames and stringlist etc the in the end will be used
as a kind of "command line", with quite a bit of ad-hoc user
code and QtcProcess::addArg etc to set them up and manipulate them.
Let's have a class for that concept.
Change-Id: I288ab939d853b32c717135a65242c584c2beab50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Many issues, mostly in headers, were not addressed in
e38410b76c
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default
Change-Id: I320a51726db881e582b898948d53735ebb06887a
Reviewed-by: hjk <hjk@qt.io>
This patch adds the missing include statements for QRegExp.
Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This overload of error is deprecated in 5.6.
Replace with errorOccurred, which was introduced in 5.6.
Change-Id: Iccfba7e7103b7ce377471696f1f2ec217e52c840
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Since Qt 5.3, there's a QProcess::processId() providing direct access.
Change-Id: Ia9c143c7a92ec61d1aa36ff3f4670ba72a509634
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Opening parenthesis is stored in the value, but closing parenthesis
is not. This makes the value unbalanced.
Since the parenthesis unconditionally unset m_simple, the value is
cleared anyway and is never read.
In case that math (or other) expression will ever be evaluated, this
needs to be reworked to include both parentheses.
Change-Id: Ie56f5a5d9cec5a47649751db4245888bee8e85d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>