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>
The c2m() function converts a const_iterator into an iterator, but
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 it's too easy for a caller to
cause iterator invalidation even before calling c2m, as QTBUG-44592
showed, so remove the function completely.
Task-number: QTBUG-44592
Change-Id: Ibde8cd1d78a412cc9fb621f743e52f74291aff4f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Effects on Linux GCC 4.9 stripped release builds:
text -984B
data +-0B
relocs +-0
Change-Id: Iff914e745939f183ba51b4e625ff795d6b44023a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This is preparation of moving all the helper classes into the unnamed
namespace.
Change-Id: I255eded0a8c9ff864889d0d23c022012d5fc1eab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This is preparation of moving all the helper classes into the unnamed
namespace.
Change-Id: I1028fc0b3661a58ca678f5bd839c64109c2a4884
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The dependency was introduced with change 8b0fcd87
Change-Id: I9b5eb3d30c30676313e65916f905f76596670260
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fixes unnecessary indirect return value and deprecated construction
of QString from QByteArray.
Change-Id: I4b654348285923ac1df39fc03784175ad6acb674
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.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>
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 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>
This structure is meant to replace QRgb where higher precision is
needed.
Change-Id: I49d441e2133371a8b91c2e6af0c137bcc5fcb9ed
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
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>
Attempt to get the accessibility bus address from the X display, to
match libatspi's behavior. This allows the accessibility bus to be
found when an application is running as root.
[ChangeLog][QtGui] Linux accessibility (using XCB) will now works for
applications launched as root
Done-with: Mike Gorse
Change-Id: I49a263571b328cbd1fd90cb7f5cb40919d2a4951
Task-number: QTBUG-43674
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.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>
A mistake in const correctness resulted in the incoming QByteArray
getting modified when it shouldn't. I have no ldea if this could result
in user-visible effects.
Change-Id: Ia0aac2f09e9245339951ffff13c8d8c6b4f909bd
Reviewed-by: Richard J. Moore <rich@kde.org>
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>
The compiler is wrong: the variable was used in the previous line.
However, the line had no effect for a type T that has a trivial
destructor, so the optimizer must have discarded the line and the
reference to the variable before the checker for used variables.
qsharedpointer_impl.h(247) : warning C4189: 'that' : local variable is initialized but not referenced
Change-Id: Ia0aac2f09e9245339951ffff13c8bde02bb46816
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Change-Id: I1692cf3eb34726c15eaa969a369bb97a89773bfd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
When support for documenting JavaScript was added to qdoc,
some tests qdoc uses to determine whether an entity is a
QML signal or a QML method were modified incorrectly, a
case of premature optimization. This caused QML methods to
be listed as QML signals in the documentation. This update
corrects those tests.
Change-Id: Ie6d5b43a03a6f3ae39982292cb9ad92952de0bff
Task-number: QTBUG-44825
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It turns out this bug was caused by modularization,
which created the situation where members of the Qt
namespace are in different modules. Most are in QtCore,
but a few are in QtGui.
qdoc was creating a namespace node for the Qt namespace
in the node tree for QtCore, and another namespace node
in the node tree for QtGui. This meant that there were
two NamespaceNodes for the Qt namespace. Correctly, only
one of these nodes contained the text for the \namespace
command for the Qt namespace. This was the namespace node
that was being used to create the HTML reference page for
the Qt namespace.
Unfortunately, the Qt namespace node in the tree for QtGui
was not being merged into the Qt namespace node in QtCore,
so some of the members of the Qt namespace were not being
shown on the reference page.
This update teches qdoc how to merge namespace nodes to
ensure that all the members appear on the reference page
for the namespace. There can be a namespace node for the
namespace xxx in any number of modules, but they will all
be merged into the namespace node for namespace xxx that
contains the qdoc comment for \namespace xxx.
Change-Id: I0f6a653ea6f920aacd5d8e13f9865488d95f6458
Task-number: QTBUG-44688
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
It was preventing some functions in the Qt namespace
from being documented and hence auto-links to these
functions failed.
Change-Id: Ie820eb7c8172deac40554e993e4d61a765a616f4
Task-number: QTBUG-44688
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
NSBorderlessWindowMask is just 0, not the 0-th bit, so testing
styleMask & NSBorderlessWindowMask never works, use
original flags instead.
Change-Id: I47da7b5b7795fce88dec88c948a68197fa428991
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
The Xcode project generator doesn't support exclusive builds, and always
runs as the default debug/release config, and with iPhoneOS as the target
platform. This means we need to parameterize the QMAKE_MAC_SDK_* build
settings to depend on the currently active SDK in Xcode, so that the
paths, when used in eg. linker flags, are up to date.
Change-Id: I9ca10f794e14ab440d98820657758b3fd8a7cdb0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The logic failed for cases like QT += core widgets.
Change-Id: Ic49c1a2314a4698b03956acbd6778b658326f3e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.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>
With use of pre-allocated buffer, there is always a good chance
to get the requested data with a single call.
Change-Id: I8fed718e15970ab345ce96a9405578947b59f311
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
After change f4b8697c40, it is normal
on X11 to have a null screen when all outputs have been disconnected
or turned off.
Change-Id: I97eeefd86d97701be50f0757fe5c53ca36d79aaa
Reviewed-by: Harri Porten <porten@froglogic.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.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>
Whenever a QWindow is associated with a QScreen, the screen is expected
to be a real working one, so that rendering continues to be possible.
This partially reverts 52f5e50f11
[ChangeLog][QPA][Xcb] If all QScreens (xcb outputs) are disconnected
while an application is running, QGuiApplication::primaryScreen() will
return null until a screen is connected again.
Task-number: QTBUG-40174
Task-number: QTBUG-42985
Change-Id: Id1b29dd70eaf3f2e7fd477516ce7e2bf24e095f6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
When destroying the QWindowsIntegration, the global instance is set to
null in the destructor. This is followed by a lot of additional steps
when destroying the members. Some of that cleanup calls to
staticOpenGLContext() which was not handling the case of the integration
global instance being null.
Change-Id: Ib74faf491d4c81635934547968ec91e9dceec6e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
it makes no sense to let every spec do that separately, as it's fixed
by the generator+shell.
putting it into a file which is loaded regardless of the spec also
allows us to remove the hardcoded fallbacks from qmake.
if somebody overrode the values in their spec for some weird reasons,
they'll need to override spec_post.prf.
shell-{unix,win32}.conf are now dummies and print warnings.
Task-number: QTBUG-37269
Change-Id: I66c24fb4072ce4d63fdbfc57618daa2a48fa1d80
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
A scheme is required to be able to run tests through Xcode, even from the
command line, but Xcode doesn't auto-generate the schemes until launched
as an application. Xcode also auto-generates schemes for all our targets,
but we only need one for the primary application target.
Change-Id: Ia42f3825aba3ffde3be93be55e165d6284434853
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Change-Id: I2e58c22301a433208718c26b362b4dda2b891f0e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The latter location resulted in the wrong SDK paths being resolved if
sdk.prf was loaded before default_post.prf through an explicit load(sdk)
call.
Change-Id: Ia443260572fbdf5f9ed1daf558c2962703274e32
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
If the user adds CONFIG+=bundle and doesn't set QMAKE_BUNDLE_EXTENSION,
we interpret that as a request to generate a test bundle.
Change-Id: Id4fbb64d39cddd6f95ac641a910a9d5543c30daa
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Gives a stack-trace at the point the error was caused, making it easier
to debug what's going on.
Change-Id: I0d65bb5061e9a97c142d41f6c99a1a1803cbe82d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Change-Id: I0928c4aaa0c308ee86b9611beeba3937b61e226c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>