In particular, just creating a QFileInfo (or a QDirIterator, which uses
QFileInfo internally) no longer triggers decompression. This doubles the
performance when using a QDirIterator/QFile combo for loading a bunch of
files.
Change-Id: I7f53354e890ad6360693b7848d21a0cd5d595628
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit d3dcc6f introduced a regression to QTextEdit, leaving
it to always show the cursor regardless of focus. The reason
is that QTextArea used to toggle visibilty by setting the
cursor blink rate. What it really wanted to do was to set
cursor visibility explicit.
This patch implements function setCursorVisible, and updates
the places that used to call setBlinkingCursorEnabled to
instead call setCursorVisible (where it makes sense).
Change-Id: I58ea965178d4faaf5b09f6f6a37a37d5e8b99c97
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Remove documentation of enumeration values and code from manual test.
Change-Id: I8e6cbbe11ab38421fb29595ae79351f5a919ff70
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Q_GLOBAL_STATIC does the thread-safe protection for us. And who said we
could only use non-POD types? We can just use a boolean!
Change-Id: Ifea6e497f11a461db432ffff1449b0a88d75d194
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It was being stored once in QThreadPrivate and once in QThreadData, with
the latter being hidden as a Qt::HANDLE. Besides saving a little bit of
memory, this also solves a small data race condition that arises from
trying to connect a signal to an object moved to that thread and then
emit that signal shortly after the thread starts. Before this patch,
QThreadData::threadId was initialized only by QThreadPrivate::start(),
which meant that we were racing that initialization with this check in
QMetaObject::activate:
const bool receiverInSameThread = currentThreadId == receiver->d_func()->threadData->threadId;
Task-number: QTBUG-52337
Change-Id: Ifea6e497f11a461db432ffff1449ae01f1099aae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
As of 5.7, HB-NG is the default shaper engine.
Change-Id: Ia5400444a5e387fa6b56de47fabc6f1c2c166f85
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Add a named comparison method that allows the caller to
specify in how far a translation between IPv4 and IPv6 should be
performed before comparing.
Change-Id: I9aeffcd4539a6c0537c083c4553357b22167df3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Recent changes to the xcb platform plugin added logic to paint to a
server-side X Pixmap when the MIT-SHM extension is unavailable. Those
changes also added logic to keep track of the dirty areas that need to
be flushed to the server from the backing store when the backing store
is flushed to a window.
Because a single QRegion was used to track those areas, nested paint
operations no longer accurately tracked all the dirty areas. Consider:
void Widget::paintEvent(QPaintEvent *) {
QPainter p1(this);
for (int i = 0; longRunningOperationInProgress(); i++) {
QPixmap pixmap(size());
QPainter p2(&pixmap);
p2.drawText(pixmap.rect(), i & 1 ? "Working." : "Working..");
p2.end();
QBackingStore *bs = backingStore();
bs->beginPaint(rect());
p1.drawPixmap(0, 0, pixmap);
bs->endPaint();
bs->flush(rect(), windowHandle());
}
p1.fillRect(rect(), Qt::red);
p1.drawText(rect(), "Done!");
}
While this code could be restructured, it is a common pattern in legacy
Qt applications which cannot be easily changed.
Change-Id: I3b919266abe41c96a584cb02f41cafac3f9d1d7c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Don't use QString::prepend() in the loop. Just compose
temp string by appending, and then prepend whole temp string.
Change-Id: I6efb2d20e03f6a3526103d3a9494d5d1b0fbbf81
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix regression in a7b0cb467c which caused
it to be hard to start scrolling at the ends of a scroll-view if using
fine grained scrolling events.
Change-Id: I55f3210150b993281545c3ad5a7356d892fa30b5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
the host compiler's version is not determined, so we cannot make any
assumptions about its capabilities.
Task-number: QTBUG-53017
Change-Id: I939fd7402b5daac73f2195b9d8763b9008bc7ea4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Some color bitmap fonts will have a size greater than 127 pixels,
areMetricsTooLarge() will return true(its advance exceed 127) for
these fonts and we are unable to render these fonts since
QFontEngineFT::loadGlyph() will simply do nothing if
areMetricsTooLarge() return true. To support bitmap font whose size
is between 128 and 255, we change x,y,advance of QFontEngineFT::Glyph
to short variable to make areMetricsTooLarge() return false, in this
way we will be able to render such color bitmap fonts.
Change-Id: I9ab244b14884cdde91040a462f2fbca650b91289
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The widget is hidden, reshown and tested for active window, which
is flaky. Add a call to activateWindow() which increases
the chances of it becoming the active window should another window
appear.
Change-Id: Ibbecdbc43e2ac9638aec497c47fffaaffa1855af
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
CID 155005: Possible illegal access in string. Some loops were
reading the buffer without checking the bounds.
Change-Id: I910671a6d56808138ec2bb5d96bd7edf78b20f73
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
CID 21629: The QMakeProject::read result was ignored.
MetaMakefileGenerator::createMakefileGenerator will be called if the
project was read.
Change-Id: I9187c82efd1abedcaa8e394f1fdb0b7f35a2b1d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The opentype CONFIG does nothing, and the removed if condition
has already been checked at that point.
Change-Id: Ibf5365eb08f09451230319bc6af1014614876792
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
On some operating systems, tzdata files carry the Local Mean Time (LMT)
for the city in question, which better represents how time was tracked
before standard, hourly timezones were introduced in the early 20th
century. The test was asking for the data for 1653-02-09 and assumed
that it would find the first Central European Time (CET) rule, which
Germany didn't start using until 1893-04-01.
This fix allows us to remove the blacklist that had been applied to this
test without investigation. It wasn't related to OpenSUSE, aside from
the fact that OpenSUSE tzdata carries the LMT data.
Change-Id: Id5480807d25e49e78b79ffff1449bdaf46901367
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
The reference to trUtf8() made it even more confusing, so remove it.
It's redundant and deprecated anyway.
Change-Id: I9921297160db3660bb5099692bbfdaf6e85637aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Miter limits below 1.0 are not valid in PDF and trigger an error in the
Reader. This change enforces a minimum miter limit of 1.0, and it adds
a manual test for producing a PDF file demonstrating this issue.
Task-number: QTBUG-52641
Change-Id: I1c78b1c4a44579e95e1cddfb459926d304e60165
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Replace substring functions that return QString with
corresponding functions that return QStringRef where
it's possible.
Create QString from QStringRef only where necessary.
Add overloaded functions with QStringRef arg
in QDBusUtil:
- isValidUniqueConnectionName()
- isValidMemberName()
- isValidPartOfObjectPath()
Change-Id: I4a24a298702728ba7d3a65c39e25c3a9c759e07f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Where "correct" is defined by what std::shared_ptr does as well as what
happens when an intermediate QSharedPointer of the exact type of the
constructor behaves
That is,
QSharedPointer<X> ptr(new Y);
Behaves like
QSharedPointer<X> ptr;
{ QSharedPointer<Y> tmp(new Y); ptr = tmp; }
Change-Id: Id75834dab9ed466e94c7ffff14455d445f72592b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
So the command lines is more compatible with compilers flags. And new options
like -isystem can be used.
Change-Id: I7ad0997e5dab7d0425f12cde415abae6e9034a5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
It was hidden by overridden parent(const QModelIndex &) methods.
See also 63b5082ea8
(Unhide QObject::parent() from QAbstract{Table,List}model).
Change-Id: I8b6d4d4175e4d43ff269eaeb0b2b1a9fb8f44bab
Task-number: QTBUG-45393
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Under Windows, the default paths are not correctly set, hence it's
necessary to explicitly set this.
Change-Id: I9779485115a93bdaf6eb6be87293ca921746bae7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
If the container being added to is default constructed and has never
been modified, we don't have to do all the checking and iterating.
Instead we can just assign with operator=.
If the LHS is merely empty, we could lose reserve()d capacity, so only
do this for a shared-null LHS.
Change-Id: If1e3342662d10833babc7ab847ada0285073723b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
libdbus will send a local signal if connection gets disconnected. When
this happens, end all pending calls with QDBusError::Disconnected.
Task-number: QTBUG-51649
Change-Id: I5c7d2a468bb5da746d0c0e53e458c1e376f186a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().
Saves more than 2KiB in text size on optimized GCC 6.0
Linux AMD64 builds.
Change-Id: I9610e711edc01d2a1ba19fef65d6b000ffc77255
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
In addition to pen events being handled as tablet events, we create
touch events. Same principle is used on other platforms as well. This
allows devices as Surfaces to use the pen with Qt applications.
Furthermore, the first update event does not have to be a press event,
as in a pen has proximity values describing a move without touch, but
also the HoloLens uses touch points as permanent pointer devices. They
all send an exit event once released or out of range. Hence, clean up
the internal touchpoint hash when the touch device is gone, not on
release.
Task-number: QTBUG-38681
Change-Id: I38acaa034a3cfe224098bfa36bfead5428f4db16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
IInputStream::ReadAsync might create a separate buffer to fill in data.
Passing a buffer with GetAddressOf() can cause a memory leak of the size
of data to be read.
Instead, pass a separate buffer pointer and continue to use this one
after the async operation. This way, the OS can decide whether to switch
buffers or not, keeping ref counting in sync.
Task-number: QTBUG-52961
Change-Id: I9dfb627287142355ebcf74ca52427b4e8108e8d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This is not exhaustive, but was enough to discover ICEs.
Change-Id: Ib60be1d298a66b72e3eb9b75ad538f0bf15b5f62
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][Important Behavior Changes] Support for DirectFB is no
longer enabled by default, due to lack of development in upstream. To
re-enable the platform plugin, pass the -directfb option to configure. If
there is no interest in this platform, the support will be deprecated in
Qt 5.7 and will be removed in Qt 5.8.
See: http://lists.qt-project.org/pipermail/development/2016-March/025273.html
Change-Id: Icaa7fb2a490246bda156ffff143c62515a5f575b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The existing code keeps the overrides from each base class together,
so also move them to the correct group after adding Q_DECL_OVERRIDE.
Change-Id: I5d89fb4e7f9454ab0c9c6383f8245e64b95e84e9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The proper solution with qCalculateBlockSize will come for Qt 5.7.
Change-Id: Ifea6e497f11a461db432ffff14490788fc522eb7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Basic optimization of conversion from indexed8.
Task-number: QTBUG-35747
Change-Id: Ic9d32789769eadb05fbecfebf2d2f2c87d66610b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
this adds file_copies.prf, which understands the variable COPIES, which
works analogously to INSTALLS.
i've been holding this off for a long time, as it is not without
caveats. however, similar hacks are proliferating all over the code
base, so it's time we formalized it.
in fact, it's the easiest way to fix some nasty shadow build problems,
which is why i'm adding this on the stable branch.
Task-number: QTBUG-52256
Change-Id: Icbe3b9fbb79c952546aad2d467a438d3a69d749f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Limit the height of the the wave-pixmap so that fillRect doesn't clip
it.
At the same time the precision of the generated wave-pixmap is improved
so it better fits the requested radius.
Task-number: QTCREATORBUG-15851
Change-Id: If754387b20ab7b015857ecb0a0e8fe16de1d728a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Do not set WritingSystem supported just to unset it afterwards;
test in-place and fallback gracefully.
Change-Id: I6910019c08fcf3909b924c27271547aae2ea0ff1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
There is already an array of writing systems for which
GSUB|GPOS table is required
(also rename it from "openType" to "capabilityForWritingSystem",
to reflect its meaning).
Change-Id: I7cfd4a80d5ca13f9312b3644b2bd738d6015c71c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>