summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Don't assume QLocale::codecForLocale always returns non-nullKonstantin Ritt2015-05-131-5/+7
| | | | | | | | | | | It may return null during program exit, due to QCoreGlobalData global static already having been destroyed, or due to the codec name/mib being unsupported by ICU. If that's the case, QTextStream needs to fall back to Latin 1, like QString::toLocal8Bit and fromLocal8Bit already do. Change-Id: Ia888243669e051e78e0dbe0bb1bc55a1c4f519d8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qstandardpaths_ios: allow empty strings to be returned for undefined locationsRichard Moe Gustavsen2015-05-101-9/+0
| | | | | | | | | | | According to the documentation for QStandardPaths::standardLocations() and QStandardPaths::writableLocation, they should return empty lists / strings if the location cannot be determined. So remove the section in qstandardpath_ios.mm that always sets a default path for undefined locations. Change-Id: I0c7fc0a1a0bbe2a5e0fb4e79e0f96f0280a647e2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into merge5.5Allan Sandfeld Jensen2015-05-086-71/+89
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/io/qnoncontiguousbytedevice_p.h src/gui/image/qjpeghandler.cpp src/network/access/qhttpthreaddelegate_p.h tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp tests/auto/widgets/widgets/qmenubar/BLACKLIST Change-Id: I01de8c1c28efcedfd7953d05025f54802dc08ab3
| * Merge 5.4 into 5.4.2Oswald Buddenhagen2015-04-204-71/+67
| |\ | | | | | | | | | Change-Id: Ice194d5e8dcd1003acfc9864620b166699b74a44
| | * let QWindowsPipeReader::stop() cancel the current I/O operationJoerg Bornemann2015-04-162-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In rare cases the I/O operation was still running after the destructor was running, which then modified free'd memory and caused a malformed heap. To prevent this, we ensure that QWindowsPipeReader::stop() cancels a running I/O operation and sets the readSequenceStarted flag correctly. Also, we prevent the start of a new read operation after we called stop(). Change-Id: If8a28bdf23a39a0e88c1770a6f66e2b24ea426bb Task-number: QTBUG-45601 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * inline QWindowsPipeReader::completeAsyncReadJoerg Bornemann2015-04-162-32/+23
| | | | | | | | | | | | | | | | | | | | | | | | There's exactly one caller for this private method, and future code will be a bit simpler after moving the code to the calling site. Change-Id: Ibc65f91c770f9f29b317ceddb39a67d52106da33 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * remove emitReadyReadTimer from QWindowsPipeReaderJoerg Bornemann2015-04-162-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zero timeout singleshot timer emitReadyReadTimer was used to emit the readyRead signal via the event loop in case of a synchronous read. In that particular case, ReadFile would return successfully, and the notified slot would not be called. Now, that we use an I/O completion port, the notified slot is always called, even in the synchronous case. The emitReadyReadTimer is not needed anymore. This is also supported by the fact that the timer is immediately stopped in notified() after it was started in completeAsyncRead(). Change-Id: I93bcde5f067bf89a1d49005a3fddda4c8c8c95fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * QWindowsPipeReader: zero OVERLAPPED struct before every ReadFileJoerg Bornemann2015-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | According to the documentation we should always pass a zeroed OVERLAPPED object to ReadFile. Change-Id: I3f822af46a2c38e029e02461f706c4fd91c00c50 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Doc: fix description of QWindowsPipeReader::readJoerg Bornemann2015-04-161-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib34fc77cc05125cf698e255a5d80dbf83cf4575e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * QLockFile: fix deadlock when the lock file is corruptedOlivier Goffart2015-04-152-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QLockFile] Fixed a deadlock when the lock file is corrupted. Task-number: QTBUG-44771 Change-Id: Ic490b09d70ff1cc1733b64949889a73720b2d0f3 Reviewed-by: David Faure <david.faure@kdab.com>
| * | QNAM: Fix upload corruptions when server closes connectionMarkus Goetz2015-04-202-0/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes several upload corruptions if the server closes the connection while/before we send data into it. They happen inside multiple places in the HTTP layer and are explained in the comments. Corruptions are: * The upload byte device has an in-flight signal with pending upload data, if it gets reset (because server closes the connection) then the re-send of the request was sometimes taking this stale in-flight pending upload data. * Because some signals were DirectConnection and some were QueuedConnection, there was a chance that a direct signal overtakes a queued signal. The state machine then sent data down the socket which was buffered there (and sent later) although it did not match the current state of the state machine when it was actually sent. * A socket was seen as being able to have requests sent even though it was not encrypted yet. This relates to the previous corruption where data is stored inside the socket's buffer and then sent later. The included auto test produces all fixed corruptions, I detected no regressions via the other tests. This code also adds a bit of sanity checking to protect from possible further problems. [ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection Change-Id: I54c883925ec897050941498f139c4b523030432e Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
* | Use kqueue on NetBSD in qfilesystemwatcher.Niclas Rosenvik2015-05-082-3/+3
| | | | | | | | | | | | | | | | | | | | Enable kqueue on NetBSD in qfilesystemwatcher. NetBSD has kqueue. http://netbsd.gw.com/cgi-bin/man-cgi?kqueue Change-Id: I6305a37df079c35b9a9b1f70c75ec00e05d25b47 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QSettings: use QStandardPath to resolve path on iOSRichard Moe Gustavsen2015-05-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current solution hard-codes a settings path that on iOS will point to a write protected path inside the sandbox. So change the QSP fallback in QSettings to also include iOS. Note that changing settings path would normally be problematic since it would cause migration issues. However, since the current solution can never have worked on iOS, starting to use QSP now should be fine. Change-Id: Iecad7d84595aee24ca0e2446fa5997296ad8b5a8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | qstandardpaths_ios: return empty path for ApplicationsLocationRichard Moe Gustavsen2015-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | There is no ApplicationsLocation on iOS (at least not one that is public API). NSApplicationDirectory just points to a non-existing write-protected path inside the app sandbox. Rather than returning something we know is wrong, it's better to return an empty string. Change-Id: I2ebc151f15509ed5699af05def5c708a56eeaf31 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | qstandardpaths_ios: use fallback for DesktopLocationRichard Moe Gustavsen2015-05-051-3/+1
| | | | | | | | | | | | | | | | | | NSDesktopDirectory points to a non-existing write-protected path inside the app sandbox. According to QSP documentation, we should fall back to use the home directory instead. Change-Id: I2c370af7758ac043eddcff84aa287eacc754ae38 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | qstandardpaths_ios: return writable locations for Fonts, Music, Movies, ↵Richard Moe Gustavsen2015-05-051-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pictures and Download QStandardPaths::writableLocation() for FontsLocation, MusicLocation, MoviesLocation, PicturesLocation and DownloadLocation all return directories that point inside the sandbox, but don't exist and cannot be created. In other words, they are not usable for writing or anything else. According to iOS File System Programming Guide (*), such files should instead be located inside Documents, or sub-directories within. (*) https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW4 Task-number: QTBUG-42804 Change-Id: I54145af8058d68e0346d29de5a2bec18dafc21e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Add Q_REQUIRED_RESULT in several placesSérgio Martins2015-05-041-2/+2
| | | | | | | | | | | | Change-Id: Icda3000f1d9f0d41612a50a816aa5de5e32028d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | [QTextStream::read.*] Return earlier when nothing has been readKonstantin Ritt2015-05-011-3/+3
| | | | | | | | | | | | | | There is no any sense in detecting the encoding of an empty string ;) Change-Id: I1c7af07bd7c3e7e7cf67421a2cb3a1123ca57650 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QIODevice: fix data loss when reading large amounts from sequential devicesMarc Mutz2015-04-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain situations, when reading a large amount of data from sequential devices with QIODevice::readAll(), content was lost when passing a qint64 value > QByteArray::MaxSize into QByteArray::resize(), which takes an int. The result of the conversion to int is either negative or calculated mod 2^32. In any case, it will at some point be < QByteArray::size(), which prompts QByteArray to truncate, losing already-read content. Fix by adding an explicit size check before calling QByteArray::resize(). This shows once more that an API that uses int for sizes is dangerous. Esp. on 64-bit platforms. Change-Id: I30fbfad0bf37476c34141b6f3786e7e0fc8e1e74 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QDir: sort-by-size remove two unconditional branchesNikita Baryshnikov2015-04-251-1/+1
| | | | | | | | | | | | | | | | | | recent change ad03511256a8279a8f55069e5a3a3465a9e122ec made r be arbitrary, not just -1, 0, +1, and now it doesn't make sense to have two unneeded unconditional branches in the sort-by-size case Change-Id: I9d80210846e89e3e8c574f0c32e04b05202b8a5b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Windows: Fix QLockFile hanging when file cannot be created.Friedemann Kleint2015-04-231-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Return QLockFile::PermissionError when file does not exist, preventing the stale file detection logic from triggering. Add Windows-only autotest trying to create a lock file in a system folder guarded with checks for elevated processes and UAC virtualization. Task-number: QTBUG-45631 Change-Id: I1790f8f925660f6bf1df94c2ced901e6ec57cbb0 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | QDir: fix int overflowNikita Baryshnikov2015-04-201-1/+1
| | | | | | | | | | | | | | | | This caused reverse order of session items in qt creator. Introduced in ba287c55ef179b073482453298f513992b54c11e. Change-Id: I5c37ca6a1ef4753b6449eb9e87b4def5ea858677 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignalMartin Smith2015-04-202-30/+6
| | | | | | | | | | | | | | | | | | | | | | | | Signals marked with QPrivateSignal had the QPrivateSignal marker ifdefed out for qdoc. This is no longer necessary, so the #ifdefs are removed. Change-Id: Idb334ed311c6ed6883d7b7b5a3fcdede60c4a1f8 Task-number: QTBUG-45535 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | QFileSystemEngine: optimize from...(qgetenv())Marc Mutz2015-04-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | Use the QByteArray overload, which no longer calls strlen(), but uses the QByteArray length. No danger of embedded NULs, because environment variables cannot contain NULs. Change-Id: I33fe479adfce2624c7042608e8e0a5c5b54a85db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-1512-38/+38
|\| | | | | | | Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
| * Doc: Fix using Apple-related terminology in Qt CoreAlexander Volkov2015-03-3112-38/+38
| | | | | | | | | | | | | | | | | | | | | | Use the name "OS X" instead of "Mac OS X", "Mac OS" and "OSX", and mention iOS. Replace "Carbon Preferences API" by "CFPreferences API" in the QSettings documentation. Change-Id: Ia7f9fb874276c7c445a1649df521b96ff43daa0c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | qstorageinfo_unix.cpp: fixes for NetBSD and solarisNiclas Rosenvik2015-04-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | NetBSD uses struct statvfs ** as first argument to getmntinfo. see: http://netbsd.gw.com/cgi-bin/man-cgi?getmntinfo getmntent on solaris and sunos returns an integer not a pointer. see: http://www.unix.com/man-page/opensolaris/3c/getmntent/ see: https://smartos.org/man/3C/getmntent Change-Id: Ic01da0edcf1f55617294e5a86b8459669e82c1b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | remove the "wonderful Windows notifier" from QProcessJoerg Bornemann2015-04-136-36/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Prevent memory overgrowth while reading from a sequential deviceAlex Trotsenko2015-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After flushing the internal buffer, QIODevice::readAll() attempts to read the device incrementally. On each iteration, the result buffer size is increased by a constant value independently from the number of read bytes. This lead to unreasonable growth of the buffer if these additional conditions were met: - readData() requests new data from the device on every call; - highly loaded device provides at least one byte on each request. Instead of constant resizing, keep the size of free block to avoid a possible memory exhaustion. Task-number: QTBUG-44286 Change-Id: I637e2d0e05bd900a1bb9517af2fe7d8038c75a35 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Remove special handling for (DY)LD_LIBRARY_PATH in QProcess.Jake Petroules2015-04-081-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides the ability to pass a *real* clear environment to a QProcess, rather than (DY)LD_LIBRARY_PATH always being copied over from the current environment behind-the-scenes. This is important to users because passing a truly clear environment is now possible. [ChangeLog][Important Behavior Changes] (DY)LD_LIBRARY_PATH will no longer "stick" in the process environment when starting a QProcess. This means that if a QProcess is started with a clear environment, it will not specially inherit (DY)LD_LIBRARY_PATH from the parent process. This should not affect most applications, but if the old behavior is desired, one can simply pass a clear QProcessEnvironment with the (DY)LD_LIBRARY_PATH values added, to the QProcess. Change-Id: I51d1bc14905c5cc126fb02d91dddc2faade41a3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSaveFile: Fix permissions on creationKai Koehne2015-04-083-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSaveFile is intended to be a replacement for QFile, and should use the same permissions for newly created files. QTemporaryFile however creates new files with 0600 mask by default. Fix this by making the mode_t argument QTemporaryFileEngine uses configurable, and using 0666 for QSaveFile (like we do in QFile). [ChangeLog][Important behavior changes] Files created by QSaveFile do now have the same rights as files created by QFile. This also fixes a regression in QSettings: In the Qt 5.4 series, new files created by QSettings were only readable by the current user. Task-number: QTBUG-44086 Change-Id: Ie1cc20e9f25c6e72e1bc9176490c419c27c5fc82 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QIODevice: do not change the 'pos' member for sequential devicesAlex Trotsenko2015-04-041-2/+4
| | | | | | | | | | | | | | | | | | | | Concept of 'current position' exists only for random-access devices. As documented, for sequential devices QIODevice::pos() must always return 0. Prevent a modification of the internal 'pos' member in QIODevice::readAll() method to follow this rule. Change-Id: Ida2ee6a629ccfc3068d62f95ab1064ada13fdda5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Liang Qi2015-04-017-26/+32
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-317-26/+32
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | * Re-add documentation for QStandardPaths::GenericDataLocation.Friedemann Kleint2015-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The text was accidentally removed in 1afe110b8fe6da51ec23736fa3a105013255f904. Fixes qdoc warning: qtbase/src/corelib/io/qstandardpaths.cpp:60: warning: Undocumented enum item GenericDataLocation in QStandardPaths::StandardLocation Change-Id: I7f236c01d85ebf76b67ab7af7e61b8cbedee4c36 Reviewed-by: David Faure <david.faure@kdab.com>
| | * Introduce qt_subtract_from_timeout to reduce code duplication.Daniel Teske2015-03-095-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same qt_timeout_value function was copied 5 times in qtbase's code, so provide a common implementation in QIoDevice that can be used by everyone. This commit also corrects the remaining time calculation in QProcess::waitForBytesWritten and QProcess::waitForFinished by using this new function. For QProcess::waitForFinished, if the process started within almost exactly the timeout time passed to waitForFinished, msecs - stopWatch.elapsed() would be -1, which is a special value. Change-Id: I7b76ee6bae695eafdd02e3db03e2ff1e23a7f40c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Call MoveFile() anyway if the delete failed because it did not existAndy Shaw2015-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since the new filename might not yet exist and DeleteFile() will fail if the new file does not exist then MoveFile() should still be called. Change-Id: Id4576ade079ad8593f824b7100bb0d94aec1fa0a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Split out some inline qdebug formatting helpers to qdebug_p.h.Friedemann Kleint2015-04-012-0/+130
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract helpers to be able to format classes without type names and use those for formatting QEvents to reduce clutter. For example: QWidgetWindow/"MainWindowClassWindow" QMouseEvent(QEvent::Type(MouseMove), buttons=QFlags<Qt::MouseButtons>(LeftButton), localPos=QPointF(50,116), screenPos=QPointF(948,652)) QWidget/"qt_scrollarea_viewport" QMouseEvent(QEvent::Type(MouseMove), buttons=QFlags<Qt::MouseButtons>(LeftButton), localPos=QPointF(45,32), screenPos=QPointF(948,652)) becomes QWidgetWindow/"MainWindowClassWindow" QMouseEvent(MouseMove, LeftButton, localPos=50,116, screenPos=948,652) QWidget/"qt_scrollarea_viewport" QMouseEvent(MouseMove, LeftButton, localPos=45,32, screenPos=948,652) Change-Id: Ie5441d922962a05caed6b7079a74ea8a2b8a64fb Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Remove extra semi-colons: clang doesn't like itThiago Macieira2015-03-261-8/+8
| | | | | | | | | | | | | | qdebug.h:373:81: error: extra ';' outside of a function is a C++11 extension [-Werror,-Wc++11-extra-semi] Change-Id: Iee8cbc07c4434ce9b560ffff13cb759805b64dfc Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Sort the entries in QDir by using the QDateTime::msecsTo()Andy Shaw2015-03-201-1/+1
| | | | | | | | | | | | | | | | | | By using the QDateTime::msecsTo to do the sorting it means that if there is support for a precise time on the file system then this ensures it sorts correctly. Change-Id: I00528596908bba7b586aeffe5b0aa81019ff5722 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDebug operator for Q_FLAG when the QFlags itself is registeredOlivier Goffart2015-03-181-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Currently, IsQEnumHelper<T> returns true also if QFlags<T> is registered as a Q_FLAG. But this is going to be changed in the next commit. For the QDebug operator to continue to work even when the QFlags<T> is registered and not the T, we need to take it into account in the QEnableIf condition Change-Id: If1fcffd133aa20ba95a07e2bfaaa308896ab01b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLockFile: use QCoreApplication::applicationName.David Faure2015-03-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | Unlike qAppName, it doesn't require a QCoreApplication instance, making QLockFile usable in destructors of global statics. This also uses the value passed to setApplicationName if called rather than always argv[0]. Change-Id: I40446aba410db42d7cfe6b4408878faf435246f7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix build of forkfd_qt.cpp on FreeBSDAlex Richardson2015-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It no longer compiled after 614f37c8b559a722538c58dd1f65229cfca7d35b due to the following: - forkfd_qt.cpp set _XOPEN_SOURCE to 500 - It then includes qatomic.h which include sys/cdefs.h (the FreeBSD header that parses and sets _POSIX_C_SOURCE, _XOPEN_SOURCE and other macros) - sys/cdefs.h redefines _POSIX_C_SOURCE to 199506 due to _XOPEN_SOURCE's value - Several libc symbols expected to exist by libc++ are hidden due to _POSIX_C_SOURCE's value and the build fails Setting _XOPEN_SOURCE to 700 ensures that _POSIX_C_SOURCE is set to 200809 which is required for libc++ to work correctly Task-number: QTBUG-45006 Change-Id: Iac93220d19ca5ab9ba8ac61a79748252283c3c47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | forkfd: make only one of forkfd or spawnfd be compiledThiago Macieira2015-03-141-0/+7
| | | | | | | | | | | | | | We only ever use one, never both. Change-Id: Iee8cbc07c4434ce9b560ffff13caf94c05dba338 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QIODevice: Fix some 64-bit issuesAlex Trotsenko2015-03-101-38/+38
| | | | | | | | | | Change-Id: I77354a3069b256135c5792975a1445bcbe816e20 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QLockFile: Avoid zero-sized lock file on write errorhjk2015-03-051-4/+8
| | | | | | | | | | | | | | | | | | | | Failure to write into a successfully opened lock file left the lock file with size 0 in the filesystem. Task-number: QTBUG-44771 Change-Id: I561bf629b9f160174d658bf105be828f71d78ff9 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-021-1/+1
|\| | | | | | | Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
| * Delete the file that we will move to not the new file before movingAndy Shaw2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | In the case of Windows Embedded Compact we need to delete the destination file before doing the move if DeleteAndRenameFile has failed since MoveFile will fail if the destination file exists. Change-Id: I29d04c147bf8b6b5de850fd7da7bb3dc6a827f1d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Output registered enums in qDebug operator for QFlags.Friedemann Kleint2015-02-262-2/+28
| | | | | | | | | | Change-Id: Ia424df234fbd333782c10f0a4422875bb1bfc1f5 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-249-22/+30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff