summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ../qt into kinetic-declarativeuiAaron Kennedy2009-07-2926-244/+1008
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem.h src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp src/gui/widgets/qlineedit.cpp
| * Implement a new pointer-tracking mechanism for QSharedPointer.Thiago Macieira2009-07-282-41/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some compilers don't obey the same rules of "top-of-object" values for casting a pointer from a given class to void *. In any case, that can only work for polymorphic types (with a virtual table). So don't track the pointers by their pointer value, but instead by the d-pointer of the QSharedPointer object. The same cases that were caught before should still be caught. We still won't catch the creating a second QSharedPointer for the same object if the pointer values are different, though (when cast to void*). Reviewed-by: Bradley T. Hughes
| * Fix startDetached: the pipes must be CLOEXEC for them to work.Thiago Macieira2009-07-281-2/+2
| | | | | | | | | | | | | | | | | | In de05f9a40e41deb79daf5c4935b2645d70d7f322 I removed the fcntl that set FD_CLOEXEC because it was supposed to be set by qt_safe_pipe. Turns out that this code didn't call the wrapper function... Reviewed-by: ossi
| * Work around weird issue with Sun CC 5.9: Self was the wrong class.Thiago Macieira2009-07-281-2/+2
| | | | | | | | | | | | I don't know if this was only the debugging symbols or if the compiler was really wrong. But while debugging, Self was ExternalRefCountWithCustomDeleter, which is wrong at this point.
| * Sun CC 5.9 does not support template friendsThiago Macieira2009-07-281-0/+3
| | | | | | | | But I'm told 5.10 does.
| * Work around a Sun CC 5.9 compiler bug: the threadEngine variable isn't found.Thiago Macieira2009-07-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtConcurrent had the following code: template <typename T> class ThreadEngineStarterBase { ... protected: ThreadEngine<T> *threadEngine; }; template <typename T> class ThreadEngineStarter : public ThreadEngineStarterBase<T> { public: ThreadEngineStarter(ThreadEngine<T> *threadEngine) :ThreadEngineStarterBase<T>(threadEngine) {} [...] }; The Sun CC compiler simply didn't parse the parameter declaration in the constructor. Instead of complaining, it silently ignored the problem. Which meant that the constructor simply used the uninitialised member variable from the base class to call the parent constructor, which ended up initialised with itself. You'd think that it's just because the parameter has the same name as a member variable. But it appears to be a compiler bug altogether. If you change the name, then you start getting compile errors. This change is a workaround that worked. Reviewed-By: Bradley T. Hughes
| * Sun CC 5.9 still doesn't support Template-Template ParametersThiago Macieira2009-07-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | I had added the version check when we only had CC 5.5 and 5.6, expecting that 5.7 would have the support. And if it didn't, then someone would notice the compile error in QtConcurrent, bumping the version number here. Except that QtConcurrent was never enabled with Sun CC. Which meant that we never got to test TTP support. Reviewed-By: Bradley T. Hughes
| * Fix warning with Sun CC 5.9 and xlC 7: no new types inside anonymous unions.Thiago Macieira2009-07-271-5/+6
| | | | | | | | | | | | | | See ba191b0a26b966ad1fb596a905307399922bc44a for a similar commit done to QStringMatcher. Reviewed-By: Bradley T. Hughes
| * Compile on Mac OS XBradley T. Hughes2009-07-271-1/+1
| |
| * Compile on Mac OS XBradley T. Hughes2009-07-272-4/+4
| | | | | | | | Need the right include for the mach_*() functions.
| * Avoid floating point code when converting Mach time to timevalBradley T. Hughes2009-07-271-2/+2
| | | | | | | | | | | | Mac OS X only change Reviewed-by: Thiago
| * Refactor monotonic time code to avoid duplication.Bradley T. Hughes2009-07-274-114/+60
| | | | | | | | | | | | | | | | | | Merge the monotonic clock source detection in qeventdispatcher_unix.cpp with that in qcore_unix.cpp. As discussed with Thiago, we're also removing older compat code at the same time (spinning on select() when we think it woke up early). Reviewed-by: Thiago
| * Doc: Replace links to obsolete APIs.Volker Hilsheimer2009-07-253-8/+10
| |
| * Fix compilation with older GCC versions: need a constructor.Thiago Macieira2009-07-251-0/+5
| | | | | | | | | | I don't know exactly why this is needed, but otherwise GCC complains that there is no default constructor.
| * Fix warnings when compiling Qt (tst_warnings).Thiago Macieira2009-07-251-2/+2
| | | | | | | | | | Don't use old-style casts in Qt code. And avoid signed/unsigned comparisons (sizeof returns size_t, which is unsigned).
| * Adapt the contiguous-creator code to use the new custom deleter code.Thiago Macieira2009-07-241-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | We use the same trick as the custom deleter: we allocate memory for an object of class ExternalRefCountWithContiguousData<T>, but we do that only to be certain of the alignment requirements for T. We initialise the d-pointer via placement new and the T object is left for initialisation by the outermost function. The reason for that last trick is to support passing parameters in the future with the least amount of template functions necessary. I still plan on supporting arguments only with C++0x (maybe up to one without).
| * Revert "Revert "Add support for creating the object alongside the Data ↵Thiago Macieira2009-07-241-0/+47
| | | | | | | | | | | | | | structure in QSharedPointer"" This restores the original implementation of the creating function. The next commit will make it suitable for use.
| * Remove the old specialised deleter implementation from QSharedPointer.Thiago Macieira2009-07-241-12/+0
| | | | | | | | | | | | | | | | | | | | This should be binary- and source-compatible, since these QSharedPointer internal classes aren't exported. The compiler should generate the symbols in all libraries and applications that used it, which means removing it from Qt won't affect them. (In fact, these symbols shouldn't be in QtCore at all, since we don't use QSharedPointer in it)
| * Implement a new custom deleter implementation for QSharedPointerThiago Macieira2009-07-241-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a template class derived from QtSharedPointer::ExternalRefCountData, use a non-template class that has a function pointer. This avoids generating a virtual table for each QSharedPointer type and custom deleter. The trick here is that we don't "new" the d pointer anymore, but we simply allocate memory (via ::operator new, so it may throw an exception), then we use the placement new to initialise the non-template d-pointer and the template deleter sub-objects. Then we store the pointer to a regular function which will execute the user's custom deleter. I also added operator delete() to the class to make sure no smarty compiler decides to delete the d-pointer with a fixed size (I don't think that happens, but just to be on the safe side).
| * fix minor issue introduced in 6ca14dcRitt Konstantin2009-07-241-8/+4
| | | | | | | | | | | | | | | | GetFileAttributes call can fire at least one more error - ERROR_NOT_READY (21) since now the fallback code will be executed for basic cases only Merge-request: 984 Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
| * qdoc: Fixed all references to obsolete QHttp classes.Martin Smith2009-07-241-6/+11
| |
| * Remove all the last vestiges of QuickDraw in Qt/Mac.Norwegian Rock Cat2009-07-241-4/+0
| | | | | | | | | | | | | | Panther was the last reason for having this around. We don't touch this code anywhere else in Qt. As a result it's orphaned and can be safely removed. It truly is the end of an era, but it's definitely worth celebrating. Quartz4Life!
| * Document my new backend.Norwegian Rock Cat2009-07-241-3/+5
| | | | | | | | Also rephrase some sentences.
| * Compile.Norwegian Rock Cat2009-07-241-1/+1
| | | | | | | | | | | | | | It appears that uint != UInt32 in 32-bit world, don't ask why. Correct the typedef. Reviewed-by: Carlos Duclos
| * Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtPeter Yard2009-07-2434-672/+1355
| |\
| | * Implement an FSEvents-based QFileSystemWatcherEngineNorwegian Rock Cat2009-07-234-2/+607
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been around for a while and really should have been put in earlier. Mac OS X (client) has a much lower ulimit for open files than what some other Unix-like OS's have (in defense it does save memory). However, if you start watching a lot of files, it will start to fall down. You can adjust the ulimit, but it's a bit inconvenient. FSEvents watches the directory and notifies you of changes that happen in that directory (and below, but we don't really use it). It also can be adjusted for latency so that performance isn't affected by heavy file system use (but Qt doesn't use that either at the moment). The other thing is that it doesn't require any open files, so it's much better for our number of open files. This feature is only on Leopard and up, so people wanting to deploy Tiger will still have the "open files" problem to deal with. There are still some optimizations available in this code. For example, we could coalesce things down to watch only one high-level directory without changing much of the implementation. The current implementation has some very simplistic ways of handling things, but this simplicity works well. I documented it, so you can see that, yes, I really meant to do that. Task-Id: 164068 (and others) Reviewed-by: Denis
| | * Fix time change detection on UNIX systems without monotonic timersBradley T. Hughes2009-07-232-42/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few fixes in one: 1. Don't loop on select() when not using monotonic timers... when select returns, the time may have changed, and the offset calculated in the loop may be very wrong on the next iteration. 2. Calculate the elapsed time deltas using timevals instead of integers using milliseconds. This handles changing the time by more than a few hours or days (i.e. months and years) without overflow. 3. When repairing the timers, the diff is already the correct sign, so we should just add the diff. Task-number: 250681 Reviewed-by: Thiago
| | * Fix two errors of QDirIteratorPrivate::matchesFilters()Benjamin Poulain2009-07-231-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The filter for includeSystem was exectuted twice. The second time was not correct according to d9a620633d0a5fa5e69ab06ec9a706118f3df2a6 (QFileInfo::exists() can return false for system file). For skipDirs, a parenthesis was missing in the test of includeHidden and includeSystem. This was introduced in the refactoring of 44766d265c16551043d2739171069fe042c40091 Reviewed-by: João Abecasis
| | * Omit monotonic timer detection/conditional code on Mac OS XBradley T. Hughes2009-07-232-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | Now that we have a monotonic time source on the Mac, we don't need to compile in the code to detect wall-time changes and do timer adjustments. Reviewed-by: nrc
| | * make statemachine compile with QT_NO_PROPERTIESKent Hansen2009-07-234-0/+22
| | |
| * | #159306 QAbstractItemModel::reset Doc changePeter Yard2009-07-241-1/+2
| | |
* | | qguard_p.h is in private directory.Martin Jones2009-07-281-1/+1
| | |
* | | Fixed missing forward declarations, which made gcc fail to compileErik Verbruggen2009-07-271-0/+2
| | | | | | | | | | | | | | | | | | anything that included qobject.h Reviewed-by: Thomas Hartmann
* | | removing Q_CORE_EXPORT for q_guard_addGuard() and q_guard_removeGuard()Thomas Hartmann2009-07-274-30/+25
| | | | | | | | | | | | | | | | | | I made the functions inline instead and moved them to qobject_p.h Reviewed-by: Aaron Kennedy
* | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Aaron Kennedy2009-07-2358-1153/+1957
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | kinetic-declarativeui Conflicts: configure configure.exe src/gui/kernel/qaction.h
| * | Add the math3d types to QVariantRhys Weatherley2009-07-234-3/+45
| | | | | | | | | | | | Reviewed-by: Sarah Smith
| * | CompileAnders Bakken2009-07-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The dummy implementaion of QReadWriteLock wasn't source compatible with the real implementation and this lead to compilation errors in qabstractfileengine.cpp which now has a global static QReadWriteLock that takes a Recursive argument. Reviewed-by: Noam Rosenthal <noam.rosenthal@nokia.com>
| * | Fix potential deadlock in QAbstractFileEngineJoão Abecasis2009-07-221-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a possibility for deadlocking with user code in QAbstractFileEngine. Changing the QMutex there to a QReadWriteLock should reduce the possibilities for this happening. Also reduced the scope of the lock in QAbstractFileEngine. Reviewed-by: Thiago Macieira
| * | Make QStateMachine inherit QStateKent Hansen2009-07-225-222/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for a "root state" in the machine; or rather, the machine _is_ the root state. User code can now pass in a QStateMachine directly to the QState constructor, instead of machine->rootState(). This also means we could get rid of the "proxying" from the machine to the root state for things like properties (initialState et al), finished() signal and auto-reparenting of states (the ChildAdded event hack). A fun little side-effect of this change is that it's now possible to embed state machines within state machines. We can't think of a good use case yet where you would rather embed a stand-alone state machine (with its own event processing etc.) rather than having just a regular nested state, but it's neat and it works. Reviewed-by: Eskil Abrahamsen Blomfeldt
| * | Prefer mutable over const_cast.João Abecasis2009-07-222-5/+4
| | | | | | | | | | | | | | | Reviewed-by: Simon Hausmann Reviewed-by: Frans Englich
| * | Bugfix/optimization in QResourceFileEngineIteratorJoão Abecasis2009-07-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | If the resource is valid, children should not be empty. If it happens to be, hasNext() should then return false. Setting the index to 0 ensures this and also that we don't keep trying the same thing over and over. Reviewed-by: Olivier Goffart
| * | Off-by-one error in QResourceFileEngineIteratorJoão Abecasis2009-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This was making the resource iterator return empty entries after listing resources. This showed up after QDirIterator stopped filtering empty entries. Reviewed-by: Olivier Goffart
| * | Don't hide errors in QDirIteratorJoão Abecasis2009-07-221-4/+1
| | | | | | | | | | | | | | | | | | | | | Empty filenames should only show up from bugs in file engine iterators's hasNext() function. We shouldn't try to hide those here. Reviewed-by: Olivier Goffart
| * | QDirIterator refactoringJoão Abecasis2009-07-221-5/+18
| | | | | | | | | | | | | | | | | | | | | Name filters and resulting regular expressions are stable, no need to regenerate the latter on each iteration. Reviewed-by: Olivier Goffart
| * | QDirIterator refactoringJoão Abecasis2009-07-221-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | '*' is functionally the same as having no name filters. Equating the equivalence in the constructor avoids repeated checks in the advance "loop". Reviewed-by: Olivier Goffart
| * | QDirIterator refactoringJoão Abecasis2009-07-221-13/+16
| | | | | | | | | | | | | | | | | | Moving member data around and marking immutable data as such. Reviewed-by: Marius Storm-Olsen
| * | QDirIterator: fail early, fail oftenJoão Abecasis2009-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | If nothing else changes, there's no point to keep trying. Let a broken QDirIterator be broken. Reviewed-by: Marius Storm-Olsen
| * | QDirIterator: Cleaning up after one's selfJoão Abecasis2009-07-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Well, why not? Resetting nextFileInfo when we're done allows removing unnecessary check in QDirIterator::next(), while retaining behavior. Reviewed-by: Marius Storm-Olsen
| * | QDirIterator cleanup after refactoringJoão Abecasis2009-07-221-9/+8
| | | | | | | | | | | | | | | | | | | | | Return value for checkAndPushDirectory is no longer used, we can just throw it out. Reviewed-by: Marius Storm-Olsen
| * | QDirIterator refactoringJoão Abecasis2009-07-221-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the heavy lifting has been done, we can condense QDirIteratorPrivate::advance() further. It almost looks nice, even! Using fileEngineIterators.top() directly in the loop condition allows us to manipulate the stack without the foundDirectory check. Since QStack can be inlined, this shouldn't severely affect performance... Reviewed-by: Marius Storm-Olsen