summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* QNonContiguousByteDevice: reset() instead of seek() if possiblePeter Hartmann2013-04-271-2/+2
| | | | | | | | | | ... because e.g. QHttpMultiPartIODevice does not implement seek at all (QTBUG-30295), which would make resetting such a device fail. (cherry picked from commit 804a067846cd90e3ca31f985d539c8d75d654d82) Change-Id: I8ba1ef76cc6e7f5ebf0b39c9a75e3aea26980b82 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QNonContiguousByteDevice: roll back complete internal state in reset()Peter Hartmann2013-03-261-0/+6
| | | | | | | | | ... otherwise we would not start reading from the beginning when the device was reset. Change-Id: I897adbad6e1f240fa871758ec7e3d6b499cb5944 (cherry-picked from commit ffe45f1896adfff93258b917f6a566dcc06a6597) Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix CreateFileMapping() error handlingPeter Kümmel2013-03-012-4/+5
| | | | | | | | | | | CreateFileMapping() returns NULL in case of an error. The patch corrects the wrong testing on INVALID_HANDLE_VALUE, and sets NULL for invalid handles. Change-Id: Iaab4945ed88ee92bbf9a0871e95a5820dd1a56ed (cherry-picked from qtbase/1a8f67938c4146614fec3788c7868dc1a314cc84) Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix QTBUG-18934 by checking return value of qt_safe_pipeSimeon Bird2013-02-281-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | When QProcess->start() is called, Qt creates a pipe to the process to get its exit value and output. It does this with qt_create_pipe, which calls qt_safe_pipe. qt_safe_pipe, on failure, returns 1. qt_create_pipe then sets errno and returns void. The calling function, QProcessPrivate::startProcess, does not check errno, and thus continues to fork the process, assuming the pipe has been created successfully. The child process then has no way to pass its exit value to the calling process, since the communication pipes it would normally use do not exist, and thus when it exits it becomes a zombie. As a bonus, if waitForFinished is called on a broken process, a crash results because it is trying to wait on a pipe which does not exist. The fix makes qt_create_pipe return an integer, and QProcess::startProcess check the return value, set processError and not create the child process. Task-Number: QTBUG-18934 Cherry-picked from qtbase f575dc214630b3e3ebd66477a623c78405724468 Change-Id: I2e1effdd0617be5b8c5492bcbcf5f2b1584b2241 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed checking HOME variable return value using isEmpty()Pasi Petäjäjärvi2013-02-131-1/+1
| | | | | | | | | | | | Return value of the QFile::decodeName(qgetenv("HOME")); is never null if HOME environment variable is not set. So need to check the return value using isEmpty() instead. Task-number: QTBUG-28912 Change-Id: I7875520965bf2c0c7311fb051c1f5177e9c3685b (cherry picked from qtbase/05b4000e01ff5785739617c3069fbe0b0d36a606) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Strip prepending <hostname>: string from currentPath() for VxSimPasi Petäjäjärvi2013-02-131-1/+9
| | | | | | | | | | | VxWorks simulator (VxSim) maps SDK rootdir usable as normal directory. Mapped directory name is either host: or <hostname>: and can be used without prepending prefix containing colon. Strip prepending string and colon to get valid native path to host SDK rootdir running VxSim. Change-Id: I15f4bf4d9eb2cea87268bad9b1a95973962cb2c8 (cherry picked from qtbase/cd5a4279f38ac6cca8ff8da4d75c2577d9b0bbcd) Reviewed-by: Samuel Rødal <samuel.rodal@digia.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> (cherry picked from qtbase/e7a242b27b961c64613542c75c69954d1c7bd315)
* Make compile with QT_NO_FILESYSTEMITERATORThomas Zander2013-01-305-0/+10
| | | | | | | Change-Id: Ie79dda5a48288a1d9cd4b7e0a7934ee9db48c953 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Thomas Zander <zander@kde.org> Reviewed-by: João Abecasis <joao@abecasis.name>
* Use stub functions getpwuid and getgrgid for VxWorksPasi Petäjäjärvi2013-01-281-2/+2
| | | | | | | | | | VxWorks has no concepts of users and groups, therefore no such functions exists on VxWorks. Use stub functions from qfunctions_vxworks.h for those, so we don't need to make major source code changes. Change-Id: Iaad80ec18441e3d3e9c0f96e92ccc3766b27d976 (cherry picked from qtbase/ae229b91929955e7418da938bace6d0cc6a2cde5) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix malloc errors from legacy realpath on Mac OSX.Jeremy Nicholl2013-01-161-2/+9
| | | | | | | | | | | | | | | Avoid using realpath(X,0) on Mac OSX at all, since even on versions of OSX where realpath(X,0) is supported, we still get the legacy version due to our compiler flags. If we were to change the -mmacosx-version-min to 10.5 or higher then this patch would be safe but unnecessary. Task-number: QTBUG-28282 (cherry picked from commit 67195dc394001ee1c9adc7db97fd6ff9d88e9b0c) Change-Id: I0e763321aed71b03e6bf256d112cf4b743411626 Signed-off-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Limit the range of the QUrlPrivate::port to -1 to 65535Thiago Macieira2013-01-141-1/+1
| | | | | | | | | | | | | The internal parser can read values outside this range (and cannot report an error), but QUrl::port() must not return something outside that range. The correct solution would be to report an error, like in Qt 5, but that cannot easily be done. The rewritten parser in Qt 5 is not affected by this issue. Task-number: QTBUG-28985 Change-Id: I3cf595384f14272197dcfb85943213c8f8ddeba0 Reviewed-by: David Faure (KDE) <faure@kde.org>
* QUrl::fromUserInput: fix for urls without a host.David Faure2013-01-141-2/+1
| | | | | | | | | | QUrl::fromUserInput("http://") was invalid, which doesn't make sense since QUrl("http://") is valid. Same for "smb:" which is actually even more a valid URL from a user's point of view. Change-Id: I371ac393d61b49499edf5adbbc2a90b426fe9e5d (cherry-picked from qt5 commit 8b2728ec382565c5bd57148600e34740a3c3fe52) Reviewed-by: David Faure (KDE) <faure@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1389-89/+89
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Centralise handling & ignoring of SIGPIPE in qcore_unix_p.hThiago Macieira2013-01-051-19/+1
| | | | | | | | | | | | We had two instances of this function in the Qt source code, one clearly a copy of the other, so both had the same thread-safety issue. Instead, let's have one copy and have both write_nosignal() and sendto() call them. (cherry-picked from qtbase commit cb7d64170d62c9cda11ced7e5047070af678338b) Change-Id: I0f1354a8e9df8e6b10a02f86a940e3c6d1222087 Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix thread-safety of qt_ignore_sigpipeThiago Macieira2013-01-051-1/+5
| | | | | | | | | | | | | | The testAndSet operation would mean another thread could see the value of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored. If the pipe or socket were already closed by then, a SIGPIPE would be delivered to the application with its default action: terminate. (cherry-picked from qtbase commit 3f970c20f9afd5c9a1cc14d7f69882e13f6aaf1b) Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* QUrl: make sure setAuthority is consistent with setHostPeter Hartmann2012-12-151-1/+4
| | | | | | | | | ... which is important for an empty but non-null authority. In Qt5 this is already working. Change-Id: I7d389037f71320c6f06897b220633311c3611eea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: ensure toEncoded() matches toString() wrt. empty authorityPeter Hartmann2012-12-151-1/+1
| | | | | | | | | | | This was already fixed for toString() with commit 884f15e, this commit also fixes the toEncoded() implementation. In Qt5 this is already working. Task-number: QTBUG-8701 Change-Id: I0c81801e74d97de31632df45e52a25eb037b4710 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: fix QProcess fd inheritanceRafael Roquetto2012-11-281-3/+18
| | | | | | | | | | | Under QNX, QProcess was not inheriting the parent's file descriptors. This patch fills in the fd_map array, containing the file descriptors to be inherited, which is passed to spawn(), accordingly. cherry-picked from qt5 226f245c71df5673b5114615fbd9ad5c285b8d3a Change-Id: Id2957c6278bc21c89234a84b364763b601ae08a1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fixes problem with single precision floats in QDataStream (Windows).Christian Strømme2012-11-281-1/+5
| | | | | | | | | | | | | | When the floating-point behavior in MSVC is set to "precise" (default), assigning nan numbers to a float causes the bit pattern to be altered (only affects 32bit builds). We should therefore not assign the swapped value back to a float and use it. Backported from Qt 5 (3f936e9094f3a6e4d76791c1eff7ae92f91b61ae) Task-number: QTBUG-25950 Change-Id: I39725557ab89c978eb1c59a4c79df8a27ed70ecf Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Do not detect directories ending in ".lnk" as link files.Friedemann Kleint2012-11-281-1/+6
| | | | | | | | Task-number: QTBUG-21863 Change-Id: I70b661fa5fcaba1293a80c971c506798826f5b23 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtbase/1022c3ce9d445fd482a62309b9a6c52495c04a92)
* BlackBerry: Changed QSettings file accessBernd Weimer2012-11-262-5/+28
| | | | | | | | | | | | | | On the BlackBerry platform, applications run in a sandbox. They are not allowed to read or write outside of this sandbox. Hence in QSettings there is no use for the system scope and differentiating between organization and application. This change will also improve performance. Backport from qtbase: 146f63bea487dbc4d6af34b56fa382f5a6a18e82 Change-Id: I0000d6910b56cdb75728422e1889cd5f0c646eb3 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Fix regression introduced in QFileSystemEntry::path()Andy Shaw2012-11-181-1/+1
| | | | | | | | | | | | When fd2eb070128ab6ef6b5c9343a0921f6b5a0bc041 was backported it shouldn't have included the change to path() as this introduced a behaviour change. This reverts that part of the patch so it is back to Qt 4.8.2 behavior. Task-number: QTBUG-27356 Change-Id: I7c19dda473e7aa2c53baed961c3b0e0d322362fe Reviewed-by: João Abecasis <joao@abecasis.name>
* QNX: Fix build with QNX SDP 6.5.Sergio Martins2012-11-071-1/+1
| | | | | | | | | | | | | __EXT_LF64SRC isn't defined in this case. This also makes it consistent with mkspecs/common/posix/qplatformdefs.h which uses QT_USE_XOPEN_LFS_EXTENSIONS and QT_LARGEFILE_SUPPORT to decide which type of stat struct to declare. Backport of b8e7265a5055da754c8b4cb2fb97b9367e83791b Change-Id: I04e990a2402aee347870c3578bf6f76b837b8e1e Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QNX: Remember information on whether a file is a linkThomas McGuire2012-10-311-0/+7
| | | | | | | | | | | | | This avoids an additional call to lstat() When using QDir::entryList() with the QDir::NoSymLinks flag. This is a backport of qtbase commit 03cd922e312428aca54892039da9ed79479cfa17 Change-Id: I5ef10c369ce6790c8d0de1346436f9ea7aaa4194 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* QNX: Use extra information in dirent to avoid stat() callsThomas McGuire2012-10-313-2/+69
| | | | | | | | | | | | | This improves iterating over /usr/bin with QDirIterator by more than half, from 36 to 13 milliseconds. This is a backport of qtbase commit 391d2e37f3b301097cd23fdaf99dc34ed6a114a5 Change-Id: I45e9159c82d1840f21dbab81fc39f140490549b7 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QNX: Use inotify on QNX systems that support itThomas McGuire2012-10-303-0/+17
| | | | | | | | This is a backport of qtbase commit fc0cbef59599174589a606838a9b55ba6a07ef06 Change-Id: I27ca7222ed0e622bdae405f0802ab29e22f4cbbf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix g++/MinGW compiler warnings.Friedemann Kleint2012-09-291-2/+0
| | | | | | | | | | - Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2989-2137/+2137
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Refactor coreservices -> ios & QT_NO_CORESERVICES -> Q_OS_IOSIan Dean2012-09-185-19/+19
| | | | | | | Similar work was done in Qt5 in Change Id3b02316 Change-Id: I392d2a5bfffb9a335f28d5dbc5ea27b800fc4487 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix realpath() call to older POSIX platformsRafael Roquetto2012-09-121-8/+13
| | | | | | | | | | | | | | Some POSIX platforms do not support realpath(X, 0). This commit is akin to the following qt5 commits: 4a4e9e4a9c56f9b27f2fb76fae6ff06b9f470895 ad5d64226abd50a43856ab560583f37b49ff04c9 6e8e1da0a8267d2f8f568403e6ab9fe53b01cd29 f3707a5a0c4483b15e7bb2ba9f0e7d1913a713ee Change-Id: I05dc12cedefcaaa11eec2bcc71df023fdb51ac00 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Blackberry: Fix QFileSystemEngine::tempPath()Thomas McGuire2012-08-301-2/+5
| | | | | | | | | | | | | Apparently it depends on the user and/or firmware version on whether TMPDIR or TEMP is set, so try both. Additionally, fall back to /tmp if neither is set, as that seems to be present on all devices. This is a backport of a135d87a0f8ec24445e13fb54f4316e4ca7473be from Qt5. Change-Id: I1637f4ab74c8c8bd350b4efb451c2143c0642796 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QUrl: fix thread safety.David Faure2012-08-232-49/+181
| | | | | | | | | | | | | | | Developers expect const methods on the same QUrl instance to be usable from multiple threads (including copying and modifying the copy). The delayed parsing and internal cache of encoded strings break this, however (and the implicit sharing, for the case of copying). Protection with a mutex fixes this. Qt-5.0 doesn't have this issue, since QUrl doesn't do delayed parsing anymore. Change-Id: Ie2674e46eb7416b0e753323b673c10f9d3457f6d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update contact information in license headers.Sergio Ahumada2012-08-0189-178/+178
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QUrl: document that setIdnWhitelist isn't thread-safeMarc Mutz2012-07-281-0/+3
| | | | | Change-Id: Ia77a211f1d670d81b2a4783693ed09533d53eceb Reviewed-by: David Faure <faure@kde.org>
* QUrl: add missing detach() in setEncodedUrl, spotted by Marc Mutz.David Faure2012-07-221-2/+2
| | | | | | | Reported-by: Marc Mutz <marc.mutz@kdab.com> Change-Id: If53957bafa9c077981c8ec5107313bc25469b579 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qurl.cpp: Remove trailing whitespaces.David Faure2012-07-211-19/+19
| | | | | Change-Id: Ic075b50cff71fcc2e5dd5c14d55ef2f587cd2418 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix QUrl::isLocalFile documentationSergio Ahumada2012-07-211-1/+1
| | | | | | | | | | | This function was introduced in 4.7 by a2f797b52c4274a62a7cf1f0939aca1429afe211 but then reverted by 98e935eed5549e479f6666680aed1711dc42111c Task-number: QTBUG-21293 Change-Id: I6ec9c6696e5c85e44774184010eb9135ef7f3365 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> (cherry picked from commit e2c27b3052fe49a19c4092759682bddf2c2a37f7)
* Fix QFile append on windowsShane Kearns2012-06-092-2/+10
| | | | | | | | | | | | 1. make windows file engine seek to end on open to match unix/symbian 2. make qfile forcibly seek the file engine in case a custom file engine has the same bug. Task-number: QTBUG-25906 Change-Id: I62a26519a9401e547ff77bd8a71027cb361dc671 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix cases where functions are called with a drive and no slashAndy Shaw2012-05-161-9/+9
| | | | | | | | | | | | | | | | When a file is specified on a path that includes a drive letter followed by a colon but no slash then it didn't always account for the fact that this refers to the current path on that drive. This fixes the problems in completeBaseName(), baseName() and path(). Tests are also added for these three cases and some others too. Task-number: QTBUG-25353 Change-Id: I47a197c6af066f532442ad269be57597ec61303a Reviewed-by: Irfan Omair <irfan.omair@gmail.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> (cherry picked from commit cfb44c6528b2518274bf157388832d1d610ce0e4)
* Fix IPv6 address returned from QUrl::hostShane Kearns2012-04-231-5/+4
| | | | | | | | | | | | When passing an IPv6 address through QNetworkProxyQuery, it is stored in a QUrl internally. There was a bug in QUrl where it strips the [] surrounding an IPv6 address only if they were present in the input, otherwise it added them. Now the behaviour is the same as Qt5 ([] are always stripped). Change-Id: I42e020ce30d18a4108f1dd4428809fed07991680 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update QSettings and Mac OS X documentation with App Store informationPasi Matilainen2012-04-231-0/+21
| | | | | | | | | | | Add information about changing the location of global Qt settings to QSettings documentation, and general information about submitting Qt apps to the Mac App Store to the "Qt for Mac OS X - Specific Issues" document. Task-number: QTBUG-16549 Change-Id: Ic0210e8f4d3c3f6369032abd5c1e214b4200b179 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix QFileSystemEngine::tempPath on Blackberry OSRafael Roquetto2012-04-011-0/+7
| | | | | | | | | | | Unlike Unix, Blackberry OS stores the location of the temporary directory into the TEMP environment variable. Change-Id: I31f50fc4b160e5594339c4fcd62613963cc1484f Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix regressions due to partial QSslSocket::peek fixShane Kearns2012-03-301-0/+5
| | | | | | | | | | The fix broke HTTPS transactions with chunked encoding. It also broke use of a QSslSocket in unencrypted mode where peek and read calls are mixed. See change 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513. Change-Id: Ib115b3737b0e4217496f5def10aaaea3c6452ff8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix documentation errorShane Kearns2012-03-131-1/+0
| | | | | | | | The function wasn't introduced in 4.8, we just documented its behaviour properly in that release. Change-Id: I0560be978612eaed4e632ea191c4b2ba19b4e7a8 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Optimise QFile::seek that doesn't move the file pointerShane Kearns2012-03-131-0/+3
| | | | | | | | | If the seek position matches the current file position, then avoid doing an implicit flush that could be expensive. Change-Id: I019858ffb36fe832b9aee8da0a7803cafc8f7f75 Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Enable storage of global Qt settings in app-local settings file on MacPasi Matilainen2012-03-071-0/+82
| | | | | | | | | | | | | The Mac App Store has limitations on where applications can write their settings, and com.trolltech.plist is not allowed. Changed the settings code to store all settings in the app-local file when the application runs in sandbox, or when the application's Info.plist contains a key "ForAppStore" with value "yes". The application's bundle identifier is also used for naming the settings file in these cases. Task-number: QTBUG-16549 Change-Id: Idd2241fbd7eb346da987226f05460642b0d6e5a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Don't allow app panic on QProcess destruction, kill or terminateMurray Read2012-03-071-4/+12
| | | | | | | | | | | | | | | | QProcess destruction will call kill() if the process is still running. PRocess::Kill() and Terminate() both require the PowerMgmt capability to operate on Symbian, otherwise a KERN-EXEC 46 panic happens. An app should be able to use QProcess safely if it doesn't have PowerMgmt capability, it should just be prevented from trying to kill the created process. Now a debug message is issued on ~QProcess(), kill() or terminate() if the capability is not present, rather than actually trying to kill/terminate the process. Task-number: ou1cimx1#985227 Change-Id: I3242ca2c39528c70c2c79e39f6a6384dd72f6ae6 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QWindowsPipeWriter could terminate the process to earlyMartin Petersson2012-02-281-1/+1
| | | | | | | | | | | | | | When the QWindowsPipeWriter is deleted it will wait for the thread to exit. This wait was set to 100 ms which will not always be enough time for the thread to exit, in that case the thread will be terminated. This will increase the timeout to 30 seconds that should be more then enough time for the thread to exit by itself. Task-number: QTBUG-4425 Change-Id: I52567066b757c2bbfda6887f504cf80de262b988 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fixes QProcess on QNXRafael Roquetto2012-02-203-82/+67
| | | | | | | | | | | | | | This patch first re-enables childStartedPipe on QNX and uses, just like other platforms, to monitor the inferior process life cycle. This also aligns QNX-specific code logic closer to the common QProcess logic, making it unecessary to have custom versions of functions such as QProcess::waitForStarted(). The only difference that remains is the use of spawn() instead of fork(), because both fork() and vfork() do not support multi-threaded applications on QNX and will segfault. Change-Id: I8e1f9823629fcb5e7c3c128fafc2542a403b969e Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Checking for directory exists in failed QDir::mkpath on SymbianMurray Read2012-02-151-2/+9
| | | | | | | | | | | | | | QDir::mkpath should return true if the directory already exists. In the new native Symbian implementation, RFs returns KErrPermission denied when you try to access some data caged directories such as C:\private. This was being interpreted as failure, as the code expected KErrAlreadyExists for the case where the directory exists. In this circumstance we now check if the directory already exists. Task-number: ou1cimx1#974477 Change-Id: Ie476219bc963c23d3c7e1773ebded8ecf137fd3c Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>