summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-2/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * QWindowsPipeWriter: ensure validity of the write bufferAlex Trotsenko2016-04-301-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsPipeWriter uses asynchronous API to perform writing. Once a cycle has been started, the write buffer must remain valid until the write operation is completed. To avoid data corruption and possibly undefined behavior, this patch makes QWindowsPipeWriter::write() take a QByteArray, which it keeps alive for the duration of the write cycle. Autotest-by: Thomas Hartmann Task-number: QTBUG-52401 Change-Id: Ia35faee735c4e684267daa1f6bd689512b670cd2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-0/+40
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp src/widgets/itemviews/qheaderview.cpp Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
| * Windows/QProcess::startDetached(): Fall back to ShellExecuteEx() for UAC prompt.Friedemann Kleint2016-04-231-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | When running a process that requires elevated privileges (such as regedt32 or an installer), the Win32 API CreateProcess fails with error ERROR_ELEVATION_REQUIRED. Fall back to ShellExecuteEx() using the verb "runas" in that case, bringing up the UAC prompt. Task-number: QTBUG-7645 Change-Id: Iee82a86a30f78c5a49246d2c0d4566306f3afc71 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-5/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| * Make QWindowsPipeWriter thread-free.Joerg Bornemann2016-03-171-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-work QWindowsPipeWriter to not use a thread anymore but the WriteFileEx API, similar to QWindowsPipeReader. This saves us a lot of thread synchronization code and enables us to directly write data without yet another buffering layer. Also, this fixes the dreaded deadlocks in the QWindowsPipeWriter destructor that could occur when the reading end was closed before the write was finished. Task-number: QTBUG-23378 Task-number: QTBUG-38185 Change-Id: If0ae96dcd756f716ddf6fa38016080095bf3bd4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * Fix crash in QProcess::waitForFinished on WindowsJoerg Bornemann2016-02-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose the user connects QProcess::readyReadStandardOutput with a slot that calls QCoreApplication::processEvents. Assume the event loop did not handle events between QProcess::start and QProcess::waitForFinished. The process writes to stdout and exits. QProcessPrivate::waitForFinished calls drainOutputPipes which calls QWindowsPipeWriter::waitForReadyRead. This in turn will trigger _q_processDied via the readyRead signal and processEvents. _q_processDied will delete the pid object and set pid to null. After drainOutputPipes returns, _q_processDied is called again but it must not be called if pid is already destroyed. Prevent calling _q_processDied if pid is null. Task-number: QTBUG-48697 Change-Id: Iee047938ee1529057a1a43d71f4e882750903c7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QProcess: Remove dead codeLouai Al-Khanji2016-02-051-9/+0
| | | | | | | | | | | | | | | | These functions appear to have been dead code always - even in the earliest Qt4 releases! Change-Id: Ie2a458092b45113782284cf8ed3aa11a018b60d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Integrate QProcess into QIODevice's multistreaming infrastructureAlex Trotsenko2016-01-291-3/+3
| | | | | | | | | | | | | | | | As a result, this patch eliminates double-buffering in QProcess. Change-Id: I436faa4a5ffc28ce77f959dd6089bef400ac39f6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
| | | | | | | | | | | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QProcess/Windows: Fix handling of workingDirectory.Friedemann Kleint2015-12-141-1/+2
| | | | | | | | | | | | | | | | | | Store nativeWorkingDirectory in a variable on the stack to prevent accessing the buffer of a temporary string. Fix breakage introduced by 068baa9bb6d526cccc0c8bc7cdbb84bbdf137f95. Change-Id: I8cf9ffe39c97afc9383c33cafaeffb1245b3e2b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | add a way to modify CreateProcess parametersJoerg Bornemann2015-12-101-5/+15
|/ | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QProcess] Added method setCreateProcessArgumentsModifier to QProcess on Windows to enable users to intercept and modify CreateProcess parameters. With such a modifier, calling code can decide whether to inherit handles, modify the STARTUPINFO struct, and pass its own combination of process flags to CreateProcess. Task-number: QTBUG-390 Task-number: QTBUG-6917 Task-number: QTBUG-9350 Task-number: QTBUG-24619 Change-Id: I14757dbbacfebb1c89f52402d36fba0ba9c45f3a Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not overwrite detailed error message if process fails to launchKai Koehne2015-11-121-1/+1
| | | | | | | | | | | | | On Unix we get a detailed error message when a process fails to start, but later on we overwrite it with a generic "Process fails to start". Fix this by keeping the original error message (if one is available). This fixes a regression introduced in commit 5147f73ac3. Task-number: QTBUG-49286 Change-Id: Idd0f0fed9773d39f2947fc3e532b51e670952caf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * fix assertion in QProcess/WinJoerg Bornemann2015-08-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not call bytesAvailableInChannel if the source pipe end is invalid. This is the case when redirecting channels on Windows. The assertions in bytesAvailableInChannel were triggered whenever an output process or output file was set and waitForBytesWritten was called. Task-number: QTBUG-45548 Change-Id: I225dfea2c5e27e122f75008a3a06d425554e00fe Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Core: Consolidate QProcess error reportingKai Koehne2015-06-201-28/+12
| | | | | | | | | | | | | | | | | | Introduce two methods to set set error and errorString, and optionally emit the error() signal. This also fixes two places where errorString hasn't been set previously. Change-Id: Ib7c27ff2daff898745e8e20ff8f11eaae568697f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Use "Ex"-versions of WaitForSingle/MultipleObject(s) where possibleOliver Wolff2015-06-161-2/+2
|/ | | | | | | | | | | | | | Not only should using the "Ex"-versions be the rule and not the exception on Windows, but it's only the only way to share as much code as possible between Desktop Windows and WinRT (which is pushed by Microsoft a lot). The current rule of Desktop and WinCE vs WinRT does not make a lot of sense any longer, as WinCE is getting less and less important. By moving these #ifdefs in favor of WinRT, WinCe code might be removed easier in the future. Change-Id: I0ef94fb14fbf8add9c2dfa2a3fb8036d25fb697d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* remove the "wonderful Windows notifier" from QProcessJoerg Bornemann2015-04-131-17/+2
| | | | | | | | | | | | | Remove the 100 ms timer that was used to nudge QProcess to write data to the child's stdin. Instead, react on the canWrite() signal of QWindowsPipeWriter. QProcess::writeData needs to call _q_canWrite via the event loop to start the write operation. The socket notifier code was never in use on Windows. Task-number: QTBUG-45457 Change-Id: I99c956ba5f2169f80068eee206543ceb9788b2e0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QProcess/Win: fix sporadic crashJoerg Bornemann2015-02-051-0/+1
| | | | | | | | | | | | | QProcessPrivate::_q_processDied() was potentially called twice if there was a slot connected to readyRead() that called processEvents(), because the processFinishedNotifier was still enabled when readyRead() was emitted. This led to a null pointer access in findExitCode. Change-Id: I4b796b81f050dc46bb9469602984accaa6ebfa28 Task-number: QTBUG-33731 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Avoid sleeping 100ms in QProcessPrivate::drainOutputPipes()Oswald Buddenhagen2014-10-151-1/+1
| | | | | | | | | | | | There is no point in waiting 100 milliseconds after each iteration, as all data that we may possibly read will be already in the pipe. We only need to give the notifier thread a chance to inform us, which is best achieved with a yield. Task-number: QTBUG-41282 Change-Id: Id654b688246508494a5549c11900f9ad2957f192 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Don't try to read from invalid file descriptors in QProcessThiago Macieira2014-06-121-6/+5
| | | | | | | | | strace reveals that we do ioctl(-1, FIONREAD) and get EBADF. The only case where this could happen is inside _q_processDied, which calls the read functions without checking if the pipe is still open. Change-Id: I67637fc4267be73fc03d40c444fdfea89e1ef715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QProcessPrivate: merge the functions dealing with stdout and stderrThiago Macieira2014-06-121-32/+11
| | | | | | | Simplifies the code. Change-Id: I4b3a6e725eb245d3531d1d11d959fb3b85862778 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Rename QProcessPrivate::destroyChannel to closeChannelThiago Macieira2014-06-121-5/+5
| | | | | | | | | | | The QProcessPrivate::Channel object contains some structures that may survive the closing of the pipe, so calling this function "destroy" is incorrect. Let it be just the closing. For symmetry, the createChannel() function is renamed to openChannel(). Change-Id: I2899214c6e4c25835390b10ccf3931315a91589e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Move the QProcessPrivate Windows objects into QProcessPrivate::ChannelThiago Macieira2014-06-121-61/+47
| | | | | | | Similar to the previous commit, this simplifies the code. Change-Id: Ia02b9b5174b4bc6fd04ec2534231b7db5fc914fa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Move the QProcessPrivate channel buffers into QProcessPrivate::ChannelThiago Macieira2014-06-121-4/+4
| | | | | | | Simplifies the code. Change-Id: I70b26af69332f364d856042f114c37a70504d66f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-1/+1
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess/Win: allow child processes to change modes of the stdin pipeJoerg Bornemann2013-12-101-28/+42
| | | | | | | | | | | | | | | | | | | | To be able to call SetNamedPipeHandleState on stdin in a child process, we must create a read-end pipe handle with the FILE_WRITE_ATTRIBUTES flag set. This can't be done with CreateNamedPipe but only with CreateFile. Therefore we're creating the handles for the child process always with CreateFile now. Besides, it's conceptually cleaner to have the server handle of the named pipe in the calling process. [ChangeLog][QtCore][Windows] Fix regression from Qt4 in QProcess. It wasn't possible anymore to alter pipe modes of stdin in child processes. Task-number: QTBUG-35357 Change-Id: I85f09753d0c924bdc8a6cef1ea5dbe6b2299c604 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QProcess/Win: fix crash in drainOutputPipesJoerg Bornemann2013-10-021-2/+2
| | | | | | | | | | | | | stdoutReader->waitForReadyRead() can synchronously trigger the deletion of stdoutreader (via signal readyRead(), _q_canReadStandardOutput(), destroyChannel()). Analoguous for stderrReader. Task-number: QTBUG-33730 Change-Id: I8badac53e92a979c437838b2959b4c0445c8de81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* add QProcess::InputChannelModeOswald Buddenhagen2013-09-051-1/+9
| | | | | | | | | | | this enables forwarding standard input from the parent process. Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* add QProcess::Forwarded{Output,Error}ChannelOswald Buddenhagen2013-09-051-2/+4
| | | | | | | Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* make the pipe setup code less convolutedOswald Buddenhagen2013-09-051-16/+21
| | | | | | | Change-Id: Ied870c892cc3dbbf24a3d9416f685e51a74e5c17 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* never create a console for command line tools launched from gui appsOswald Buddenhagen2013-09-051-3/+6
| | | | | | | | | | | | | | | commit 219b0d217 fixed forwarding of stdio to a console. unfortunately, it also forced the creation of a console in the first place if there was none, which is not part of the contract. instead, give the child process a window (== console) only we we already have one. this can be done irrespective of our channel mode, which has the nice side effect that an explicit redirection to a console would now also work. Change-Id: Id25cab5da1ac1cc8ce452127ff95bac8d0a0fea8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* remove redundant conditionOswald Buddenhagen2013-09-051-3/+2
| | | | | | | ForwardedChannels implies that both stdoutReader and stderrReader are null. Change-Id: I9d5f02d3a1eac62316a6016b90c612d716ecaafc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* fix endless loop in QProcess/Win drainOutputPipesJoerg Bornemann2013-07-181-2/+4
| | | | | | | | | | | Commit 568f82fba397e06a26b4fd40f074e4432d02d248 was incomplete. If drainOutputPipes detected some readyRead it wouldn't end the loop. Task-number: QTBUG-32354 Change-Id: I4e594f1e148abe9ef36c047a55eee1b22fd5064b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* fix infinite loop in QProcessPrivate::drainOutputPipesJoerg Bornemann2013-07-051-1/+1
| | | | | | | | | | | | | | | | | | When drainOutputPipes is called, the process is already dead. If readyReadEmitted is false, there was no data in the pipes. As the process is dead, there won't be data in the pipes in future iterations. The situation that triggered the infinite loop was this: process A starts console process B. B starts console process C. C inherits stdout/err of B. B dies. C runs forever and does not close the stdout/err handles. A notices that B died and calls drainOutputPipes. Task-number: QTBUG-29391 Change-Id: I4819901df307be684c6ad70753a5f964a834704a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QProcess/Win: drain output pipes on process finishJoerg Bornemann2013-05-071-11/+11
| | | | | | | | | | | | If a process dies before all output is read into the internal buffer of QProcess, we might lose data. Therefore we must drain the output pipes like we already do in the synchronous wait functions. Task-number: QTBUG-30843 Change-Id: I8bbc5265275c9ebd33218ba600267ae87d93ed61 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QThread: fix race when setting the eventDispatcherDavid Faure2013-03-221-1/+1
| | | | | | | Use QAtomicPointer to make this thread-safe. Change-Id: If71f204699fcefabdb59bd26342d777d1cc9e2a7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QProcess/Win: stop pipe readers before closing the pipe handlesJoerg Bornemann2013-03-141-0/+2
| | | | | | | | The pipe readers should not operate on closed handles. Change-Id: I6514b949e5ab2adf89633463fc599e8d02c43693 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QProcess/Win: do not treat all negative exit codes as crashJoerg Bornemann2013-03-131-2/+2
| | | | | | | | | | | | Only exit codes that are likely to be in the range of EXCEPTION_* and STATUS_* codes are treated as crash. Task-number: QTBUG-28735 Change-Id: I36ae6dc4be28df0c6b6b7361df2c2d0203ee7919 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcessEnvironment: Permit magic cmd variablesDaniel Teske2013-02-081-1/+2
| | | | | | | | | The cmd shell inserts magic variables starting with a = into the environment. Task-number: QTCREATORBUG-8716 Change-Id: I2f140032aea4fb1d77633c6baf90d7b536e2812a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation with (all versions of) MinGWKai Koehne2012-12-111-1/+1
| | | | | | | | | | | | | | | | Commit 320b16110f0f9cef032a64846dc792d40ccd367b changed the arguments of swprintf to be compliant with latest MinGW-w64 headers: The headers now excludes the non-standard swprintf(wchar*t,wchar_t*,...) version for C++11. However, the swprintf(wchar_t*,size_t,wchar_t*,...) version is actually not supported by e.g. stock Mingw-32 from mingw.org. Instead, use _snwprintf(wchar_t*,size_t,wchar_t*,...), which both MSVC, and all MinGW versions should support. Task-number: QTBUG-28520 Change-Id: Icadd11773a25143e46a72c898adfd1c324f9c468 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QProcess: Fix compilation with MinGWKai Koehne2012-12-061-1/+2
| | | | | | | | newer mingw-w64 headers do not support swprintf(wchar_t*,wchar_t*, ..) any more. Change-Id: I2fc1fb51ba8d5237149697f77a91abd6469ebb09 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Trim trailing whitespace.Stephen Kelly2012-10-221-2/+2
| | | | | Change-Id: Iee6bb66831f53399e5937eab5704af835979f5c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QProcess/Win fix forwarding of output channelsJoerg Bornemann2012-09-281-16/+20
| | | | | | | | | | We must not create pipe readers for the forwarded channels as we don't want to read from stdout/stderr into the internal QProcess buffer. Also, we must not pass CREATE_NO_WINDOW to CreateProcess because this will render our stdout/stderr handles useless. Change-Id: Ie6485e86c103d1e9225cf39c04aa54093c1efe0d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>