| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed-by: Trust Me
|
|\ |
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch basically avoid to call too often currentFileInfo in
QDirIterator. It replaces the QHash that was overkill in QFileInfo for
caching filenames. The last part is reordering the matchesFilter
to avoid stat as much as possible by using the power of && and filters
that are set on QDirIterator. And it fixes some random "mistake".
I have added a benchmark in QDir which test some use case with
10000 files in a dir.
Written-with: Benjamin
Reviewed-by: phartman
|
| |
| |
| |
| | |
Reviewed-by:TrustMe
|
| | |
|
| | |
|
| |
| |
| |
| | |
undefined.
|
| |
| |
| |
| |
| |
| |
| | |
operator+() easier.
This adds a few explicit QString(...) casts around operator+()
based expressions to make them acceptable for QCOMPARE.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QString objects from smaller chunks.
The QStringBuilder class:
QStringBuilder uses expression templates (using the '%' operator)
to postpone any actual concatenation until it is assigned to an
actual QString. At that time it knows the exact sizes of all chunks,
can compute the required space, allocates once a QString of
appriopriate size and then copies over the chunk data one-by-one.
In addition, QLatin1Literal is a drop-in replacement for QLatin1String
(which we can't change for compatibility reasons) that knows its
size, therefore saving a few cycles when computing the size of the
resulting string.
Some further saved cycles stem from inlining and reduced reference
counting logic (the QString created from a QStringBuilder has typically
ref count equal to 1, while QString::append() needs an extra test)
Minor changes to the existing QString class:
- Introduce QString constructor to create an uninitialized QString of a given size.
This particular constructor is used by QStringBuilder class.
- Introduce a QT_USE_FAST_CONCATENATION macro to disable the existing
overloads of operator+() and helps finding the places where they are used in code.
- Introduce QT_USE_FAST_OPERATOR_PLUS. This also disables the existing
overloads of operator+() and creates a new templated operator+() with
identical implementation of operator%(). This allows code that is compilable
QT_CAST_{TO,FROM}_ASCII to use QStringBuilder almost transparently. The only
case that is not covered is creating objects like QUrl that are implicitly
constructible from a QString from a QStringBuilder result. This needs to be
converted explicitly to a QString first, e.g. by using QUrl
url(QString(QLatin1String("http://") + hostName));
Reviewed-by: MariusSO
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When we have already a pixmap of an item in the cache, we should
remove the entry from the cache otherwise when we will repaint/modify
the copy of the pixmap (the copy of the cache) then we will trigger a
deep copy ; this is because both entries in the cache and our copy
share the same data and if you modify one of them a copy is triggered.
I have added a benchmark as well to test that.
Reviewed-by:bnilsen
Reviewed-by:andreas
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
Reviewed-By: Bradley T. Hughes
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With the new properties it is possible to easily animate.
Setting a transform using setTransform is incompatible with thoses
properties. Accessing thoses propeties if you set previously a
transform will give you the default values.
Acknowledged-by: Code made with Andreas. Documentation written with Thierry.
This still need a more in depth code review and documentation review.
But it is urgent to commit now because the Animation API integration depends on it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit add a new API to add/find/remove pixmaps into QPixmapCache.
This new extension is based on a key that the cache give you during
the insertion. This key is internally a int which makes all operations
in the cache much more faster that the string approach.
Auto-tests has been extended as well and a benchmark has been added to
compare both approach. I also depecrate the find method for the
string API to have a method pointer based and not reference based like
the Qt policy says.
Reviewed-by: bnilsen
Reviewed-by: andreas
Followed-deeply-by: trond
|
| |
| |
| |
| |
| |
| |
| |
| | |
This commit add an benchmark to allow testing performance with cache
enable or not. It covers different use cases with item rotating, moving
and so on.
Reviewed-by:bnilsen
|
|\ \
| |/
| |
| |
| | |
Conflicts:
tests/auto/qpainterpath/tst_qpainterpath.cpp
|
| |
| |
| |
| |
| |
| |
| |
| | |
Each version of Qt has its own set of autotests, therefore
preprocessor directives relating to obsolete QT_VERSION's
are not necessary.
Reviewed-by: Carlos Duclos
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
src/gui/graphicsview/qgraphicsitem.cpp
src/gui/graphicsview/qgraphicsitem_p.h
src/gui/graphicsview/qgraphicsscene.cpp
src/gui/painting/qtransform.cpp
|
| |
| |
| |
| |
| |
| |
| |
| | |
RevBy: bnilsen
AutoTest: Bench
Details : if we come from setPosHelper (so itemChange) we don't need to do all the stuff regarding the size in setGeometry because the size doesn't change.
I remove two calls to fullUpdateHelper and update() because prepareGeometryChange already call updateHelper and setPosHelper call fullUpdaterHelper too so we don't need to call them inside setGeometry.
We can only call prepareGeometryChange only if we don't come from setPos.
|
| |
|
| |
|
|
|