| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Also removed tabs from auto.pro
Reviewed-by: trustme
|
|
|
|
|
|
|
|
| |
I don't want to link the tst_qsharedpointer test to QtGui, so I
created a new test.
This is testing only the basic manipulations. In special, it's not
testing invalid constructs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the previous commit, you could create a QWeakPointer from any
QObject-derived object. It's possible because QObject now has a
pointer to the QWeakPointer's d-pointer.
However, if you did:
QSharedPointer<QObject> obj(new QObject);
QWeakPointer<QObject> weak1(obj);
QWeakPointer<QObject> weak2(obj.data());
Then weak1 would shared d-pointers with QSharedPointer, but weak2
wouldn't. Also, weak1.toStrongRef() would work, but
weak2.toStrongRef() wouldn't.
This change makes QObject know where the d-pointer created by
QSharedPointer is, so weak2 would get the same d-pointer.
As a nice side-effect, you can check if a given QObject is shared by
trying to promote its QWeakPointer to QSharedPointer.
Reviewed-by: Bradley T. Hughes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem with QPointer is that it's a simple QObject*. So the only
way for QPointer to do what it's supposed to do is if the object it's
pointing to clears all QPointers when getting deleted. That means the
QObject must know each and every QPointer pointing to it. To make
matters worse, QPointers can be deleted while the object they're
pointing to also gets deleted. So deleting QObjects must do locking.
The solution to the QPointer problem is that both QObject and the
"QPointer" reference something outside the QObject. This way,
QObject doesn't have to lock anything to destroy itself: it's simply
setting a volatile integer to zero when it gets deleted. Since the
integer is outside the QObject, the integer is also refcounted. It's also
O(1), so there's no problem having as many "QPointer".
The two-atomic-ints structure is exactly what QSharedPointer and
QWeakPointer use internally. We just abuse this structure for QObject
needs, setting the strong reference count to -1 to indicate that it's
a QObject that cannot be managed by a QSharedPointer. But QWeakPointer
can still work and replace QPointer neatly.
Reviewed-by: Bradley T. Hughes
Reviewed-by: Jarek Kobus
|
|
|
|
|
|
| |
QPlainText edit does lazy line wrapping only for the visible blocks.
Resizing the editor in the auto test thus has to make it wide enough
that at least some characters are visible for the block to be laid out.
|
|
|
|
|
|
|
| |
If you only set the position, of the button without setting a geometry,
it did not work.
Task-number: 259226
|
|
|
|
|
|
|
|
|
|
| |
The commit 31edb4d5a63b9b3c28cce1c4ca6eb99f62a09759 introduced
regressions in filters which breaks the mac native dialog, the non
native dialog with HideNameFilterDetails activated.
Task-number:259105
Reviewed-by:olivier
Reviewed-by:prasanth
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/gui/graphicsview/qgraphicsitem.cpp
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
updateAncestorFlags was not reseting the flags if you change the parent
that have for instance itemsClipChildrenToShape to a new one that
doesn't have that flag.
Task-number:258956
Reviewed-by:bnilsen
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the item lost focus to an unrelated dialog.
The tests against the active modal window was unnecessary.
Task-number: 257859
Reviewed-by: olivier
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch allows for input hints to be set on a QGraphicsItem.
Input methods use such hints to define its appearance/behavior
(e.g. to allow for numerical input only).
Reviewed-by: ahanssen
Task-number: 254493
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If you resumed a parallel animation group, it would always restart
(ie. stop and start) the animation which would reset its current time
to 0 and trigger flickering.
autotest included.
Task-Number: 259102
|
| |
| |
| |
| |
| |
| |
| | |
The action now try to take advantage of the space given by a minimum
width. Patch proposed initially by Aron Seigo and improved later on.
Reviewed-by: Trustme
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After resetting the model, the selectionModel::hasSelection()
of the view should return false.
Fixed the corresponding autotest, which was wrong.
Task-number: 256502
Reviewed-by: thierry
|
| |
| |
| |
| |
| |
| |
| |
| | |
Menu paintEvent was not called when the mouse cursor lied
between the menu item area and the menu frame border.
Task-number: 258920
Reviewed-by: olivier
|
| |
| |
| |
| |
| |
| | |
Also add some thread stress tests to try and detect doing it wrong.
Reviewed-By: Bradley T. Hughes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, if you create a QSharedPointer in code with
pointer-tracking, you must ensure it gets deleted in code with
pointer-tracking, otherwise the internal safety tracker will be
"leaking" objects. The pointers would never get removed.
And if any new pointer happened to have the same pointer address
(which happens quite often), the tracker code would promptly abort the
application.
With this change, the untracking of the pointer is scheduled by the
same code that creates the tracking. This is done by "abusing" the
custom deleter code:
- for the QSharedPointer that used ExternalRefCountWithDestroyFn
already, we intercept the call to the destroy function and call the
untracking function
- for a normal QSharedPointer, we use the "normalDeleter" function as
custom deleter and chain up above
Note: the autotest only *really* works in release mode. Otherwise
functions don't get inlined and do get merged by the linker.
Reviewed-By: Bradley T. Hughes
|
| |
| |
| |
| |
| |
| | |
Destructors have to be run for the subobjects we initialise.
Reviewed-By: Bradley T. Hughes
|
| |
| |
| |
| |
| |
| |
| | |
That way, this code can be compiled with an earlier version of Qt and
should still work in new ones.
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| | |
In the future, it would be nice to split the autotest in multiple
functions at every check().
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/corelib/tools/qsharedpointer.cpp
src/corelib/tools/qsharedpointer_impl.h
src/gui/dialogs/qcolordialog.cpp
src/gui/painting/qwindowsurface_raster.cpp
src/network/access/qnetworkaccessmanager.cpp
tests/auto/qsharedpointer/externaltests.cpp
|
| |
| |
| |
| |
| |
| |
| | |
The functionality these tests tested was broken in 4.5 and has been
disabled. Therefore, these tests simply cannot pass.
It's fixed in 4.6.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
If the user forgot to end their headers with a newline, the
compilation would fail because the next line is #include
<QtCore/QtCore>.
Reviewed-by: Jesper Thomschütz
|
| |
| |
| |
| |
| |
| |
| | |
This test depends on some low-level features of the CPU and the OS
scheduler which seem impractical to automatically verify
independently of the test. So turn it off to stop its intermittent
failures in our test farm.
|
| |
| |
| |
| | |
Test needs a placeholder file to make sure its build directory exists.
|
| |
| |
| |
| | |
os9-newlines.h's lack of newline at end of file is significant.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Make test use network-settings.h correctly.
|
| |
| |
| |
| | |
Make the test use network-settings.h correctly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This test tried to be unaffected by the locale environment variables
set by the user by explicitly overwriting them and spawning a new
process. However this was only done for LANG and not the other
variables which can affect the locale. Do it for all the locale
variables.
Also, the previous approach (store the current value with qgetenv, then
put it back with qputenv later) doesn't really work because that
effectively takes variables which weren't set and sets them to an empty
string, which is not the same thing. Use QProcess::setEnvironment
instead.
Reviewed-by: Andy Shaw
|
| |
| |
| |
| |
| |
| | |
No wonder QT_SHAREDPOINTER_TRACK_POINTERS was having no effect:
there was an #include <QtCore/QtCore> before it.
(cherry picked from commit 4c12010fac555bce0a6c8d69a267a56f4c15087f)
|
| |
| |
| |
| |
| |
| |
| | |
The constructors that take a list of target states produce
hard-to-read code, and they're rarely useful in practice since
99% of transitions take a single target state; so it's better
to enforce that setTarget{State,States}() be used instead.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
minimum size"
This reverts commit 244f5ee9c2c34ddee200e4d5cdc1345762a5901b.
Valgrind complains about the label fields that are not inisialized yet,
and indeed. They are initialized right after, and need the maxLabelWidth
to be computed. This is a chicken and egg problem difficult to solve, so
I rather revert the change as the bug is not critical
|
| |
| |
| |
| | |
Needed for Declarative UI integration.
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
test wouldn't finish.
Running under valgrind and slow operating systems, the transfer rate is
only a couple of MB per second. As long as you can reach 3.2 MB/s now,
it should still work
Also, don't kill the thread, for any reason. That causes trouble.
Reviewed-by: Markus Goetz
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The delete reply; was introduced by a conflicted merge in the VxWorks
port. It should not have appeared.
But take this opportunity to convert the two other uses of
QNetworkReply* without lifetime management to QSharedPointer too.
Reviewed-by: Markus Goetz
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Autotest: included
Merge-request: 378
Reviewed-by: Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>
|
| | |
| | |
| | |
| | | |
Reviewed-by: kh
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
regression introduced in e43eae35 because the code of maybeParseFunction
and parseFunction is not exactly the same.
Reviewed-by: Kent Hansen
|
| | |
| | |
| | |
| | | |
Reviewed-by: Andreas
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This method is necessary for QML to support Qt interfaces, but probably
shouldn't be used otherwise.
Reviewed-by: Roberto Raggi
|