- removed an unused field
- initialized variable that might be used uninitialized.
Change-Id: I7a7a063f025ecc32fa462dd8d5e2485c2ba52eb8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Properly QSKIP tests that use disabled QProcess and symlink
features instead of excluding them silently by #ifdef.
Other reason is that moc doesn't respect QT_NO_* defines
in class definition which causes build issues on some
platforms.
Change-Id: I041020f7452f7d36c7ec8a5866a4ba5eb23d1f94
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Other parts of tst_qudpsocket.cpp already did this check.
Change-Id: Iee8cbc07c4434ce9b560ffff13ca545a03c9596a
Reviewed-by: Richard J. Moore <rich@kde.org>
The QDBusMessage::createSignal() static method doesn't take a parameter
for specifying the destination service of the signal. While this is not
a widely used feature, it can be useful to avoid waking up all connected
clients when the service knows what are the clients which are interested
in the signal.
This commit adds a QDBusMessage::createTargetedSignal() method which
also takes the destination service as its first parameter.
Change-Id: I9fdca53673a6944c39c93c1efd69a9d02859684e
Task-number: QTBUG-44704
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
NSAccessibility has no explicit analog for
QAccessibleActionInterface::toggleAction(), checking checkboxes/radio
buttons is handled by NSAccessibilityPressAction. So ensure exposing
the action properly on OS X so that VoiceOver users can check/uncheck
checkboxes, select radio buttons etc.
Change-Id: I54b47515cc4882ecf0544c7351bd3c9046023a44
Task-number: QTBUG-44852
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Add setters for an int verbosity to QDebug. The streaming operators
can check on the setting and output more information accordingly.
[ChangeLog][QtCore][QDebug] How verbose a single debug output should be
can now be fine-tuned by setting a verbosity on the debug stream.
Change-Id: I77001fcf1ef090a580d1a137bb5a667fc1bf1e1b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fixes the drawn position of end points in drawLine.
Based on a patch by Jørgen Lind, and modified so that
it caused no test regressions.
Task-number: QTBUG-38144
Change-Id: I24aa28480cc6ae09abf91d80378970565a29b254
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Add the missing test data for haiku platform selector
and adapt unit test to use them.
Change-Id: I578e7f7e04f2a4c68f23d5356ea201e9562dbe6c
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need to track the active popup globally, having
parent windows track child popups is not sufficient
since there may be one or more intermediate windows
in between the event receiving window and popup window.
Add API to QOCocoaIntegration for tracking the global
popup window and use it instead of the per-window
tracking. Make sure to only close popups on clicks
outside the popup only. Add code to QNSView::handleMouseEvent
that redirects mouse events to the active popup.
Add manual test.
Change-Id: Ia3e3fd42d8fddf5c69f0c6879b333ca544521f61
Task-number: QTBUG-43464
Task-number: QTBUG-31937
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
According to I/O API, QIODevice and its inherited classes should be
able to process a full 64-bit offsets and lengths. This requires
64-bit parameters in operations with internal buffers. Rework
QRingBuffer to avoid implicit truncation of numbers and fix some
64-bit issues in code.
Change-Id: Iadd6fd5fefd2d64e6c084e2feebb4dc2d6df66de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The existing check fails to detect the case where white space characters
other than the space character are replaced by space characters
without the length actually changing and returns the original string.
Task-number: QTBUG-44936
Change-Id: Ice6faa975f8b41f185c76f6d0d4ff81603e25eb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On some platforms show() may result in the window being shown full
screen, depending on the defaultWindowState of the platform. If
that's the case, the resulting window size does not follow
the requested size (though the internal normal geometry should).
We need to use showNormal, so that we guarantee that the window
state is WindowNoState.
Change-Id: Ied080eaca13d759501ea292b5e6b2df4e3b32426
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
The QSkip was there because of a bug in QList.
Since commit 8153386397, the test is
no longer using QList. We can remove the QSKIP
Task-number: QTBUG-8959
Change-Id: Icc18d341d734d0605dcddaf925586f3bd603d6a0
Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
If a parameter contains quotes the check for "-binary" fails.
Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Let's not try to to compare our QTimeZone handling with the system one.
Our handling goes beyond the range of the POSIX APIs, so that's a recipe
for error.
Change-Id: Iee8cbc07c4434ce9b560ffff13ca4a4f335bdbae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The refactoring from a8c74ddcf7 commit
exposed more issues in the Windows API. There were already quite a few
QEXPECT_FAIL for this, so this isn't new.
For example, localtime(1351386000) on the Central European Timezone
should be "Sun Oct 28 02:00:00 CET 2012" (the second occurrence of 2
am), but the Windows API returns tm_isdst = 1 (i.e., still in the CEST
timezone) and that's incorrect.
Change-Id: I1bc63ac99b1d67b55d783f9606e5c59b24223b13
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
In QtScript we use the msecs since epoch conversion (JS date is based on
the concept). After a8c74ddcf7 the date
conversion test in qtscript started to fail. Instead of relying on the
code working by chance, simply update the date when setting it with
setMSecsSinceEpoch.
Task-number: QTBUG-44885
Change-Id: I9f95c9cdccea52e7d1f808f3cb9e18570ef0df13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This structure is meant to replace QRgb where higher precision is
needed.
Change-Id: I49d441e2133371a8b91c2e6af0c137bcc5fcb9ed
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
\t was not interpreted as a tab character.
Task-number: QTBUG-44884
Change-Id: I3c733e227fba7e5fd5153df0ae4d0431903bb104
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
When pressing a button with the mouse and then moving the focus away,
the internal and visual state of the button would get updated, but the
released signal would not be emitted.
The same goes for disabling the button, although in 99% of the cases,
disabling the button will also move the focus, so the first case
already takes care of emitting the signal.
Task-number: QTBUG-42775
Change-Id: Ib6ba8e0a75f0349b66d1e799b02bd8498db85022
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
In order to support testing values of more accessibility attributes
and parameterized attributed, we provided some "infrastructure" to be
able to query them with minimal effort. We also reworked current 6
supported attributes to use this new way.
Change-Id: Iece670fa9a862f84389466587c1595466eeedc7f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The same qt_timeout_value function was copied 5 times in qtbase's code,
so provide a common implementation in QIoDevice that can be used by
everyone.
This commit also corrects the remaining time calculation in
QProcess::waitForBytesWritten and QProcess::waitForFinished by using
this new function.
For QProcess::waitForFinished, if the process started within almost exactly
the timeout time passed to waitForFinished, msecs - stopWatch.elapsed() would
be -1, which is a special value.
Change-Id: I7b76ee6bae695eafdd02e3db03e2ff1e23a7f40c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Use qmath and cmath methods instead of math.h methods.
Change-Id: I86ee2465c999822bf00a7cefee1642c4c30590a6
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
This commit adds support for following HTTP redirect responses on a per
request basis.
This behavior is disabled by default. It can be switched on by
setting the QNetworkRequest::FollowRedirectAttribute to true.
2 new error codes have been added to QNetworkReply:
* TooManyRedirectsError: Set when the number of redirects exceed a
given value set by the user (defaults to 50 if not set)
* UnsecureRedirectError: Set when we are redirecting from a 'https'
to 'http' protocol.
Test cases for the following scenarios:
* Single HTTP redirect using local test server
* Changing max-redirects
* Testing all redirect related error scenarios
The next commit will extend this feature at a QNAM level.
Task-number: QTBUG-8232
Change-Id: If9e28ad12bad08bcdc5bc511b1cd59dc9d8150f0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Otherwise, we modify shared strings that happened to be rvalues.
Task-number: QTBUG-44706
Change-Id: Ia0aac2f09e9245339951ffff13c85bfc912f03d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When timezone support for QDateTime was added, we decided it was a good
idea to delay creating the QTimeZone object and checking that the time
is valid in that timezone (including for local time) until the user
requested that information. Unfortunately, QExplicitlySharedDataPointer
returns a non-const T* in operator->(), which meant we were accidentally
modifying the d pointer's contents in const methods, which in turn means
those const methods were not thread-safe when operating on the same
object.
This commit changes the d pointer to QSharedDataPointer, which is safer
in this regard and pointed out where the issues with constness were
located. Since we can't lazily calculate QTimeZone anymore, we need to
do it whenever the date, time or offset changes.
Task-number: QTBUG-43703
Change-Id: Ic5d393bfd36e48a193fcffff13b9686ef4ef1454
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
which returns the shortest arc quaternion to rotate vector from
to the destination vector to.
Change-Id: Ibd7a746789ecdfe6f7fe17e4ac9049f7ac46560d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
It is just a convenience wrapper
around convertion to/from the rotation matrix.
Change-Id: I27511b43866827172960b0152f1c7b65da857f6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This is a little-used feature which only affects how minimized icons
are displayed on certain older window managers, and is not necessary
even then. It has not been implemented in Qt 5 until now.
Task-number: QTBUG-44659
Change-Id: Ie6ead7a6f922878b349a096d905bf7f675dc2f31
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
The new mode, ParseAsPositionalArguments, allows to interpret
"application argument --opt" as having two positional arguments,
"argument" and "--opt".
This mode is useful for executables that aim to launch other executables
(e.g. wrappers, debugging tools, etc.) or who support internal commands
followed by options for the command. "argument" is the name of the command,
and all options occurring after it can be collected and parsed by another
command line parser, possibly in another executable.
[ChangeLog][QtCore][QCommandLineParser] Add parsing mode for options
after arguments, to allow treating them as more arguments.
Change-Id: I48d5fcf90f2f59deda8422538b8ebf2680fae828
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows one to check whether the conversion is successful without
checking for the return result, as the value of 0 represents the valid
IPv4 address 0.0.0.0.
Change-Id: I637fe55583f2255c85b0d955e5886b61494e0c7c
Reviewed-by: Richard J. Moore <rich@kde.org>
In 85136496bc, Shane made QHostAddress
automatically convert any IPv6 address that was v4-mapped to IPv4 in
QHostAddress. While that is an interesting trick, it prevents us from
being specific about what we want. On some OS (like FreeBSD and OS X),
the distinction is relevant, so keep it.
Moreover, it was inconsistent: it might fail depending on how the
QHostAddress was constructed and the order of comparison.
[ChangeLog][Important Behavior Changes] QHostAddress will no longer
convert IPv6 addresses of type "v4-mapped" to IPv4. To perform this
conversion manually, construct another QHostAddress with the result of
toIPv4Address().
Change-Id: I06afbc7018539804bb3044ef1fe6a49ac7a5f240
Reviewed-by: Richard J. Moore <rich@kde.org>
It was already a user meta-type, so it only gets
promoted to internal.
[ChangeLog][QtCore] QPersistentModel index becomes an built-in
meta-type, including QVariant support.
Change-Id: I63d733d1eb66aa61691e7afce27fe7372a83ac00
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit updates the NS records and disables the lookup for
ptr-single.test.qt-project.org, as the new provider does not support
adding PTR records outside of the in-addr.arpa zone.
This commit reverts f9c70128bb, which was
a reversal of 24c52bd44b.
Change-Id: Ia0aac2f09e9245339951ffff13c7cab530a41515
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
textEditTest in qaccessibility test was using QTextEdit::setCurrentFont
on second pass, but that did not change the font used for text in any way.
I don't know what was the purpose. So I changed it into something that
made sense to me and actually tests text with a different font on second pass.
Also fixed characterRect function in tests to use correct font/format.
Change-Id: I3663e02abda381be1401e298c15b51cd0fb75939
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
On a high resolution display the test will potentially create a text
edit that introduces line breaks and these make it fail then.
Change-Id: Ie82cc4b4139fe0f51ddca219c5c911957fa715b7
Reviewed-by: Boris Dušek <me@dusek.me>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Calling applicationName() in the destructor of a global static (e.g.
via QLockFile) was working when calling setApplicationName explicitly
but otherwise it would suddenly return an empty string.
This led to inconsistencies, the application name switching from
non-empty to empty at saving-on-destruction time.
There was already a global static, used when setting the app name
explicitly before construction. Use it now to store the app name
in all cases (explicitly set, or fallback).
Change-Id: I71d3a0c40158f8bfd022c385b198346a2594b1cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And add tests for the GCC intrinsics and for std::atomic.
Task-number: QTBUG-43794
Change-Id: Ic5d393bfd36e48a193fcffff13b9b2dbaee80469
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This has been known to be broken for a while. Now it works: you can bind
and you'll retain the port (and the file descriptor) for the connect
call. Incidentally, in fixing the binding for more than one IP for the
hostname (with event loop), this commit fixes the setSocketDescriptor
XFAIL.
[ChangeLog][QtNetwork] Fixed a bug that caused both QTcpSocket and
QUdpSocket to close the socket and lose any bound ports before
connecting. Now bind()/setSocketDescriptor() followed by connect() will
retain the original file descriptor.
Task-number: QTBUG-26538
Change-Id: I691caed7e8fd16a9cf687b5995afbf3006bf453a
Reviewed-by: Richard J. Moore <rich@kde.org>
This continues 68762151db
When doing format conversion, the optimized inplace codepath did not
check if the image data was external, i.e. if the QImage had been
created by the constructor taking an existing external buffer.
The previous commit fixed the readonly case. But in the case of the
QImage constructor taking non-const uchar*, data will be read-write,
but still external. This would of course crash if the converter tries
to realloc it.
Task-number: QTBUG-44610
Change-Id: I94d275d464e8af221682b538fc3e4897a59c061e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
www.example.com is a reserved domain (RFC 6761), but IANA is running a
web server there. As for www.foo.com, that also exists, is a real
website and is often content-filtered in corporations (it triggers a
firewall warning for me -- "You attempted to visit a site that is in
violation of Intel acceptable use guidelines").
So use a localhost instead, since we don't actually need to connect to
the servers to do the work. And since we don't need to connect, I chose
port 4 as it's extremely unlikely someone is running an HTTP server
there (/etc/services lists it as unassigned).
Change-Id: Ia0aac2f09e9245339951ffff13c82439c6d5f945
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Improves the conversion from RGB888 to RGB32 on platforms without SIMD
versions. This includes the fallback used on non-neon ARM devices.
Besides image conversion the routine is also used for decoding JPEG.
On x86 this version is within 0.7x of the speed of the SSSE3 version.
Change-Id: Id131994d7c3c4f879d89e80f9d6c435bb5535ed7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
There's no need to decode the event details here anymore, and anyway
this had a bug: it always said the device is unknown.
Change-Id: If99dddbe2136d95e818f4fe526f62650cbd7c1ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This reverts commit 24c52bd44b and makes
the Qt unit tests requiring DNS zones to use the temporary test zone in
macieira.org (Thiago's domain).
Change-Id: Ia0aac2f09e9245339951ffff13c6d3752c83b773
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Previously QPluginLoader("/foo/bar/plugin").fileName() would return an
empty string even if /foo/bar/plugin.so existed, now we correctly find
that file.
Change-Id: Ibf6ba329e92956de45f695be65773caacf14050a
Reviewed-by: David Faure <david.faure@kdab.com>
According to the Qt naming policy, methods that return value(s) via
the mutable parameter(s) should have "get" prefix to mention that.
[ChangeLog][QtGui][QQuaternion] Added methods to convert a quaternion
to/from Euler angles and to/from rotation matrix.
Change-Id: I95704e1f4623dc4ca54cd237ea203539fb60d452
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Otherwise, values that are composed of others are not handled
correctly. For example,
Qt::Dialog|Qt::FramelessWindowHint (Qt::Dialog=0x2|Qt::Window)
is currently output as
"Window|FramelessWindowHint" since
Qt::Window matches first and its bits are removed from the flag value
so that Qt::Dialog in the next iteration no longer matches.
Change-Id: I67db5c977c75f887392aa8f345c5e6e9d82c5c26
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When doing format conversion, the optimized inplace codepath did not
check if the image data was readonly, i.e. if the QImage had been
created by the constructor taking an existing external buffer.
Task-number: QTBUG-44610
Change-Id: I085ff8da427bc4ee392f548dffd2418b63148965
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Some older (or weird) Linux distributions don't have /etc/os-release, so
let's try to read /etc/lsb-release instead. If we find a file called
/etc/<distronamelowercase>-release and it's bigger than the pretty name
we read from /etc/lsb-release, use that.
Because the order of the keys changes between the two *-release files,
we can't do a sorted search anymore.
Change-Id: I1a800c709d3543699131ffff13c48532d5074f3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Dirk Hohndel <dirk@hohndel.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make styleHints a static member variable of QGuiApplicationPrivate and
fix accessor accordingly. Extend tst_QApplication::settableStyleHints()
to run without QApplication instance as well and add a similar test
to QGuiApplication.
Task-number: QTBUG-44499
Change-Id: I42b92ef38f7dd512d08d70accfa7dd4f09a22f01
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Add command line test application that can print
the mime type of a file or dump all mime types.
Task-number: QTCREATORBUG-13996
Task-number: QTCREATORBUG-14005
Change-Id: I5ef2fa4b9fbab986b1db4fc0bd8abaacdf4f8fa0
Reviewed-by: David Faure <david.faure@kdab.com>
the existing test is a blackbox test. this one is going to be different.
the first test is a bit trivial ...
Change-Id: Iba1b0b5c32490677551ee92c36f381b884c2765d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Currently Qt uses the QPlatformIntegration::StyleHint
SynthesizeMouseFromTouchEvents to check whether to synthesize mouse
events from touch events. But not only platform plugins can produce
touch events, they can be created by e.g. QTest::touchEvent() and in
this case we almost definitely need synthesizing regardless of the
platform.
This commit introduces a QTouchDevice::MouseEmulation capability which
replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents.
So it's possible to pass QTouchDevice without this capability to
QTest::touchEvent() and be sure that mouse events will be synthesized.
Notice that touch pads always emulate mouse events.
As a result we can activate some tests which were disabled for specific
platform configurations by commits 6c1670d8c2
and e9760f1559.
Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
On platforms which does not have at all sysv support, all
posix ipc tests and compilation failed because sysv
specific header files were included unconditionally.
Change-Id: I5713ace6daeb6e79f8794ce42b2b3dfa1b95ab2d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The files were moved to a qrc resource, so the string is never empty,
we need to use QFile::exists to make sure they exist.
And the error message was wrong, pointing to current dir.
Change-Id: I532bda9f6221fb5c69b779b8b48baac9ede90eba
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
This test accidentally causes the screen reader (in newer Gnome
environments) to be launched. This messes up the CI machines enough that
nothing works afterwards. Disable the whole test until I write the
proper fix. We don't lose anything because it was marked as
insignificant anyway.
Task-number: QTBUG-44434
Change-Id: I410e80580977178ea99a370c6c0909d1fb49a71c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Actually, it tests the buffered QTcpSocket. Place it in
tst_qtcpsocket.cpp instead of tst_qabstractsocket.cpp.
Change-Id: I3055c4773d0de74c238be4f11b2d1c07ddad4485
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QCommandLineParser] Added support for hiding options
from the --help output, with QCommandLineOption::setHidden(true).
Task-number: QTBUG-44298
Change-Id: I62cc2a55428365c0bcc79d2e47c72c0c92104e74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Those QTimeZones failed to convert to other timezones because the data()
virtual function was never overridden and reimplemented. That meant all
QUtcTimeZonePrivate objects were *really* UTC, with no offset.
Task-number: QTBUG-44600
Change-Id: Ia0aac2f09e9245339951ffff13c5294bb783c674
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The c2m() function which converts a const_iterator into an iterator
is a broken concept for an implicitly shared container such as
QVector, because the act of calling begin() as the starting
point already detaches and invalidates the c2m argument.
This could be fixed in c2m, but the bug wasn't even in c2m,
but in removeAll(), which called end() before c2m, so the c2m
argument was already invalidated when entering c2m.
The solution is to store the positions as indices instead of
iterators before calling the first detaching function.
Task-number: QTBUG-44592
Change-Id: I66cf4f1277e71148a4d5b5bbfb6a3369ad02db68
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
As requested in review of 1d2efe1f27.
I didn't add a comma in front of the timeSpec() as the other fields
aren't separated by commas, either.
Change-Id: I54d74b7199ca7e46e28d2ceca22b02205e318c90
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This slipped in with commit 1d2efe1f27,
but is of course completely bogus (though harmless).
Change-Id: If3875b65af0fa3fe85216391599433158043e361
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reasons:
- the PlayBook NDK is old and its compiler does not keep up with newest
C++11 improvements inside Qt code.
- the PlayBook NDK diverges considerably from the standard BB10 NDK,
making it non-trivial to keep a common codebase.
- It's a defunct platform.
- Maintenance time is limited.
[ChangeLog][Platform Specific Changes] Removed BlackBerry PlayBook support.
Change-Id: Ia338aff55f4e4b747ebdecb0e1463a369a656c03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
To make the test compatible with cross-compilation, we need
to bundle test data in qrc, and then extract files to the file
system during initialization. We did this for Android before,
but the change is required on many platforms and since it will
also work on desktop platforms, we consistently just do it this
way everywhere.
Change-Id: I7f65bd9e1dd6f217e6adffda44a40da7599cfe72
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Introduce a template function to determine the special values
via macro and use that for QVariant::Double and QMetaType::Float.
Task-number: QTBUG-44381
Change-Id: I379dd82b22d467b0aebaa42f4f0f5c52472a5c47
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Use correct path for executable file.
Change-Id: I50283fc43fe6561cb8eb687f739f21a3d5cbadbd
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Add one tag class for each of QList's three different memory layouts
to QListData, and inherit QList<T>::MemoryLayout from exactly one of
them.
To simplify overloading, added tag classes that express the negation
of the two extreme poles of memory layout (C-compatible and heap),
too. The "missing" one could be added when needed, too.
Change-Id: I45ea603731499fd3fdfb37d60a0a98fb22ac15ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The Movable type, surprisingly, was as large as sizeof(void*), so on
32-bit platforms, we were not testing the QList memory layout where
items are placed directly into the void*-slots, but are too small,
leaving gaps.
Fixed by making sure that Movable is smaller than void* and adding
a variant of Movable, Optimal, that is guaranteed to be the same
size as void*, and replacing the int tests with tests of Optimal.
Had to demote the State variable to uchar, since MSVC will apparently
not make a collection of bit-fields smaller than the largest type used
in any of the consituent bitfields, so State s : 8 wouldn't work.
Change-Id: I4f0e24bd6928f076b4ce60e8d977d5d98a724161
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The /tmp directory doesn't exist on Android, and the test needs
a directory that it can cd into which is one level above root.
So we just use /system which should be available on all devices.
Change-Id: I8e6a15f278429491fd871f87af497e5d7184ddf8
Reviewed-by: BogDan Vatra <bogdan@kde.org>
When the default font has the pixel size set instead of point
size, then pointSize() will return -1 and the output from the
HTML will include the pixel size instead. This happens e.g.
on Android when we extract font information from the system.
Change-Id: I26dc49fff215c9887cf0b78dcfff88df0f74450d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Most of the time the widget passed in to finish() will not yet have a
window handle so it would just call close() straight away. This
way it ensures has a window handle.
Task-number: QTBUG-35757
Change-Id: I2e212a2ea496cc4e4bba57a8c2d0d127afc43e48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
The problem is that the operator<< was taking a non-const reference to the QDebug
object. This causes a problem as all other operator<< return a temporary.
Since every other roperator<< takes the QDebug by value, we should also take it by value
in this case.
Move the operator<< in qdebug.h because i don't want to #include qdebug.h from qobject.h
And move the qt_QMetaEnum_debugOperator to be in the corresponding .cpp
Task-number: QTBUG-44462
Change-Id: Ia01629224c58930c2997e767efc43de90d6309e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
We must do something when requestUpdate() is called on a QWidgetWindow.
The semantics of UpdateRequest for QWindow and QWidget are unfortunately
different: for widgets an UpdateRequest means "sync the backing store".
For QWindow it also involves marking as dirty.
Change-Id: Idf40b3fc0873652dc081edeb12c96b3007a126ef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Instead of constructing a QString that describes the QDateTime
instance, stream the constituents of the string into QDebug
directly, using op<< for Q_ENUM, now that it's available.
Adapt test to new format of enums.
Effects on Linux GCC 4.9 stripped release builds:
text -1068B
data +-0B
relocs +-0
Change-Id: I1a5ce28904edd7d0f6c8d982fd41c52e3536e036
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtWidgets] Added QPlainTextEdit::createStandardContextMenu(QPoint)
overload that takes the position in document coordinates. This method enables
the actions that are sensitive to the given position eg. where the user clicked.
Change-Id: I47ed7a1afc4fcfb3318c9b7af37867aeb7f2aa35
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Similar to what we've done to QString, only we print each byte that is
not ASCII as \OOO (octal representation).
[ChangeLog][QtTest] QtTest now prints an escaped version of
QByteArrays that failed to compare with QCOMPARE, instead of the hex
dump.
Change-Id: I6a8c43f138c66c998280998a242b43cd579666a0
Reviewed-by: Richard J. Moore <rich@kde.org>
Currently QDBus relies on a key in QMetaClassInfo to understand the DBus interface name.
This patch allows QDBus to also use a specified interface name in the registerObject call
instead of relying on QMetaClassInfo that might not be there (if the QObject was created
in QML or Javascript for example).
Change-Id: Ie02b2c67e7deb07f43e35eb166c11833fcbf38f3
Task-number: QTBUG-44074
Reviewed-by: Kevron Rees <kevron.m.rees@intel.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Add support for reading out feature lists from GPU bug lists
in Chromium format (supporting OS + version, exceptions lists,
device ids and vendor ids).
Add a overloads allowing for passing file name,
data or JSON documents.
- Test reading in tst_qopenglconfig
- Prototypically have the Windows plugin read the file
from the environment variable "QT_OPENGL_BUGLIST" and
turn off renderers depending on the standard keyword
"disable_d3d11" and newly introduced keywords
"disable_d3d9", "disable_desktopgl".
- QT_OPENGL_BUGLIST can point to an absolute or relative
path, in which case it is resolved via QLibraryInfo::SettingsPath
and QStandardPaths::ConfigLocation.
[ChangeLog][QtGui][Windows]
Introduce experimental feature allowing the user to specify
a GPU driver buglist with some additional keywords to chooose
the GL renderer backend depending on GPU.
Task-number: QTBUG-43263
Change-Id: I8c20b0e8ee3cf575b91d0672bf405c42d3e9fb64
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
On Haiku the '/' filesystem is a pure namespace to mount
in the actual root partition (/boot), and therefor returns
0 for free/available/total bytes.
Change-Id: I60d4786389e01ee271f6cd1aba6f96b19e6a828f
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Remove the ia32 data since there are no linux x86 machines in
the CI system (which makes the data useless from an automated
testing point of view) and most people use x64 these days anyway.
Change-Id: Ifdf8850767869eb2706e2a9d6396314d1fb25500
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
This operation is the exact opposite to QQuaternion::fromAxisAndAngle()
(so that it is a way to extract the axis and angle values suitable
to create the same quaternion via QQuaternion::fromAxisAndAngle()).
Change-Id: I41fda58f5fb2b867cccd6b2faf58ab671fa070da
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
We've been setting the -Zm argument since the dawn of times (even before
the first git commit). Anyhow, MSDN from VS2008 onwards indicates
that this is not needed:
"In earlier versions of Visual C++, the compiler used several discrete
heaps, and each had a finite limit. Currently, the compiler dynamically
grows the heaps as necessary up to a total heap size limit, and requires a
fixed-size buffer only to construct precompiled headers. Consequently, the
/Zm compiler option is rarely necessary."
[ChangeLog][Compiler Specific Changes] Visual Studio: -Zm200 (an option to
specify the precompiled header memory allocation limit) is not added anymore
by qmake to the compiler calls. If you encounter an C1076 compiler error you
might need to re-add it in your .pro file.
Change-Id: Ia4bec7eba09d893a7d81886a1814602b9ce7563c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QTextFormat::font{Weight,PointSize}() etc. return the font trait explicitly
set on the QTextFormat, while QTextFormat::font() returns font which also
uses the QTextDocument::defaultFont() as a default for any font traits not
explicitly set on the QTextFormat. Accessibility support for text attributes
used the former, which was wrong; this commit fixes it to use the latter.
Also includes tests to verify the fix.
Change-Id: Iab7f2be1b68adaad847d1f29c9e5af2195416035
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Secure Transport relies on keychains, both client/server are constantly
updating default keychain and as a result tests are failing: when
verification is expected to fail, it succeeds; when the number of certificates
is expected to be 1 - it's 2 (Secure Transport can find certificates in a keychain).
This makes verifyClientCertificate test quite useless at the moment - QSKIP it.
Change-Id: I578398b4912a86dc60f585ac5a1bdd0098914005
Reviewed-by: Richard J. Moore <rich@kde.org>
There are many direct QImage conversions that doesn't need to be direct
but only are because they are faster than the generic conversion. This
patch optimizes the generic conversions and then removes all the direct
conversions that are now no faster than the generic.
Change-Id: I3dc5f44cc7f6358fd66420e9974eebaf2c7ca59c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Re-enable tests that were skipped because of open, now closed, bugs.
Change-Id: Ic7dbe0a9cf74df1e69550536d5923a62e2186b6f
Task-number: QTBUG-26424
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
There are more than 1000 new entries since the table has been
generated the last time.
Some auto tests needed to be adjusted, because some entries in
the TLD table were removed while others were added.
Change-Id: I4ceec392836d2031dfef49a0c5a857c31b36bb4c
Reviewed-by: Richard J. Moore <rich@kde.org>
Adds conversion from QJsonArray and QJsonObject, and report missing
conversion failures for other QJsonValues.
Change-Id: Ic0c3a952657912401db877b068f7fcc3c08c94c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QPlatformTheme::keyBindings() performs a binary search
into an ordered list of StandardKey -> Key Sequence
mappings where each StandardKey can have multiple
key sequences.
Previously the order of the Key Sequences in the
returned list would be indeterministic and, except
for the designated pri-1 key sequence, would not
necessarily correspond to the list order. (The
ordering was dependent on where the binary search
"hits", which again depends on the size of the list.)
This caused trouble when adding mappings, since it
would change the order in the returned key sequence
list for existing mappings and confusingly cause
(apparently) unrelated test failures.
Fix this by replacing the manually coded binary search
with std::equal_range.
One test case needed to be fixed up because it had the
result in the wrong order (verified by looking at
QPlatformTheme::keyBindings).
Change-Id: I555ca2736b1a8e6454dc79645a8246f80119cfc2
Done-with: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Change-Id: I643049a865b0a8936e132e12f7845d5527f4f808
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Use an existing, non-symlinked directory for the unit test.
Change-Id: Ice9976a4fd10c42c3cb014614ccd699bcea1065f
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: If43dcc2b77fea5ae3ec40cc847467fc21fbd2c83
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
QAbstractSocket::close() always calls QIODevice::close(), which resets
QIODevice's internal read buffer. So it makes no sense to make same calls
from disconnectFromHost(). This made the closeCalled private member
superfluous.
Change-Id: I4ec64e9711490e44e737763e4ed7fb41bffe2556
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Optional parameter DESTINATION to set target rcc file
Example:
qt5_add_binary_resources(GenerateFixture "fixture.qrc")
Task-number: QTBUG-41728
Change-Id: I9dc2fe8e7d5e9ad3873b89f75ab84a2a1b9d1d29
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Outdated header.LGPL removed (use header.LGPL21 instead)
Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)
Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination
Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
This only occurred if the item added was the only item in the last
row/column, since then the the internal grid failed to expand
(in this case it would always call expand(0, 0), which would not
create the extra row/column).
[ChangeLog][QtWidgets][QGridLayout] Fixed crash that sometimes happened
when adding items with spans that spanned to the bottom/right edge.
Task-number: QTBUG-38052
Change-Id: Iba95f6d9d9356b4d1c84c7b93f4af9b4ea0cf714
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Adds an SSE4.1 optimized version of qUnpremultiply and uses it in the
most drawing conversions methods. This gives a speed-up of little over
2x.
Change-Id: Ieb858a94ada1eb86d7af715ac1a100f1587f360d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Unify the behavior of the different operator<< by always using
QDebugStateSaver (appending an optional space at exit), and making
sure that the space(), nospace() setting isn't 'leaked'.
Change-Id: I38e4f82fa6f7419d8b5edfc4dc37495af497e8ac
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
This adds tests to check the behavior of a QSslSocket-based server when
presented with various client certificates.
Change-Id: I431157e46cfb00880ae8b7a33015cce50e56b6bb
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
This message is just informal, and not really relevant to the test case.
qtbase can now be built with -Werror=date-time
Change-Id: Ic14289f2f801d5a6e811869e60afb9691c7ca98b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
So if you stream enum type into qDebug, it will show the name
of the enum value instead of the int
Change-Id: Iec5e826623353560319890d3e7c4ab97d0645f4a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
In Qt4, if the result of the translation
QApplication::translate("QT_LAYOUT_DIRECTION")
returned "RTL", Qt usually called
QApplication::setLayoutDirection(Qt::RightToLeft)
in order for a translation file to specify if the UI should be
left-to-right or right-to-left.
However, due to modularization, we could no longer call
QApplication::translate(), so the code was wrongly changed to call
QCoreApplication::translate(....) instead.
This was wrong, and in addition the translation files was never updated
with the new context.
This patch fixes it to only translate it with the QGuiApplication context.
This is the only sensible context, since QApplication would lack QtQuick
support, and QCoreApplication would not know how to change layout
direction.
[ChangeLog][QtGui][i18n] Fixed bug where layout direction did not switch
according to the instruction in the translation file.
Task-number: QTBUG-43447
Change-Id: Id0409a42d41b3b9ff1cd53d090c4d9c9802f5659
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
... but choose HTTP/1.1 and continue connecting anyhow. According to
the NPN spec, actually we should choose SPDY:
"In the event that the client doesn't support any of server's protocols,
or the server doesn't advertise any, it SHOULD select the first protocol
that it supports."
However, some tested servers did not advertise anything and did not
support SPDY, so blindly trying the newest protocol would fail. We are
conservative in that case and choose HTTP.
Task-number: QTBUG-40714
Change-Id: Ia8aaf01fea74e13d9e4416306f85f1890b25559e
Reviewed-by: Richard J. Moore <rich@kde.org>
Disable top-level widget code path for embedded widget in the show
helper.
Task-number: QTBUG-43780
Change-Id: I574e07130e5e68a019a426cee3fde982f3883720
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Check by comparing __argc/__argv whether a modified argv was
passed to QCoreApplication. If that is the case, build
QCoreApplication::arguments() from that argv instead of using
the command line.
[ChangeLog][Important Behavior Changes][QCoreApplication]
On Windows, QCoreApplication::arguments() now returns a list built
from argv on Windows as well if a modified argv was passed to the
class' constructor.
Task-number: QTBUG-30330
Task-number: QTSOLBUG-184
Change-Id: I2498bb554130e7bfaeada3aebe786dfdd0eb534d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We shouldn't create QPixmaps when comparing QBrushes that do not
contain a QPixmap.
This patch extends the comparison logic to comparing QImage cachekeys
if the brushes are QImage based.
Note the comparison still produces false negatives on equal content on
different pixmaps and images, but this is preserving existing behavior.
Task-number: QTBUG-43766
Change-Id: I001b4032172c1e568aad311f7df2eaae6aee8dc6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The autovectorized versions of premultiplying conversions are almost
twice as fast with SSE4.1 as with SSE2. Therefore this patch lets
compilers that can make those versions convenient without duplicating
code do that and lets us use them when available.
Change-Id: I699035963abe55a38b9ef8ba7b4a8c961c8dfcdd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Change-Id: I6b551de331aa0386ea53d8e96f50b669777d2d69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
... as newer versions of nmake (and jom, for compatibility) have botched
circumflex processing (they simply don't do it when shortcutting the shell
evaluation).
as a side effect, the output is also more readable if the string contains
quotes.
Change-Id: I0506b59ceecb70da258c482f9973156b2803066d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
don't complain about various missing things resulting from replacing
default_pre.prf and having a private .qmake.cache.
Change-Id: Ie3471b514ebb1a80b72a480144551b56b5c7a254
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Move these types to QAsn1Element so that they can use the toString()
method which guards against malicious ASN.1.
Change-Id: I7d6155147a6fc2d41da6f3ae87551b6cb75aa9ce
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
We don't currently use this class for critical things like hostname
verification however we still want to ensure that it is not possible
to trick it using ASN.1 strings with embedded NUL characters. This will
avoid problems in the future.
Change-Id: Ibf3bc142a94fc9cad5f06db50f375399a087f9dc
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
This requires being able to create a QItemSelectionModel
without specifiying its model, and also setting the model
later. Also, several classes, like QPersistentModelIndex,
need to be declared as meta-type.
Finally, and in order to introduce the 'model' property,
we need to have a type compatible getter. Hence the new,
non-const model() function.
Where needed, meta-type declarations have been removed from
auto-tests.
[ChangeLog][QtCore][Item Models] QItemSelectionModel
can now be created without a model and have one set later.
Change-Id: If49bed061a5d1012331f335ca7f6e3959ecd3f1c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
The methods for inplace conversion from RGBA to ARGB was misplaced by
one step causing conversion to RGB16 to get an invalid method.
Change-Id: I3b2b4cffe993705c48613eec7d9b7c6213f57fc2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
We still have a bunch of Q_WS_ ifdefs in our code, which are easy to
mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming
the ifdefs we make it clear that the code in question is dead.
In incremental follow-ups, we can then selectively either remove, or
port, the pieces that are dead code.
Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.
Length is supposed to be equal to the section items length, but the state saved might be corrupted.
Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Ctrl/Ctrl+Shift should not cause any characters to be input
(as opposed to AltGr(Alt+Ctrl) as used on German keyboards).
Extend the tests in QLineEdit and QPlainTextEdit to
check the modifiers, remove test from QTextEdit
since it is handled by QWidgetTextControl.
Task-number: QTBUG-35734
Change-Id: Ie0004fac68cf840c68247f27547e84b021355cd2
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
This commit fixes incorrect logic of icons' lookup if there are
fallbacks or more than one theme's directory.
According to Icon Theme Specification, Directory Layout section, theme
can be spread across several base directories by having subdirectories
of the same name. This makes possible to extend system themes by
application-specific icons without making of collisions with other
applications.
According to Icon Naming Specification, Icon Naming Guidelines section,
icon name may contain dashes to separate levels of specificity in icon
names. This makes possible to set in application very specific icon
which may be not in every theme. So it can fallback to less specific one.
Change-Id: Iafc813902a3646be56e8f1d3a2fdbf8fd32ac542
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Add some parts of the qtdiag tool as a qtbase test to output the
graphics configuration to the CI log and to verify that Open GL can be
initialized for platforms on which the qopengl test is marked as
insignificant (for example, ANGLE).
Change-Id: Id445e57928e0307ad38cd433c52a62501f1097c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
If a QBrush has been created without QPixmap the texture() method will
create one. This patch avoids that in several places by checking the
type of the texture brush before accessing it, or not accessing it at
all.
Task-number: QTBUG-43766
Change-Id: If6009fe1d5bd51b239ae2c838e5c3b904b56b11a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
CppCat detected duplicate sub-expressions in the code that checked for
BottomLeftSection and BottomRightSection. It was fairly obvious to
see what the values should be.
Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Add support for SSL on iOS/OS X by adding a SecureTransport based
backend.
[ChangeLog][QtNetwork][QSslSocket] A new SSL backend for iOS and OS X,
implemented with Apple's Secure Transport (Security Framework).
Change-Id: I7466db471be2a8a2170f9af9d6ad4c7b6425738b
Reviewed-by: Richard J. Moore <rich@kde.org>
With auto-vectorization enabled in QtGui, the 32bit version of
qPremultiply is faster than the 64bit version since it can be vectorized
wider (4x on 128bit as opposed to 2x). Since all our important 64bit
targets have SIMD, that makes the 64bit version pointless.
Change-Id: I4e9070a3a3c8e2b54f17a95ba0aee0405cbb8ec9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The class hasn't been used for a while anymore. Since it's
private, simply remove it from QtGui.
Change-Id: Ia0911d1c8b8836d963a51c8e354c96bc1ee4093f
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Mainly because of a change in certificates which is causing failing
tests.
Change-Id: I8304e5ac4107428a250b71be5df7b5399a811017
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
We expect floating-point math to be IEEE754 compliant.
Change-Id: I2b257177f2ef5fce38ac4d8fd76f746dc7b9fc15
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We would return true when opening assets in read/write mode despite
the fact that the files are not writable. The logic now matches
that of the qrc file engine.
This also adds a unit test for Android-specific issues.
[ChangeLog][Android][Important Behavior Changes] Opening assets with
QIODevice::ReadWrite now returns false to correctly indicate that the
files are not writable.
Change-Id: I019cc27861fc9b000dc13c5e0a38c0fc09a08671
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Mainly because of a change in certificates which is causing failing
tests. This patch is cherry-picked from
https://codereview.qt-project.org/104619/
Change-Id: I8304e5ac4107428a250b71be5df7b5399a811017
Reviewed-by: Richard J. Moore <rich@kde.org>
ItemIsTristate means QTreeWidget determines the check state of parent
items based on the check state of child items.
Checking/unchecking the parent propagates to children; but setting
the parent to PartiallyChecked shouldn't do that, especially since it can
lead to children without ItemIsTristate having PartiallyChecked check state.
Change-Id: Ibc8b7c77d9ec4c1578c07f3c62581edb770f8439
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
ItemIsTristate is now again purely for enabling the automatic management
of the check state of QTreeWidgetItems, while ItemIsUserTristate is
separate from that and lets the user select the three states manually.
This restores the original behavior of ItemIsTristate for QTreeWidgetItems,
which got broken by letting the user cycle through the states too.
[ChangeLog][QtWidgets][QTreeWidget] Restored Qt 5.1 behavior of
QTreeWidgetItems with ItemIsTristate to enable automatic management
of the check state. User-editable tristate checkboxes are now enabled
by setting the new flag ItemIsUserTristate.
Task-number: QTBUG-40060
Change-Id: I341f5e983804d3b4f27982520bb6647f3014cccc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Due to a flaw in the internal API, QXmlStreamReader's internal buffering
would mistake a NUL byte in the input stream for EOF during parsing, but
wouldn't set atEnd == true because it hadn't yet processed all bytes.
This resulted in an infinite loop in QXmlStreamReaderPrivate::parse.
So, instead of returning zero (false) to indicate EOF, return -1 (but in
unsigned form, ~0, to avoid ICC warnings of change of sign). In turn,
this required enlarging a few variables to avoid ~0U becoming 0xffff,
which is a valid QChar (could happen if the input is a QString, not a
QIODevice).
Task-number: QTBUG-43513
Change-Id: If5badcfd3e4176b79517da1fd108e0abb93a3fd1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The patch adds convenience functions for working on C++11's new char
width specific unicode strings u16string and u32string.
[ChangeLog][QtCore][QString] Added methods for convenient conversion
to and from std::u16string and std::u32string.
Change-Id: I67c082e4755c592d61daaaaa70c8867ef0b23dcb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QNX posix_spawn() implementation actually allows for detecting whether a
non-existent process has failed to start.
Change-Id: Ic1bf8da0d4636f1d7d9b7b4cf6ad45376f6df0ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Most posix_spawn implementations are done using fork(), so the only way
to report errors afer fork() is via a special exit code.
Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html
Change-Id: I3a37f81b0cb278bb31e5cb83c87e6b4c034dbc19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Replace the existing code in QProcess that dealt with signaling of child
processes exiting with forkfd and spawnfd. The previous code was
convoluted and hard to maintain, having shown its age in the last
year. I've been running it for a year and a half and the new
implementation is definitely an improvement.
This change replaces support for the QNX Neutrino spawn() call with the
POSIX version. We lose the ability to do setsid(), but we gain quite a
few ioctls() that were done to fill in the file descriptor mapping
structure. That's also the only OS for which we have the ability to
thread-safely chdir() before the call to spawnfd().
Another advantage is that forkfd does not require a dedicated thread
running to handle child processes exiting.
Change-Id: I5eb76821dfdb6a8ed2989d7f53b3c31e515c3174
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
The previous implementation required one syscall per child we're waiting
on to see which one exited. That means the algorithm was O(n).
This implementation uses WNOWAIT to find out which child exited and then
goes straight to that one. So it's O(1) on the number of children, but
runs 2 * number_of_children_that_exited + 1 syscalls, assuming there are
no race conditions with other threads. If there are or if a child not
started by forkfd exits, we'll still iterate over each child we're
managing to see which one exited.
It modifies the existing code so that it will do a waitid() with WNOWAIT
to check on the status of the child: if the child has exited, we'll try
to lock the entry so only one thread will do the final wait(). In the
case we read the PID, then the child exited, was reaped by another
thread, the PID got recycled and that child exited again, we'll fail to
lock the ProcessInfo entry so no harm comes. If by an absurd coincidence
this other child was started by forkfd() and its ProcessInfo is exactly
the one we are looking at, then we'll succeed in locking but that's a
benign race: we'll do what the other thread was trying to do and the
other thread will give up.
Future improvements to the algorithm are discussed in the Gerrit change.
Change-Id: Ie74836dbc388cd9b3fa375a41a8d944602a32df1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The most common use case for QTextStream::readLine() is reading
a file line by line in a loop. The existing readLine() method
allocates new memory for each line, that results in a loss of
speed. The introduced overload can use already allocated memory.
Besides it allows you to not think about filesystem specifics.
The current QFile documentation suggests a separate way to read
files from /proc filesystem. With this overload it's possible
to use the same idiom in all cases:
QTextStream in(&file);
QString line;
while (in.readLine(&line)) {
process_line(line);
}
The idea was inspired by the blog post of Ivan Čukić:
http://ivan.fomentgroup.org/blog/2014/10/03/api-design-and-impact-on-the-performance-qt-vs-stl-example/
Change-Id: I0c62b4a52681870589bc099905e83ed69e03dd40
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
rawMode only has an effect under X11 in pre-QPA times.
Change-Id: Iaff8fed8f4ae5af5dd0399bb3ebd9d590a39a758
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This was available before but was protected with the wrong define for OS
X, so this is changed to the right define.
Task-number: QTBUG-23696
QTBUG-23703
Change-Id: I669a6cf2ff7c01020693adff9f04a4b8b9404d02
Reviewed-by: David Faure <david.faure@kdab.com>
QDebug does not have noquote() in Qt 5.3.
Task-number: QTBUG-44021
Change-Id: If35b926d6b1e5bb9ad3534357630533dfcecd076
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
When checking for completion on the file system, we need to check
for directories that actually exists.
Change-Id: Id83e3802abcd40355dcd8cd47f2d55061eacd117
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
[ChangeLog][QtNetwork][QSslSocket] It is now possible to use TLS PSK
ciphersuites in client sockets.
Task-number: QTBUG-39077
Change-Id: I5523a2be33d46230c6f4106c322fab8a5afa37b4
Reviewed-by: Richard J. Moore <rich@kde.org>
Equivalent of gluProject and gluUnproject.
[ChangeLog][QtCore][QVector3D] add convenience project and unproject methods
to use like gluProject and gluUnproject
Change-Id: I6e4e3e79ea6e34d1fb0c375e15185c950b699ef0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
When creating a temporary directory but failing to set its permissions,
we need to remove the directory we created to avoid leaving 256 empty,
unused directories in the destination folder.
This happens on Android if you try creating a QTemporaryDir in the
download path on the sdcard.
Task-number: QTBUG-43352
Change-Id: Ic88fb7572f1abd65e5c7d8882b59c95f4b22ed72
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bec1854cc0 introduced a regression:
when sorting a tree model, children items would not follow the sorted
parents any more (they wouldn't be remapped correctly), resulting
in crashes.
So, the fix needs more reasoning; let's revert the fix,
but leave the original test around for any subsequent attempt, and
introduce a new test which looks for the right behavior when
sorting trees.
This commit partially reverts bec1854cc0.
Task-number: QTBUG-43827
Change-Id: Ic83ac53aef639f870f6c36a8b4b2992f5b485b13
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
(cherry-picked from qtbase/e9ad46ed412987e3e46c5a641e5f30408b97ac90)
The documentation says that QUdpSocket emits readyRead() only for one
datagram and that if you don't read it, the class will not emit again.
That should be implemented by disabling of the socket notifier once we
have the datagram already read, but was broken.
In turn, that breakage caused a live-lock of the event loop: since we
didn't disable the notifier nor read the pending datagram, the event
loop would fire every time for the same datagram.
The re-enabling of the notifier was already working.
Task-number: QTBUG-43857
Change-Id: Ic5d393bfd36e48a193fcffff13bb32ad390b5fe8
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The selection update is not implemented on other platforms (if needed at
all).
Task-number: QTBUG-39440
Change-Id: I8eb8c4eb1c23ba2d246bc95f1c77dc9da9e22495
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.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>
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>
We forgot to initialize the tracker if create() was used.
Task-number: QTBUG-43696
Change-Id: Ic5d393bfd36e48a193fcffff13b740931ff2204b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
For windows that do not have WS_EX_TOOLWINDOW set, the WINDOWPLACEMENT
API uses workspace/available aera coordinates. Introduce a helper
function to return the offset and use that.
Task-number: QTBUG-43872
Change-Id: I329c640f180524699b45b855b4583f447c4a0987
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Replace by QCOMPARE where applicable; introduce message to generate
output for failed comparisons with QVERIFY2().
Task-number: QTBUG-43872
Change-Id: I09c8f9fd31ceed224e441f253049f68907ca0d7a
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.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>
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>
The NSStrings return by QString::toNSString are autoreleased;
manually releasing them is not correct. The test still
works (no leaks or double deletes) since there is no
autorelease pool in place when running it.
We don't want to encourage incorrect usage: remove
the release call an add an autorelease pool.
Change-Id: Ic566fd3a8efd6cbc0eb6db850248a68bfc8fed0b
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Change-Id: Ie6c659f6d8e8b3eeaf2453f0cba6189d56f86581
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
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>
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>
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>
...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>
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>
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>
Makes it easier to add new tests.
Change-Id: I5c2bca60e125259eac83a03860e60ca85b51db24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This is in preparation of adding more tests.
It makes the test run longer, because of the additional book-keeping,
but if something goes wrong, it can pinpoint the circumstances better.
Change-Id: I4be68fcfbffe48e8609b722ea551b1f7c36790a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We tested button's AXDescription, which is however used only for
non-textual buttons (e.g. buttons with an icon and without a visible
text). On the other hand, button's visible text (which is our case) is
exposed in AXTitle (and not in AXDescription).
Change-Id: Ie89c758cf94b72ade3a440561c5f3df61a4c4612
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
bec1854cc0 introduced a regression:
when sorting a tree model, children items would not follow the sorted
parents any more (they wouldn't be remapped correctly), resulting
in crashes.
So, the fix needs more reasoning; let's revert the fix,
but leave the original test around for any subsequent attempt, and
introduce a new test which looks for the right behavior when
sorting trees.
This commit partially reverts bec1854cc0.
Task-number: QTBUG-43827
Change-Id: Ic83ac53aef639f870f6c36a8b4b2992f5b485b13
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
1) everyone forgets to do so (proof: tst_qnetworkaccessmanager_and_qprogressdialog.cpp
forgot too, which led to a valgrind warning, the elapsed timer was never started)
2) setValue(0) makes no sense if the progress dialog goes from 50 to 60,
or any other non-zero minimum value.
Fixed by starting the timer in the constructor (most code doesn't reuse
progress dialogs, so this fixes the most common case), and by also starting
the timer when calling setValue(minimum()) for well-behaved dialogs.
setValue(0) special case kept for compatibility.
Task-number: QTBUG-17427
Task-number: QTBUG-25316
[ChangeLog][Important Behavior Changes][QProgressDialog] The timer for estimating
the duration of the progress dialog is now started in the constructor and in
setValue(minimum()), as well as when calling setValue(0), as previously documented.
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: Ia8f7fc677438749191b99074fc334eab652ea36f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Output the current active/modal/popup windows when receiving
FocusAboutToChange or FocusIn events.
Task-number: QTBUG-42731
Change-Id: Ia88e9a9b41f7c80fb7a2a048b06da56d989ff18a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Until now, QSqlQuery::execBatch did not call resetBindCount, which lead
the next call to QSqlQuery::addBindValue to start at non zero index.
This is problematic in case of a prepared query which is called several
times.
Task-number: QTBUG-43874
Change-Id: I1a0f46e39b74d9538009967fd98a269e05aac6f2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The OpenGL windows should have some more obvious
transparent areas in them.
Change-Id: I7d000cd367208f99a79b11c341bf94062613f357
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This test requires test data to be available and the
testRetainSizeWhenHidden test assumes that a widget will be
sized based on its sizeHint(), which does not work on
platforms where show() implies showMaximized().
Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test needs to have a test environment available on the regular
file system, so we create this when initializing the test. In
addition we QEXPECT_FAIL one of the tests which seems to expose
a legitimate bug. A bug report has been created for this.
Change-Id: I7c90aea78a067815cb647a51db5d91a652a9fc1c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
On Android, the HOME and TMPDIR environment variables both point
to the application sandbox, whereas the QSideBar test assumed
they were different. We work around this simply by creating
a new directory and using this as the test dir in place of the
home directory.
Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This requires building a command line tool and running it using
QProcess, which is not a supported deployment option on Android.
Change-Id: I795374bf809a8e4d8634a55f5ebf1699ee9745d1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
The auto-hinter in the FreeType version bundled in Qt gives
slightly different advances on some glyphs. As noted in
the removed code, this was already observed on Windows and QNX,
and recently also on Android.
I'm sure it could also happen on platforms using the system library
if the system library was the same version as the one bundled in Qt.
Instead of expect-failing the test, we simply accept both the
observed results as valid.
Note that we need to accept 9 as a result for the default hinting
preference on all platforms, not just Windows, since the default
hinting preference in FreeType can be a system setting.
Change-Id: I3cc0f33f0f66dd64419770b37c10dee457706b5e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The files for the test have to be included in a qrc to be available on
Android.
Most of the image files are already in a qrc, but a couple were missing.
We add this in a separate qrc to avoid interfering with the tests on
other platforms.
Change-Id: Ibb24f5015a1aba4d5622e14f7aae80bc18611ec4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The algorithm searches for all executables in search path starting with
"tst_". Tests are not named like the folder they are contained in
anymore.
Change-Id: I360f293e43e30292fe0ae6230fd3ec7abf3d632d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
... in QCOMPAREs.
The implementation is hidden in a nested Internal namespace that retrieves
the strings without strdup()ing. That makes it easier to compose these
functions as there is no need to delete character arrays when using them.
The public interface (which qstrdup()s) is implemented on top of these.
[ChangeLog][QtTest] QCOMPARE now pretty-prints QSizePolicy{,::Policy,::ControlType{,s}}.
Change-Id: Ib03d969847e5a12474c71a7921366b400025f680
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reduces a bit of string duplication by relying on the constants
defined in qglobal.cpp and detection via uname(2), in addition to adding
the Linux distribution name as a selector.
Change-Id: I64a46a0fc552c399db787125b1b32aae5c50056f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
isnan is C99 and POSIX.1, which the older MSVC do not support. Use the
Qt equivalent.
Change-Id: Ic5d393bfd36e48a193fcffff13b8679cb83d12db
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>