| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
But I'm told 5.10 does.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
See ba191b0a26b966ad1fb596a905307399922bc44a for a similar commit done
to QStringMatcher.
Reviewed-By: Bradley T. Hughes
|
| | |
|
| |
| |
| |
| | |
Need the right include for the mach_*() functions.
|
| |
| |
| |
| |
| |
| | |
Mac OS X only change
Reviewed-by: Thiago
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| | |
I don't know exactly why this is needed, but otherwise GCC complains
that there is no default constructor.
|
| |
| |
| |
| |
| | |
Don't use old-style casts in Qt code. And avoid signed/unsigned
comparisons (sizeof returns size_t, which is unsigned).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| | |
structure in QSharedPointer""
This restores the original implementation of the creating
function. The next commit will make it suitable for use.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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!
|
| |
| |
| |
| | |
Also rephrase some sentences.
|
| |
| |
| |
| |
| |
| |
| | |
It appears that uint != UInt32 in 32-bit world, don't ask why. Correct
the typedef.
Reviewed-by: Carlos Duclos
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
anything that included qobject.h
Reviewed-by: Thomas Hartmann
|
| | |
| | |
| | |
| | |
| | |
| | | |
I made the functions inline instead and moved them to qobject_p.h
Reviewed-by: Aaron Kennedy
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
kinetic-declarativeui
Conflicts:
configure
configure.exe
src/gui/kernel/qaction.h
|
| | |
| | |
| | |
| | | |
Reviewed-by: Sarah Smith
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | | |
Reviewed-by: Simon Hausmann
Reviewed-by: Frans Englich
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Name filters and resulting regular expressions are stable, no need to
regenerate the latter on each iteration.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'*' 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
|
| | |
| | |
| | |
| | |
| | |
| | | |
Moving member data around and marking immutable data as such.
Reviewed-by: Marius Storm-Olsen
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If nothing else changes, there's no point to keep trying. Let a broken
QDirIterator be broken.
Reviewed-by: Marius Storm-Olsen
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Well, why not?
Resetting nextFileInfo when we're done allows removing unnecessary check
in QDirIterator::next(), while retaining behavior.
Reviewed-by: Marius Storm-Olsen
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Return value for checkAndPushDirectory is no longer used, we can just
throw it out.
Reviewed-by: Marius Storm-Olsen
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|