summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Added QT_NO_ANIMATION to qfeaturesThierry Bastian2009-05-252-4/+17
| | | | | Now you can opt it out to save disk space (for embedded). Also tested it and fixed code in state machine.
* Warnings fixed on MSVCThierry Bastian2009-05-251-1/+3
| | | | simply added Q_UNUSED for parameters that weren't used in a function
* Fixed 'crazy' warnings about using a string instead of a characterThierry Bastian2009-05-2522-82/+80
| | | | | | | Wherever I found that we were using a string instead of a single char I fixed the code. Reviewed-by: olivier
* Merge branch '4.5'Thiago Macieira2009-05-228-129/+223
|\ | | | | | | | | Conflicts: src/corelib/kernel/qsharedmemory_unix.cpp
| * Fix syntax of the fcntl system call: this is not setsockoptThiago Macieira2009-05-221-6/+3
| | | | | | | | Reviewed-By: Oswald Buddenhagen
| * Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5Martin Smith2009-05-228-61/+114
| |\
| | * Fixed compilation with -qtnamespaceMarkus Goetz2009-05-224-7/+9
| | | | | | | | | | | | | | | Task-number: 254333 Reviewed-by: Andy Shaw <qt-info@nokia.com>
| | * Reset openMode to NotOpen when returning false from QFile::open()João Abecasis2009-05-221-0/+9
| | | | | | | | | | | | | | | | | | | | | When connecting to an open file descriptor, set the openMode in the file system engine, as is done for file handles. Reviewed-by: Thiago
| | * QTemporaryFile: really close files before renamingJoão Abecasis2009-05-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets temporary file renaming working on Windows, without requiring block-copying. While we could #ifdef this behavior for Windows, it's preferrable to maintain consistency in the exposed interface. Reviewed-by: Thiago
| | * QTemporaryFileEngine now tracks if a fileName has been generatedJoão Abecasis2009-05-221-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With recent changes to QTemporaryFile, allowing the file to be closed, the engine has to keep track of whether a fileName has already been generated, so we don't generate new files after the first one. If the file is closed but we already have a name for it, then just forward the call to the base file engine. Reviewed-by: Thiago
| | * QTemporaryFile: there's no need to keep another pointer to the engine hereJoão Abecasis2009-05-221-4/+1
| | | | | | | | | | | | | | | | | | Lifetime of the engine is already handled by the native engine. Reviewed-by: Thiago
| | * QTemporaryFile: really (re)open file if it has been really closed...João Abecasis2009-05-221-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some circumstances, the file descriptor in QTemporaryFile is actually closed and setOpenMode alone won't give us reOpen semantics. Added function to QTemporaryFileEngine that checks if we have open file handles. On open, if we currently hold no handles, re-open the file. Trying to open a new file while we hold open handles would lead to leaks, so added an assert there, to be on the safe side. Reviewed-by: Thiago
| | * Unconditionally open temporary files in ReadWrite modeJoão Abecasis2009-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although QTemporaryFile hides QFile::open(OpenMode), this function is still available when accessing instance methods through the base class. Unconditionally setting ReadWrite allows the temporary file to be re-opened with different flags. Task-number: 248223 Reviewed-by: Thiago
| | * QTemporaryFile: handle failures from QFSFileEngine::open(mode, fd)João Abecasis2009-05-221-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | For now, this only happens if Append mode is requested and we're unable to seek to the end of the file. Theoretically, this could change in the future so it's better to err on the safe side. Reviewed-by: Thiago
| | * Documentation fixJoão Abecasis2009-05-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | We souldn't be returning an empty string for the fileName, just because the file is closed. E.g., after a rename, the file will be closed, but should still have a name. Reviewed-by: Thiago
| | * QTemporaryFile would forget fileName while file was "closed"João Abecasis2009-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | | Note: this showed even if the file descriptor was kept open. Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| | * QTemporaryFile: don't clear filePath if remove failsJoão Abecasis2009-05-221-3/+5
| | | | | | | | | | | | | | | | | | Reviewed-by: MariusSO Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| | * QFile::rename fallback: reset permissions and error state on successJoão Abecasis2009-05-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fallback implementation for rename operation should try to copy permissions from the original file to the destination file. Note that failures at this point are not treated as errors. Errors previously set by the native fileEngine are also reset before returning. Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| | * QFile::copy: close source file when using fallback mechanismJoão Abecasis2009-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | Also added check in test case for rename fallback. Task-number: 165920 Reviewed-by: Thiago
| | * Allow renaming QTemporaryFiles on windowsJoão Abecasis2009-05-221-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the fallback implementation to use 'this' instead of a new QFile. This allows a QTemporaryFile to be block-copied to the destination and the source to be removed (QTemporaryFile is special because it isn't really closed). Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| | * Don't block copy sequential files in QFile::renameJoão Abecasis2009-05-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block copying a sequential file is potentially a destructive operation, because there is no guarantee copy+remove will succeed. In these cases the fallback should not be tried. The user is better equipped to decide how to handle such failures and to ensure no data losses occur, e.g., copy without removing the original file. Reviewed-by: MariusSO Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| * | qdoc: Moved some qdoc comments into the .cpp file common to all packages.Martin Smith2009-05-222-83/+113
| | | | | | | | | | | | Task-number: 252494
* | | Reorganise the pipe creation code.Thiago Macieira2009-05-221-10/+8
| | | | | | | | | | | | | | | | | | Put all pipe creation calls together. Reviewed-by: Oswald Buddenhagen
* | | Remove IRIX code.Thiago Macieira2009-05-221-7/+0
| | | | | | | | | | | | | | | | | | | | | IRIX is no longer supported, so I won't bother fixing this part of the code. Reviewed-by: Oswald Buddenhagen
* | | Fix compilation on Solaris for animation API.Alexis Menard2009-05-221-1/+1
| | | | | | | | | | | | Reviewed-by: thierry
* | | make sure signal transition is correctly unregistered/re-registeredKent Hansen2009-05-222-14/+18
| | | | | | | | | | | | | | | | | | When the signal or senderObject is changed while the state is active, the transition needs to be unregistered _before_ either property is changed, only _then_ can it be re-registered.
* | | make sure event transition is correctly unregistered/re-registeredKent Hansen2009-05-222-14/+18
| | | | | | | | | | | | | | | | | | When the eventType or eventObject is changed while the state is active, the transition needs to be unregistered _before_ either property is changed, only _then_ can it be re-registered.
* | | Make the default size of QMutexPool a prime numberBradley T. Hughes2009-05-222-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | As pointed out by Olivier, this should allow for better distribution in the array. I also removed the unnecessary count member, since we can use QVarLengthArray.count() instead.
* | | Merge branch '4.5'Thiago Macieira2009-05-221-16/+7
|\ \ \ | | |/ | |/|
| * | Don't loop around sigaction because it can't return EINTR.Thiago Macieira2009-05-221-16/+7
| | | | | | | | | | | | | | | | | | Asked by Oswald. Reviewed-by: Oswald Buddenhagen
* | | Reintroduce the unaligned-unaligned 32-bit code that I had removed out of ↵Thiago Macieira2009-05-221-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ignorance. If both pointers are out of 4-byte alignment, doing the first load will align them so we can do 32-bit comparisons. Lars's code had this before, but I misunderstood it and removed, thinking it was doing misaligned accesses. I experimented with moving the tail comparison above the 32-bit comparison to save a register, but it made things worse. Reviewed-By: Bradley T. Hughes
* | | Optimise QString comparison based on the results from the benchmarkThiago Macieira2009-05-221-125/+38
| | | | | | | | | | | | Reviewed-By: Bradley T. Hughes
* | | Don't use memcmp it's terribly slow.Lars Knoll2009-05-221-6/+146
| | | | | | | | | | | | | | | | | | | | | Added qMemEquals method that returns true if the two memory regions contain the same content. Reviewed-By: Thiago Macieira
* | | Say hello to animation API & state machine APIKent Hansen2009-05-2257-58/+11482
| | |
* | | Update the QMutexPool API to be more like QMutexBradley T. Hughes2009-05-222-9/+9
| | | | | | | | | | | | | | | If we ever decide to make this class public, the interfaces should be similar.
* | | Mark data as static, use fetch-and-store instead of test-and-setBradley T. Hughes2009-05-221-4/+3
| | | | | | | | | | | | | | | | | | Mark the objectCount and mutex-pool as static as they won't ever be externed. Use fetch-and-store zero instead of test-and-set from current value to zero.
* | | Merge commit 'origin/4.5'Samuel Rødal2009-05-201-4/+1
|\ \ \ | |/ /
| * | Fix a compile error on MSVC 64bits due to qhash casting a pointer.Thierry Bastian2009-05-201-4/+1
| |/ | | | | | | | | | | | | I tested it with 32 bits compilation and there is no warning any more. Task-number: 247325 Reviewed-by: ogoffart
* | Remove QDumper. It was used in a previous version of creator but is nowThierry Bastian2009-05-202-1158/+0
| | | | | | | | useless.
* | allow to debug QVariant of float typeThierry Bastian2009-05-201-1/+4
| | | | | | | | Reviewed-by: ogoffart
* | Use a per object lock for signal/slotsOlivier Goffart2009-05-201-22/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That way we prevent the current possible race condition that may appears while touching signals slot while object are moved to different threads. For exemple, when we do sender->threadData->mutex->lock(); the sender can possibly be moved to another thread between the moment we get the pointer to the threadData and the moment we aquire the lock. We could check if we locked the right mutex and retry otherwise, but that would break if the threadData (and hence the mutex) get destroyed in between. The per object mutex is implemented with a thread pool. I'm not using the global QThreadPool because we might ends up locking two of their mutex, and that would be dangerous if something else holds a lock on the same mutex (possible deadlock) Putting the mutex pool in a Q_GLOBAL_STATIC doesn't work as it might result of the ppol being deleted before some other object in others Q_GLOBAL_STATIC structures There is no need to lock this mutex in moveToThread as this is safe. When emiting a signal, we do not need to lock the thread data, as the user must ensure that the object is not moved to a thread while emiting a AutoConnection signal. Reviewed-by: Brad
* | Merge branch '4.5' of ../qt-45-documentationDavid Boddie2009-05-201-3/+4
|\ \ | |/
| * Optimize QIoDevice::readAll() to possibly do less (re)allocationsMarkus Goetz2009-05-201-3/+4
| | | | | | | | | | | | Reviewed-by: Olivier Goffart Reviewed-by: Peter Hartmann Reviewed-by: João Abecasis
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-05-1912-20/+33
|\ \ | |/
| * Fix stopping link loops in QDirIterator on WindowsEskil Abrahamsen Blomfeldt2009-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | currentFileInfo is only used for returning from the public functions since the file info used in the algorithm is one step ahead. nextFileInfo is the one actually used in the algorithm. The bug was introduced in a compile fix for Windows and broke the stopLinkLoop test for QDirIterator. Reviewed-by: Olivier
| * Clarifying what QLocale::C is and is notNils Christian Roscher-Nielsen2009-05-191-2/+2
| | | | | | | | Reviewed-by: David Boddie
| * Clearifying QUrl docsMorten Engvoldsen2009-05-191-0/+6
| | | | | | | | | | | | | | | | Adding more details on QUrl::addQueryItem() Task-number: 234125 Rev-by: Thiago Macieira
| * Fix compiler warning: use C++ cast operator, not the old-style C cast.Ariya Hidayat2009-05-191-1/+1
| | | | | | | | Reviewed-by: Marius Storm-Olsen
| * Added doc about QSharedMemory and other applicationsMarkus Goetz2009-05-181-0/+4
| | | | | | | | | | Task-number: 253835 Reviewed-by: David Boddie
| * Replace all occurences of "heirarchy" with "hierarchy"Andre Haupt2009-05-181-1/+1
| | | | | | | | | | Signed-off-by: Andre Haupt <andre@bitwigglers.org> Reviewed-By: Thiago Macieira