summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Revert check for file size to a warning in QFile::mapJoão Abecasis2009-11-191-1/+1
| | | | | | | | | | | | The check, introduced in c66de8a19b558e14097c402480eeabf0b5ec2351, changes behavior and it is not clear whether we should prevent mmaping beyond EOF. FWIW, python prevents it. Leaving a warning in there for now so as not to break applications that depend on the feature. Task-number: QTBUG-6008 Reviewed-by: Thiago Macieira
* Revert "Revert "Fix detection of linux-g++""Simon Hausmann2009-11-191-1/+1
| | | | | | This reverts commit baab5f7e77c1216ede839766c97abef1a708b365. Reviewed-by: Paul
* Merge branch '4.6' of oslo-staging-1 into 4.6Simon Hausmann2009-11-192-12/+17
|\
| * Fix the evaluation nag in binary installs with commercial licenses.Thiago Macieira2009-11-181-12/+14
| | | | | | | | | | | | | | | | | | | | It wasn't generating any message, but it did think it was an evaluation install. So all Qt console applications produced an extra newline and the GUI ones showed the Qt logo briefly. I noticed because of the extra newline when building Qt itself. Reviewed-by: Trust Me
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-11-1812-51/+53
| |\ | | | | | | | | | | | | Conflicts: configure.exe
| * | Fix regression introduced in 98a05681851db9d88b1364af52be543715fbe306João Abecasis2009-11-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some network tests were set up to ignore a qWarning that was removed. Fixed those tests. Made warning from QIODevice::getChar have the right function name. Reviewed-by: Thiago Macieira
* | | Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-193-6/+8
|\ \ \
| * | | Ran the script utils/normalizeOlivier Goffart2009-11-181-4/+4
| | | | | | | | | | | | | | | | Over src/ tools/ examples/ and demos/
| * | | Export QStateMachine::WrappedEvent and QStateMachine::SignalEventEskil Abrahamsen Blomfeldt2009-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These two classes were missing exports. Since the accessors are inline, the bug would only be visible when someone tried to call the constructors of the classes. Reviewed-by: Kent Hansen
| * | | Merge upstream/4.6 into oslo-staging-2Olivier Goffart2009-11-1710-54/+84
| |\ \ \
| * | | | e32def.h include removes TRUE/FALSE redifine warnings on Symbian with gcce ↵tomyri2009-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compiler Signed-off-by: axis <qt-info@nokia.com> axis: While the fix seems to break our policy of having no system headers included from qglobal.h, it should be harmless since e32def.h is to Symbian what stddef.h is to POSIX.
* | | | | Revert "Fix detection of linux-g++"Paul Olav Tvete2009-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 333bd2e761af8aaf6efd3d66eb028af046c4dfc2. The change broke compilation of QWS, since QtGui depends on glib, but doesn't link with it directly. This needs to be fixed properly, but not just before the release. Reviewed-by: Harald Fernengel
* | | | | Merge remote branch 'staging/4.6' into 4.6Simon Hausmann2009-11-183-117/+103
|\ \ \ \ \ | | |_|/ / | |/| | / | |_|_|/ |/| | | Conflicts: configure.exe
| * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-11-178-119/+864
| |\ \ \
| * | | | Removing unnecessary chunking and stat'ing when reading QIODeviceJoão Abecasis2009-11-171-54/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chunk size increased to QIODEVICE_BUFFERSIZE (currently 16k) where chunking is still needed. Namely, on sequential devices and when QByteArray is unable to allocate a large enough buffer. This is necessary for backward compatibility Improved validation and prevention of overflow in maxSize argument. Updated autotest that relied on a null QByteArray when no data was available and no errors were found. The only guarantee we should be providing in this case is an empty result -- even though that behavior is preserved for the time being. Affected functions: * QIODevice::read(qint64 maxSize) Chunking will still happen for large maxSize (i.e., QByteArray resize fails), where it could be used as a synonym for QIODevice::readAll(). No stat'ing performed. Read from device continues for as long as it is successful. Stops if an error occurs or if we get less data than requested. * QIODevice::readAll() Chunking is performed for sequential devices where total size wouldn't be known beforehand. For sequential devices, reading continues as long as data is returned, even if less than requested. Non-sequential devices will be stat'ed once. If QIODevice::size returns 0, this is taken to mean unknown size and chunking is performed. Otherwise, a single read request is made for the specified size. On failure to resize QByteArray, nothing is returned. * QIODevice::readLine(qint64 maxSize) Chunking is performed for maxSize == 0, or if we can't allocate a large enough buffer. No stat'ing performed at this level. Read from device continues until EOL is found, as long as we get all requested data. Task-number: QT-2347 Reviewed-by: Thiago Macieira Reviewed-by: Miikka Heikkinen
| * | | | Fix regression introduced in c08e708037d33271825ce6a6a1ac640e96b70c36João Abecasis2009-11-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing nothing to a file, not actually writing anything is not an error. Also, from a change introduced in the same commit, there is no point in checking for EOF when writing. Task-number: QTBUG-5847 Reviewed-by: Olivier Goffart
| * | | | Fix QIODevice::getChar optimizationJoão Abecasis2009-11-171-46/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Text mode there would be a huge penalty on each '\r' found even if the internal buffer was not exhausted, because we would repeatedly remove the '\r' from the buffer and put it back it. Before following through to the unoptimized code, anyway. Instead, we now loop over the internal buffer until we find a suitable character. Reduced code duplication by having QIODevice::getChar directly call QIODevice::read and letting compilers do their job. Reviewed-by: Markus Goetz
| * | | | Remove needless loop in QIODevice::seekJoão Abecasis2009-11-171-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Either the buffer has more data than is being skipped and it can be cleared or it doesn't and we must skip it. If the total size of QRingBuffer exceeds INT_MAX there'll be bigger problems (e.g., QRingBuffer::size() will overflow) that can only be handled there and there's no point trying to work around them here. Reviewed-by: Markus Goetz
| * | | | There should only be one write buffer at a time in QFileJoão Abecasis2009-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be sure, we should explicitly use the size of that buffer and not the whole QRingBuffer when flushing the data. With this change, we make violations of the one-buffer-rule explicitly fail on flush(), but we avoid corrupting data and reading past the buffer's end. Reviewed-by: Markus Goetz
* | | | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-181-0/+2
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-171-0/+2
| |\ \ \ \ | | |_|/ / | |/| | / | | | |/ | | |/|
| | * | Fix QT_NO_SHAREDMEMORY while not breaking the QNX buildJørgen Lind2009-11-161-0/+2
| | | | | | | | | | | | | | | | Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* | | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-1711-58/+86
|\ \ \ \ | |/ / /
| * | | Small doc fix.axis2009-11-171-1/+1
| | | | | | | | | | | | | | | | RevBy: Trust me
| * | | Merge remote branch 'staging/4.6' into 4.6Simon Hausmann2009-11-179-53/+83
| |\ \ \ | | |/ / | |/| / | | |/
| | * doc: Fixed qdoc errors.Martin Smith2009-11-161-1/+1
| | |
| | * doc: Fixed qdoc according to Bjarne's recommendation.Martin Smith2009-11-161-3/+28
| | | | | | | | | | | | | | | | | | Someone had changed an operator==() and an operator!=() from single parameter members to two-parameter friends but hadn't changed the qdoc comments.
| | * Don't sendPostedEvents() twice when calling processEvents() manuallyBradley T. Hughes2009-11-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fe0f807e1f4e7510c6d8cddd848bcbc25e358651 could cause sendPostedEvents() to be called twice, which caused regressions in tests/auto/qtimer. Fix this by only calling sendPostedEvents() "manually" if we didn't see a WM_QT_SENDPOSTEDEVENTS message. Reviewed-by: Prasanth Ullattil
| | * Fix compilation on solaris-g++-64.Thiago Macieira2009-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add the "reserved" member to QVectorData in that configuration. Since this is only about the bootstrapped version of Qt, there are no binary compatibility issues. Reviewed-by: Bradley T. Hughes
| | * Merge commit 'upstream/4.6' into 4.6Bradley T. Hughes2009-11-132-9/+9
| | |\
| | * | doc: Fixed qdoc according to Bjarne's recommendation.Martin Smith2009-11-131-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Someone had changed an operator==() and an operator!=() from single parameter members to two-parameter friends but hadn't changed the qdoc comments.
| | * | Merge commit 'coreteam/4.6' into oslo1-4.6Marius Storm-Olsen2009-11-133-16/+17
| | |\ \
| | | * | utils/qlalr generator: adapt changes to xmlstream and script filesPeter Hartmann2009-11-113-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some changes were made to qxmlstream_p.h and script files directly; however, those files are generated automatically by src/corelib/xml/make-parser.sh and src/script/parser/make-parser.sh, respectively, so the generator would overwrite the manual changes to the files the next time it is run. This patch integrates those changes into the generator rather than into the files directly. Reviewed-by: Roberto Raggi Reviewed-by: Olivier Goffart
| | * | | Merge commit 'upstream/4.6' into 4.6Bradley T. Hughes2009-11-121-0/+20
| | |\ \ \
| | * \ \ \ Merge branch '4.6' into osloStaging1-4.6Jocelyn Turcotte2009-11-121-21/+22
| | |\ \ \ \
| | | * | | | QUrl::fromUserInput: improvements, corrections and make the demoJocelyn Turcotte2009-11-121-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | browser use it. - Handle windows files names by looking for paths first (and don't check that it exists first) - Handle host names without dots (it was not handled because of difficulties with the case host:port) - Return the parsed url only if the host or the path is not empty instead of returning a url that looks like "http:" Reviewed-by: Thiago Macieira
| * | | | | | Early return for allowMove within a parent QModelIndexStephen Kelly2009-11-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If this is not done, the climbing ancestors later in the method uses srcParent.row() as pos causing failure depending on which rows are being moved, and what the row of the parent is. Merge-request: 2072 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| * | | | | | Merge commit upstream/4.6 into oslo-staging-2/4.6Olivier Goffart2009-11-133-1/+26
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | |
| * | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into ↵axis2009-11-126-114/+861
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 4.6-staging2
| | * \ \ \ \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6Shane Kearns2009-11-116-60/+29
| | |\ \ \ \ \ \
| | | * | | | | | Revert "Using qreal more consistently in code (prevent misuse of double)"Aleksandar Sasha Babic2009-11-116-60/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 676780d515cedca85829ae962e4f501c5e5b6581. Conflicts: src/gui/painting/qblendfunctions.cpp
| | * | | | | | | Merge commit 'origin/4.6' into 4.6Shane Kearns2009-11-112-3/+15
| | |\ \ \ \ \ \ \ | | | |/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overwrite DEF files with the ones I froze against 4.6.0 RC this morning Conflicts: src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtMultimediau.def src/s60installs/bwins/QtScriptu.def src/s60installs/bwins/QtWebKitu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtMultimediau.def src/s60installs/eabi/QtScriptu.def src/s60installs/eabi/QtWebKitu.def
| | * | | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Shane Kearns2009-11-104-65/+134
| | |\ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Shane Kearns2009-11-105-135/+108
| | |\ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6-s60axis2009-11-0932-247/+360
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qblendfunctions.cpp
| | * | | | | | | | | | Using qreal more consistently in code (prevent misuse of double)Aleksandar Sasha Babic2009-11-066-29/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to force use of qreal where possible. This can lead to better performance on platforms where qreal -> float (i.e. ARM). To achieve this we: 1. changed from 'double' to 'qreal', where justified 2. using qreal() to intialize constants, where justified 3. adding helper functions that are overloaded for qreal like qAtan2(), qAcos(), qFabs() ... 4. defining QT_USE_MATH_H_FLOATS for Symbian platform In addtion we used opportunity to improve code with some small things 5. converting divisions to multiplications (i.e. '/ 2.0' -> '* qreal(0.5)') 6. defining new constants (i.e. 'Q_PI / 180.0' -> 'Q_PI180') 7. declaring variables as 'const', where justified Reviewed-by: Andreas Aardal Hanssen Reviewed-by: Gunnar Sletta Reviewed-by: Jan-Arve Reviewed-by: Kim Motoyoshi Kalland Reviewed-by: Alessandro Portale Reviewed-by: Janne Koskinen
| | * | | | | | | | | | Fix functions that return whether atomics are natives following review commentsShane Kearns2009-11-062-18/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Brad
| | * | | | | | | | | | Binary compatibility of Symbian ARMv5 and ARMv6 buildsShane Kearns2009-11-066-34/+582
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ARMv6 atomics where available Use OS atomics otherwise Integrate ARMV6 atomics to Symbian builds Use compiler defined macros to detect if ARMv6 instructions are available This defines the QT_HAVE_ARMV6 macro, replacing the way it was defined by the Symbian build system previously in qpainting.pri. qatomic_symbian now uses qatomic_arm or qatomic_armv6 automatically Port armv6 atomics to implement generic atomics interface The inline atomics are not inlined when we build for thumb using RVCT. So there is no performance improvement of using the "inline" versions vs a shared version called through a function call. The generic atomics interface is good for binary compatibility, as the same symbols are exported in all versions now. Changed the fallback generic atomics implementation from the unix one to a symbian specific one using RFastLock (identical code to the windows generic atomics, except for RFastLock replaces Win32 CRITICAL_SECTION) Note: GCCE atomics still need porting Tell git to ignore .lst listing files (produced by sbs/abld listing) ARMv6 support for GCCE compiler and fallback implementation using OS When building corelib with GCCE and -march=armv6, QT_HAVE_ARMV6 will be defined. This patch adds copies of the asm functions in GCC syntax. When building for the Symbian emulator, or ARMv5, then Symbian OS atomic functions are used as a fallback - these are more efficient than the unix atomics, and don't require data import (which the ARMv5 atomics use, but the OS loader doesn't support fully) Symbian OS functions are always used for QBasicAtomicInt::ref / deref, because these are faster than the generic function in all cases. They are machine coded for ARMv6, and are used internally by RFastLock. Reviewed-By: axis Reviewed-By: Brad
| | * | | | | | | | | | Add the ARMv6 inline assembly code for compiling with RVCT.Thiago Macieira2009-11-061-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is basically a copy & paste of the GCC inline assembly above, switched to the RVCT inline assembly model (which is actually easier to write and understand). I verified that this code compiles and assembles as expected. The output generated by RVCT is pretty much on the mark. However, I have not executed this code yet to see if it performs as expected. To be noted: - when expanding the inline template code, RVCT may be tempted to switch your entire function to ARM mode. Should we add __attribute__((noinline)) to prevent that? - There's no equivalent to GCC inline assembler's clobber, especially of "memory". Also, there's no "volatile" qualifier to the assembly. Does the compiler know it can't reorder the code? Does it know it shouldn't trust the value of the memory after this? My test indicates the code is fine... Reviewed-By: Shane Kearns
| | * | | | | | | | | | Reorganize the qatomic_armv6.h file to receive the RVCT inlineThiago Macieira2009-11-061-81/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assembly. Move the *Relaxed, *Acquire and *Release functions (which are simply forwarding calls to the *Ordered version) to the bottom of the file. Reviewed-By: Shane Kearns