summaryrefslogtreecommitdiffstats
path: root/src/corelib
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>
* Don't overwrite applicationName if already set.David Faure2015-05-091-4/+6
| | | | | | | | | | | | My commit 6c973dee2cb1686ea32657 broke the case where setApplicationName is called before the QCoreApplication constructor. Fixed and added autotest. Task-number: QTBUG-45283 Change-Id: If7bdb0d82be50b50a95a04027f5f9d7143c1a7ac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Merge remote-tracking branch 'origin/5.4' into merge5.5Allan Sandfeld Jensen2015-05-088-74/+92
|\ | | | | | | | | | | | | | | | | | | | | | | 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 remote-tracking branch 'origin/5.4.2' into 5.4Allan Sandfeld Jensen2015-05-082-3/+3
| |\ | | | | | | | | | Change-Id: I944e9e59d28172290930db0e162c1597ad05c59e
| | * Require -fPIC instead of just -fPIE for -reduce-relocationsThiago Macieira2015-05-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 5 combined with a recent binutils have a new optimization that allows them to generate copy relocations even in -fPIE code. Clang has the same functionality when compiling an executable with -flto. We need to let the compilers know that they cannot use copy relocations, so they need to use really position-independent code. Position independent code throughout is not really required. We just need the compilers to use position-independent access to symbols coming from the Qt libraries, but there's currently no other way of doing that. Task-number: QTBUG-45755 Change-Id: I0d4913955e3745b69672ffff13db5df7377398c5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.4.2' into 5.4Simon Hausmann2015-05-042-0/+22
| |\| | | | | | | | | | Change-Id: I209def43673df62c75add4f623350fb1c98887a1
| | * Merge 5.4 into 5.4.2Oswald Buddenhagen2015-04-204-71/+67
| | |\ | | | | | | | | | | | | Change-Id: Ice194d5e8dcd1003acfc9864620b166699b74a44
| | * | 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>
| * | | Bump versionOswald Buddenhagen2015-04-201-2/+2
| | |/ | |/| | | | | | | Change-Id: I9435dd001b6067464d7c04fbdf92b5b3ad546bac
| * | 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>
* | 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>
* | QStateMachine: allow posting of events when starting.Erik Verbruggen2015-05-072-2/+13
| | | | | | | | | | | | | | | | | | | | | | This allows subclasses to submit any queued events that have to be handled before normal operation starts. For example, if an error event got generated during initialization which has to be handled by the state machine, the startup hook in the private class can be used to post those events and have the state machine handle them appropriately. Change-Id: I62249a31d8840f47bc19920870ad5da9647e61f9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | QStateMachine: Fix transition ordering.Erik Verbruggen2015-05-071-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | When there are conflicting transitions, a transition that is nested deeper (i.e. more specific) has priority. If two transitions have the same nesting level, the one that comes first in the document order gets priority. Before this patch, only the document order was considered. Change-Id: I58f188c270cabe2c386a783ceef7a0a955105425 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Make it explicit that a few Qt::WindowFlags are overlappingTor Arne Vestbø2015-05-071-3/+6
| | | | | | | | | | | | Change-Id: Ia161fb9b7196d139e22fe7b3b576c5c72ee8a2f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@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>
* | docs: QFile doesn't support QUrl style qrc pathsSérgio Martins2015-05-061-2/+2
| | | | | | | | | | Change-Id: I2c5f90e7d1e64d652e920bdbf9da98ad8ac1e4f9 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.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>
* | Make data tables const.Volker Krause2015-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Add Q_REQUIRED_RESULT in several placesSérgio Martins2015-05-043-4/+4
| | | | | | | | | | | | Change-Id: Icda3000f1d9f0d41612a50a816aa5de5e32028d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | qstatemachine: add methods detect when a machine has processed an eventFawzi Mohamed2015-05-042-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | currently when adding an event it is not possible to know when processing it has finished. In particular if the event is ignored no method is called. Adding virtual methods to the private implementation (binary compatibility). These methods allow for extended automatic testing of the state machines. (cherry picked from commit e7feb956280105113b3e58f12e5f32f54199a95a) Change-Id: Iaa48fb9d7f6a6cde1a8a7a2bece7b4df55c147e8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | QStateMachine: add internal transitions.Erik Verbruggen2015-05-044-13/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | The behavior of "external" and "internal" transitions is identical, except in the case of a transition whose source state is a compound state and whose target(s) is a descendant of the source. In such a case, an internal transition will not exit and re-enter its source state, while an external one will. [ChangeLog][State machine] Added support for internal transitions. Change-Id: I9efb1e7368ee52aa2544eb84709a00ae3d5350d3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | QStateMachine: cache expensive calculations.Erik Verbruggen2015-05-042-55/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As nothing changes in the state machine when selecting transitions for events and then calculating the exit- and entry-sets, some calculations can be cached. The exit set for a transition was calculated multiple times. First in removeConflictingTransitions, where the two loops would each calculate them multiple times. Then secondly in microstep(), which would calculate the exit set for all transitions. Transition selection, exit set calculation, and entry set calculation all calculate the transition domain and effective target states for transitions. Change-Id: I217328a73db2f71e371eb5f60a0c7b222303f0ca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | QRegularExpression: add error strings from PCRE 8.37Giuseppe D'Angelo2015-05-011-1/+2
| | | | | | | | | | | | | | Change-Id: Id62abd91c1584e4e63b95afec0520995125fe807 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSortFilterProxyModel: improve formal argument naming for lessThanGiuseppe D'Angelo2015-05-012-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Make it clear (just like the other methods) that the indexes refer to the source model, not the proxy model. There was already a note in the documentation, but it was at the end of it; instead, change the formal arguments names. Change-Id: Ia9592f2b080ff276a62de1713a9623e0f3a50cf6 Reviewed-by: Tobias Koenig Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: David Faure <david.faure@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>
* | QStateMachine: optimize conflict calculation.Erik Verbruggen2015-04-281-8/+22
| | | | | | | | | | | | | | | | Done by using in-place removal from the list of transitions using iterators. Change-Id: I6dced4b214b49b3dcd3ba19ca4cd81a601f81bb6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add support to set text/uri-list mimedata via setData()Marko Kangas2015-04-281-1/+16
| | | | | | | | | | | | | | | | | | Fixed issue that text/uri-list mimedata got from QMimeData::data() was corrupted after setting it back via QMimeData::setData() Change-Id: I2377523a9286519402ab9127ed7f3fa66e39a679 Task-number: QTBUG-45486 Reviewed-by: David Faure <david.faure@kdab.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>
* | Doc: Bring QSizeF/QPointF::isNull() documentation up to dateTopi Reinio2015-04-272-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.0 (commit 09dd19df) sign is ignored when testing whether a QPointF or QSizeF is null. This updates the documentation accordingly. Change-Id: I3de1c748f3caa63b8bd8990006de5ba572eac83e Task-number: QTBUG-45669 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.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>
* | QVector: Save one copy-CTOR call if we don't reallocSérgio Martins2015-04-241-5/+12
| | | | | | | | | | Change-Id: Ie0f2eb922500bc3d76852939cf2c5d28d65a43ae Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.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>
* | qsystemdetection.h: Check existence of define WINAPI_FAMILY_PHONE_APP.Friedemann Kleint2015-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | It is missing in MinGW and causes warnings like: src/corelib/global/qsystemdetection.h:109:24: error: "WINAPI_FAMILY_PHONE_APP" is not defined [-Werror=undef] in QtScript and headersclean failures in Active Qt. Task-number: QTBUG-45666 Change-Id: I167d9d5b33faddfbbcf44bdcce5e86fb43614fa9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QStateMachine: replaced Q_FOREACH with foreach.Erik Verbruggen2015-04-221-16/+16
| | | | | | | | | | Change-Id: I2bd0f9d7ef1d6f236e2afa9fc5b75c5a6f61a250 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@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>
* | Enable checking for whether the system palette was explicitly setHarald Hvaal2015-04-202-0/+4
| | | | | | | | | | | | | | | | | | | | In order to obey a palette set globally on QApplication, an application attribute for checking if it's set at all is added. Task-number: QTBUG-39800 Change-Id: I26b965e6e18e0e1ca4df03cf343b3527df3636b2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignalMartin Smith2015-04-2017-240/+48
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Rework WinRT timer handlingOliver Wolff2015-04-202-165/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The former way of timer handling caused heap corruptions as the timer callbacks tried to access the event dispatcher after it was freed. So instead of accessing the timers inside the callbacks we use native events to signal their expiration and also to cancel them. Task-number: QTBUG-44973 Change-Id: Ib9348651c0545cc4393f0396601f9a5bb183c996 Reviewed-by: Andrew Knight <qt@panimo.net>
* | 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>
* | QScopedValueRollback: add two strategic qMove()sMarc Mutz2015-04-161-2/+2
| | | | | | | | | | | | | | | | Use moves instead of copies when the rhs is no longer needed afterwards. Change-Id: If053bfce03b886099688452ada74f6a6f36db5c2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QScopedValueRollback: use ctor-init-listMarc Mutz2015-04-161-4/+2
| | | | | | | | | | | | | | Avoids calls to the default ctor for member 'oldValue'. Change-Id: Ieb9570b74e4a46b28c04625fac3ce267074c4a76 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QSignalBlocker: mark all functions as noexceptMarc Mutz2015-04-162-15/+15
| | | | | | | | | | | | | | | | Consequently, mark also QObject::isSignalsBlocked() and QObject::blockSignals() as noexcept. Change-Id: Iaf44674bbf54eeb2bb5f267eb7caa916eccbf7fb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>