no-zlib is no longer supported, so these lines can't have any effect.
Change-Id: Ib5ef9a97a0687945606b4a718e339590bc501fe9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The feature is called xinput2, so the defines should have this in their name as well.
Change-Id: I661dd3ea3726f4a0954e788d5f0083ace10bbe89
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Most libs use QMAKE_LIBS/CFLAGS, but some have other naming
conventions. Unify them into using QMAKE_LIBS/CFLAGS.
Change-Id: I39b188adc1f9a223a83b294c5315c3095a9c68de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
It's 2016, and file sizes larger than 4G are common, so
-no-largefile is something we really shouldn't support
anymore.
For now left the implementation as is, just removed the
configurability from the command line. But this should
really get replaced by decent configure checks that
check for 64bit stat() vs stat64() vs 32bit stat().
Change-Id: I057515e3cc1f06a022d80f02e866944428026b1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
TUIO supports tracking tagged physical objects on touchscreens by
various means (QR codes, RFIDs etc.) It can detect both position
and rotation. Likewise, it may be possible for some touchscreens or
drivers to detect orientation of the fingers. So, just as QTabletEvent
has rotation, each touchpoint needs to include the rotation value.
When using tokens, each object has a permanent unique ID, whereas
QTouchEvent::TouchPoint::id() is a transient ID which usually auto-
increments each time a finger is pressed to the device. So we need to
make that available too, to identify each token. Different platforms
may use different kinds of IDs (int, UUID, QR code etc.); however for
TUIO 1.x, the unique IDs are just 32-bit integers. QPointerUniqueId
is added, storing only a qint64 for now (like QTabletEvent::uniqueId())
but able to be expanded as necessary later on.
Task-number: QTBUG-51844
Change-Id: I04182042f47fa2954728079139a4664a31184b54
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
To avoid infinite loop on unbuffered socket, previous implementation
always disabled the read notifications before emitting a readyRead()
signal. So, it's very likely that the socket will toggle the state of
notifier twice (on->off->on) in one notification cycle.
This patch prevents this unnecessary toggling by deferring the
notification disabling in canReadNotification() to the next
notification cycle.
Change-Id: Iebc5a7ad18a6f40ea1cf63e7f1b12f6c180cbf7a
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince
.pro file clauses in library, examples and tests.
Task-number: QTBUG-51673
Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
These are not being used in Qt anymore, we use their
xcb replacements instead where it makes sense.
Task-number: QTBUG-30939
Change-Id: I2d8141818b402c23b29b0c0398f876a6189d0d27
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Compiling the drivers into Qt Sql does not make a lot of sense
anymore, as we handle plugins well enough in the build system
these days.
[ChangeLog][Build system] SQL drivers are now always compiled as plugins.
Change-Id: I364b82a480849399d1fafe4b20e9f08922569260
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Our handling of plugins when Qt is build statically is
nowadays good enough, so we don't need to build the
JPEG and GIF support directly into Qt for static builds.
Let's simply always build them as plugins.
Also simplify the logic in configure, and get rid of the
no-gif, no-jpeg and no-png config variables.
[ChangelLog][Build system] JPEG and GIF image support is now
always built as a plugin. Removed -imageformat-[jpeg|gif]
arguments to configure.
Change-Id: Ic01559ff406c966807b3be8761252e8802adcdf7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Directly link against DwmApi and fix breakage introduced by refactoring
QRegion.
Change-Id: I45cd696de630aebb5347130560ab69530eefbcdb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library
and tests.
Task-number: QTBUG-51673
Change-Id: I552b3fe8d6e0eb7c8c7b3a3d41558e5e21904dd2
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Remove #ifdef sections for Q_OS_WINCE from library.
Task-number: QTBUG-51673
Change-Id: I857165858118be91bfb25094ee3229b36942dc4e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Instead of relying on the QString relational operators to
implicitly convert the QChar to a QString, add relational
operator overloads that compare the QChar without first
turning it into a QString, saving one memory allocation
per comparison, and allowing to mark the operation as
nothrow.
Consequently, in tst_QStringBinOps, verify now that all
relational operations are noexcept.
The added overloads make QChar ==/!= int comparisons
ambiguous. De-ambiguate by providing a constrained
template that matches int and nothing but int (otherwise,
the QChar and the int versions would compete for a
QChar::SpecialCharacter argument, and end up creating
new ambiguities). This solution may not be perfect, but
it can be easily extended should more ambiguities crop up.
The existing overload deals with all patterns found in
qtbase.
Change-Id: I4156d918e9b9134c1da684b8b69e0ee526ad24e3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
For QChar <> QStringRef, equality and inequality were already provided
(via QChar -> QString implicit conversions, to be fixed in a separate
patch). Missing were the less/greater than (or equal) operators.
Added.
For QChar <> QLatin1String, all relational operators were missing.
Added, too.
[ChangeLog][QtCore][QChar] Added missing operator{<,>,<=,>=}
comparing against QLatin1String and QStringRef.
[ChangeLog][QtCore][QChar] Added missing operator{==,!=}
comparing against QLatin1String.
Change-Id: I9941fe7e7281ea560b3bd5970cb9651ffadc1495
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Wrap C-string in QL1S to prevent memory allocation.
Replace startsWith() with comparing to first element of
(existing) splitting result.
Change-Id: Id47a0c350e4027abecd1394c1ee5dec8f346af00
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Remove:
- handling in abort(): timer will be stopped in resetSocketLayer();
- unneccesary checks in _q_testConnection(): if we have a valid timer
we should stop it anyway;
- code duplication in _q_testConnection(): do not try to stop the
timer twice.
Change-Id: I039ae583ae4e6c4a90dc102c7d93a30e46632374
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
In keyboardSearch(), QAbstractItemView unconditionally called
QElapsedTimer::restart().
Calling restart() on an invalid QElapsedTimer is undefined
behavior:
qelapsedtimer_unix.cpp:192:9: runtime error: signed integer overflow: 3313808 - -9223372036854775808 cannot be represented in type 'long int'
qelapsedtimer_unix.cpp:193:10: runtime error: signed integer overflow: 534150461 - -9223372036854775808 cannot be represented in type 'long int'
qelapsedtimer_unix.cpp:194:17: runtime error: signed integer overflow: -9223372036851462000 * 1000000000 cannot be represented in type 'long long int'
The code already checked the timer for validity, and did not
use the return value of restart() in case of an invalid timer,
but the check came too late.
Fix by checking the return value of QElapsedTimer::isValid()
earlier, and calling start() instead of restart() instead.
Fix the same error in QTreeView, which has a c'n'p copy of
the buggy code.
Change-Id: I9751465394707d9348d5c05a0b1b2be147eceb2e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The flags here are passed to a private QVariant constructor, and they
really represent a boolean - IsPointer or not.
Because the flag for the key_type was incorrectly populated with the
flag for the value_type, memory would be corrupted when using a mapping
type whose value_type is a pointer, but whose key type was not, such as
QMap<QString, int*>
This typo has been there since the concept was introduced in commit
v5.2.0-alpha1~807 (Add container access functionality for associative
containers in QVariant., 2013-04-05).
Task-number: QTBUG-52246
Change-Id: I9ecb13c603015eed2dc2ca43947fa0ecd6be8b5a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The QScrollerTimer instance allocated by QScrollerPrivate was never
freed. I've absolutely no idea why QScroller has such a messy
d-pointer handling, so go for the easiest approach: exploit the
fact that QScrollerPrivate is a QObject and parent the QScrollerTimer
to it.
Change-Id: I500edc9d0d14b2fb9eec02712229970eb2b9fe81
Task-number: QTBUG-52280
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
People use this, so make sure there's a test for it.
I don't expect this test to fail, but static and
dynamic checkers should be presented with this
use-case, so they have a chance of warning, because
certain implementation strategies of QPointer may
make this code undefined.
Change-Id: I334bd73204ba4e186c4098fc6b7188917407e020
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Fixes documentation warnings:
qtbase/src/network/kernel/qnetworkinterface.cpp:528: warning: Can't link to 'QUdpDatagram::interfaceIndex()'
qtbase/src/network/kernel/qnetworkinterface.cpp:587: warning: Can't link to 'QUdpDatagram::interfaceIndex()'
Change-Id: I6579f7880b5e183b9c68dfe08fa7671f1511fdfa
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
- Directly link against dwmapi which should be present on
Windows Vista and remove duplicated header constants.
- Remove struct QWindowsShell32DL since all required functions
are present on Windows Vista.
- Remove functions that are no longer needed from QWindowsUser32DLL
with exception of the clipboard functions which are not present
in the MinGW stub libraries until v5.
Task-number: QTBUG-51673
Change-Id: Ia4a8a3f1db0f0d02322317d547e61ae39f9008b5
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
It is only set if the "Show passwords" option in Android's security
settings is enabled, the value is not updated at runtime as this option
isn't likely to be changed frequently, if at all.
The value of 1.5s is hardcoded in Android's PasswordTransformationMethod.
[ChangeLog][Android] Show password while typing is now supported
Task-number: QTBUG-48948
Change-Id: I9209b68c8684b825be196e8d0afd37cb0e0d141d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Jason Erb
This fixes an inconsistency with all other files in platform plugins.
Change-Id: If790f51e250c1e3b2e4525efbc18c59be9c5568b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Removing blacklistings from tests that are now passing.
Change-Id: I00aa1ce286d3e7715fb4bee4a36d0d77049a29ae
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
... by replacing QString::split() with QString::splitRef()
and using the new overloaded functions:
- QLocalePrivate::languageToCode(QStringRef)
- QLocalePrivate::languageToCode(const QChar*, int)
Change-Id: I2884bdc6d3e27963ce121d659a5e092b10b4ef8c
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
... for QStringRef and QChar array.
Now we can use QStringRef arg or QChar array arg to avoid
unnecessary allocations.
Also mark these functions as Q_DECL_NOTHROW.
Change-Id: Ibe75346d80cc413e303fad886ecb82dbdb89af24
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Now we can use QStringRef arg or QChar array arg to avoid
unnecessary allocations.
Also mark these functions as Q_DECL_NOTHROW.
Change-Id: I22b08a054051e80e3f76bb543d860f3dcb6caa4f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
While extremely unlikely, there is a theoretical possibility that
the '0' glyph of a given font will have a width or height of 1 pixel,
in which case the (x + 1) / 2 way of getting the center would give us
an out of bounds pixel. We just default to true in this case, since
we cannot make any assumption based on the 0 glyph if it doesn't make
any sense. If the image is invalid, we default to false.
Change-Id: I36cea0b80c9d55aa10eb65db44d1b7ec8a40fc8c
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Some strings were drawn with a different size or scaling than what the
string itself said, causing confusion.
Change-Id: I4b187cba6d467cfa0900576bdf451052baa806e6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
If moc is invoked with the @ argument and no options file is specified
or the options file cannot be read, do not try to parse the empty
arguments list. Otherwise QCommandLineParser will print an additional
error message that is of no value for the user.
Task-number: QTBUG-51847
Change-Id: I9aa1eb20a44097b553123be8bc6fded87473a03a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The test is preventing us to take RHEL 7.1 in the CI for Qt 5.7.
Changed the paintEvent() test to be less strict about the paintCount.
Task-number: QTBUG-51809
Change-Id: I84f797442e38c66dc23862e92eda6db08bcac368
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QImage::pixel() assumed that the color table was valid
for the values in the bitmap. This was always wrong
for indexed images with explicit no color table set and
was wrong for mono images that were constructed from
preexisting data.
For mono images, we default to a black/white color table,
like we do when constructing with uninitialized data.
For indexed image, we always default to no color table,
but instead of crashing in pixel(), we warn and return
an undefined value.
[ChangeLog][QtGui][Image] Fixed possible crash in QImage::pixel()
for mono or indexed images.
Change-Id: Ieaf19c03984badddfd06e1855a7e287b862adc70
Task-number: QTBUG-50745
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Replace substring functions that return QString with
corresponding functions that return QStringRef where
it's possible.
Create QString from QStringRef only where necessary.
Change-Id: I697f776c60003629990cfd197534ffed63bafe2f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>