On embedded the mouse cursor will now appear and reappear regardless of
how the input handling code is loaded (via a generic plugin or compiled-in
to the platform plugin).
Instead of passing around QDeviceDiscovery instances that only works
when compiling-in the code into the platform plugin, introduce a new
internal central QInputDeviceManager. The single instance of this
provides a place to store any future input device related signals and
properties.
Also introduce mouse hotplugging support to linuxfb.
[ChangeLog][QtGui] The mouse cursor on Embedded Linux is now handling
hotplugging correctly with eglfs and linuxfb regardless of how the input
handling code is loaded (via a generic plugin or built in to the platform
plugin).
Change-Id: I147c1b04a193baf216598015264f2c06e1b20f84
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
On Android the foreground activity can get intents
with onNewIntent. Those intents can not be received
in any other way. This is especially true in Android nfc.
This patch adds a way to receive those intents in Qt.
This patch heavily leans on the implementation of onActivityResult.
Change-Id: Ic4dca301f34afe9a528149c3653e545ed3265a3c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Some platforms have the concept of private fonts (e.g., OS X and
iOS) which are generally used as system UI fonts. Since 909d3f5c7,
the platform font database has a similar but private API.
[ChangeLog][QtGui][Fonts] Added QFontDatabase::isPrivateFamily()
Change-Id: Ibdce9de534fadbbc3965be8a942c8012edeed209
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This update makes removes Qdoc's DITA XML generator.
Change-Id: Ibcfd013ace00e56a23268a2a5d850e6c9ea093d0
Task-number: QTBUG-43174
Reviewed-by: Martin Smith <martin.smith@digia.com>
This is like value(), but returns an iterator instead of the value().
[ChangeLog][QtCore][QAssociativeIterable] Added find().
Change-Id: I029fc8f91cef78f718d419587a2a50ffd2bf7632
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
QtCore now builds with no -Wnoexcept warnings
(that doesn't mean there aren't tons of functions
that should be marked noexcept, just that all
conditionally noexcept functions aren't noexcept(false)
just because of a forgotten noexcept elsewhere).
Change-Id: I10dacb6b9c9d41d3595fe2f306356d62d3d91c76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make it easier for the compiler to apply the
Named Return Value Optimization (NRVO) in the
shortName()/longName() functions by not returning
different objects in different return statements.
Change-Id: I1b6fa7e6121bc1c843378be33499728c56c97f92
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Rationale: the case of an invalid QSslEllipticCurve is already
dealt with before we'd call ensureInitialized(). But in order
to have a non-invalid QSslEllipticCurve, we must have called
one of the constructor functions first. There, we already call
ensureInitialized(), so we don't need to do it here again.
Change-Id: I96bdb5db63ec0165e6b8fac9469b5d81c6b2cdae
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This leaves the decision on whether to do unaligned stores to the
compiler, as opposed to forcing it by ourselves.
Since we're now implementing them using two calls, this invalidates the
compiler bug that triggered the #ifdef for Sun Studio (whatever that bug
was).
Change-Id: I4e494ca860a15b9427b2a3000921bf5d92cbb5ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Qt already has solutions for cross platform isnan and isinf logic. We
should use that instead of duplicating it.
This should also fix compiling tst_qstring on MinGW with C++11.
Change-Id: I7b691fd47701a8f07e1a1fe08a95a0aca43ccca1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Since the conversion to a long name was already there, also support
creation from a long name.
Change-Id: Iad712db7447fb0a0a18f600b7db54da5b5b87154
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Commit 1259c5768e410361bcd8b5cf0c2057a2ebabda83 in qtdeclarative removed the
ability to create QWidgets in QML by giving them the correct parent, which
requires calling QWidget::setParent instead of QObject::setParent. This patch
introduces a hook that will allow QtQml to give widgets a proper parent.
Change-Id: I84c57ca5032582c43e405219343d55ac9cf2ffa0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Silence the MSVC warning that got introduced in commit 62b752b3a2:
warning C4333: '>>' : right shift by too large amount, data loss
qdebug.cpp(316) : see reference to function template instantiation 'void putEscapedString<uchar>(QTextStreamPrivate *,const Char *,int,bool)' being compiled
with
[
Char=uchar
]
qdebug.cpp(270) : warning C4333: '>>' : right shift by too large amount, data loss
Change-Id: If1ee20b741feae3287a8d6a11c202b4296d429fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Most of the QIODevice functions already have a locally cached
"sequential" flag. Make the rest of them follow this strategy.
This eliminates the need to use private caching members.
Change-Id: I0edb2c9b7c5f411c5bee25c425e7b40e3c9021d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.
Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
On some Android devices, the realpath() implementation will return
the full path even if the path does not exist. This breaks the
expectation of the canonical path, which should be empty for
nonexistent paths. A few autotests failed due to this.
To work around it, we query existence before getting the
canonical path.
[ChangeLog][Android] Fixed canonical path for nonexistent paths on
some devices.
Change-Id: I5c1dabb8b8394694bc74d2a91912800aaff6b9e3
Task-number: QTBUG-43705
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move compiler warning 4996 from level 3 to 4, like we did already for
desktop builds: 0a76b6bc7f .
Change-Id: Ic4bbaeb3104352a915b15eec7a9c9dda9a5cceec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
The text edit that shows which flags we have set should be updated in
PreviewWindow::setWindowFlags() and PreviewWidget::setWindowFlags()
but QWidget::setWindowFlags() isn't virtual so only the base class
one was called.
Change-Id: I5c9d47d003d5701dde1ab63df0d349f641d66f44
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
We have the same check for null already for PE_IndicatorHeaderArrow
which actually uses the same pixmap. If the file is not found the
pixmap will be null and the code dividing by its width or height will
thrown an arithmetic exception.
Task-number: QTBUG-43067
Change-Id: I13a5ee9f21f4189b7bbcfd57a6f5b52113de834d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Since the former is monotonic and we need a monotonic timer here.
Change-Id: I34325da4fe0317e12f64629a6eef6a80990c3e1a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This function is private.
Task-number: QTBUG-35907
Change-Id: I370c0bfd8fda11c68ee76ee42967f117a81b381c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The layout for an invalid block is very likely to be null, it
shouldn't be accessed without checking the block's validity first.
We can make the check a bit more conservative and simply check that
the block isn't empty.
Change-Id: Ic1459a6168b1b8ce36e9c6d019dc28653676efbe
Task-number: QTBUG-43562
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
When the hotspot is set to be QPoint(0,0) then QPoint will see this as
being a null QPoint. However, it is a valid position as far as the hot
spot for the cursor is concerned, so we default to QPoint(-1,-1) instead
and check for that.
Task-number: QTBUG-43787
Change-Id: Ibf6253033016c4b556b8a2a79c89819a4d5825cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When determining the size of the QPushButton's label then the device
pixel ratio of the pixmap used to represent the icon needs to be taken
into consideration so it is rendered correctly.
Change-Id: If32760b120d7a749a51e2c30592d621c0e63dace
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Since going from FullScreen to Maximized is taken care of inside the
FullScreen block then we don't want to call ShowWindow() again in the
Maximized block. Therefore the Maximized block is moved so it is only
invoked if it is not coming or going to fullscreen.
As the minimized case is not accounted for in FullScreen that is left as
is in its own if block.
Task-number: QTBUG-43849
Change-Id: I3141347e072c50b2a4475098d7b8ee0b207578a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Signed integer overflow is undefined behavior ([expr]/4),
but unsigned arithmetic doesn't overflow, so isn't
([basic.fundamental]/4, footnote there).
So, use unsigned arithmetic for the loop-around serial
number generation in incrementserial(). While we're at
it, also use it for the masking operation in the same
function.
Found by UBSan.
Change-Id: I500fae9d80fd3f6e39d06e79a53d271b82ea8df8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Left-shifting of negative values is undefined ([expr.shift]/2).
Since hashValue is a uint already, rectify by casting it->key to
uint prior to shifting.
Found by UBSan.
Change-Id: I94a5311f5a4492f514f595b8fb79726df1e7d0de
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The REHASH macro is used in qFindByteArray() with a char argument.
Applying the shift operator promotes (a) to int. The check in
REHASH, however, checks for the shift being permissible for
_unsigned_ ints.
Since hashHaystack is a uint, too, rectify by casting (a) to
uint prior to shifting.
Found by UBSan:
src/corelib/tools/qbytearraymatcher.cpp:314:72: runtime error: left shift of 34 by 30 places cannot be represented in type 'int'
Change-Id: Id09c037d570ca70b49f87ad22bed31bbb7dcc7fb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This manifested itself in a UBSan report about loading a non-enumerated
value from an enumeration variable:
src/testlib/qbenchmark_p.h:95:7: runtime error: load of value 11091, which is not a valid value for type 'QBenchmarkMetric'
(or similar).
The chosen value is simply QTest::QBenchmarkMetric(0).
Change-Id: I8492a871a71d89fa6f7902d38f9eecee4b060646
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The QPageSize-based refactoring led to casting DevicePixel to a QPageSize::Unit
value of 6 (out of bounds). And then the switch in qt_nameForCustomSize
would leave the string empty, leading to "QString::arg: Argument missing: , 672"
warnings.
Change-Id: I85e97174cc8ead9beccaaa3ded6edfad80f8e360
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Selftests for testlib fail when executed in UTC timezone because local and
UTC are the same, but expected to be different. A custom timezone is used
instead.
Debug output of qCompare does only handle local and non-local timezones, using
new Qt5 features allows to show the correct timezone in format string.
Change-Id: I753884a12370952b7b62a90d62896db4f2d3d1b4
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Lets us print out the interface name in addition to the address when
doing:
qDebug() << myNSObject;
Unfortunately, CFTypeRef is just a typedef to void*, so we can't add a
generic overload for CFTypeRef. For now, we provide operators for
commonly used Core Foundation and Core Graphics types. Additional
types may be added using Q_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE.
Change-Id: I27b12ef9e62cb1be348b9771cb31657692903f6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...using qHashRangeCommutative(). Also add a test.
[ChangeLog][QtCore][QSet] Can now be used as the key in QSet, QHash.
Change-Id: Ie7c81d257a3b324fc03d394fa7c9fcf0c6fb062a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows further QTcpServer inheritance in library. Also,
add protected c'tor for this purpose.
Change-Id: I1a5c0cdedd64bcd41b028e09d7752248506296c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add possibility to get length and other information of EC based
certificates. Also it is possible to parse those public/private
keys from PEM and DER encoded files.
Based on patch by Remco Bloemen
[ChangeLog][QtNetwork][SSL/TLS support] It is now possible to
parse elliptic curve certificates.
Change-Id: I4b11f726296aecda89c3cbd195d7c817ae6fc47b
Task-number: QTBUG-18972
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use the armle-v7 ones instead.
Change-Id: I981cb4bed7e14cae8f89112df2d1d014db314cd9
Reviewed-by: Wolfgang Bremer <wolfgang@w-bremer.de>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Shadow sampling is an old OpenGL feature (hello, OpenGL 1.3!), which
was missing from QOpenGLTexture. This commit adds the relevant support.
Change-Id: I9f6b552d806a356d24ee08121af6bc9ce684f2b5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Can be used by applications to send hardware buffers directly to the
hardware compositor, if available. The primary usecase right now
will be from QtWayland to 2D composition of surface by bypassing
the OpenGL composition.
Change-Id: Ibdcdcc744c34869d3abbc11aad448a755f87161f
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
tst_collections.cpp
tst_collections.cpp(3138) : warning C4305: 'argument' : truncation from 'size_t' to 'bool'
tst_collections.cpp(3190) : see reference to function template instantiation 'void testContainerTypedefs<QVector<int>>(Container)' being compiled
with[Container=QVector<int>]
(repeated)
tst_qringbuffer.cpp(297) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
tst_qringbuffer.cpp(300) : warning C4309: '=' : truncation of constant value
tst_qringbuffer.cpp(306) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
tst_qrawfont.cpp(947) : warning C4309: 'argument' : truncation of constant value
tst_qsslsocket_onDemandCertificates_member.cpp(217) : warning C4189: 'rootCertLoadingAllowed' : local variable is initialized but not referenced
Change-Id: I6143d4ad121088a0d5bdd6dd2637eb3641a26096
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>