The testlib selftest sets various things in the environment for
crashing tests; the generator for its expected output should set the
same things, as they affect what output is produced.
Change-Id: Iec2ed59982ea1043582573530c33619d8e8ed08e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
If the two lines have identical texts, the comparison returns true.
So don't complicate various other conditions on the way there with
filtering out that case; deal with it first so they don't need to.
Change-Id: Iebd230704ce5f53d12d5afa64aab30f83bb9d407
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Added operator[] to QCborValueRef and mutating operator[] both there
and in QCborValue. If the value (referenced) is not a container, it
is replaced with a map and a reference into the result is returned.
If the value is an array and the key is a string, negative, or more
than 0xffff, the array is first converted to a map.
Change-Id: Ibbc9e480fb25eb3d05547c8a1b99e762b2a68b68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add Q_FALLTHROUGH(), fixing:
tabletcanvas.cpp:222:55: warning: this statement may fall through [-Wimplicit-fallthrough=]
Change-Id: I573f4add56774218e28a7c5f1dac09c5402333c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Their correctness is not checked at compile time and even object
renames can break code.
Change-Id: I99273a28743a79a76c00e6db0ed4cd6d7eba8bf2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
... to QXcbConnection::handleXcbEvent(), which is where it belongs.
This patch amends bc6f5b3ff6 (Sep, 2013).
And some other design cleanups.
Change-Id: Iefa0793c58de16a59d2294f38311e1e8dfa3035b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The bitmap cache for the first 64 signals being connected was only set when the
connection is added. It was never unset when the connection was removed.
Internal use of the connectedSignals bitmap is not hurt by it occasionally
saying a signal is connected even though it is not, since the purpose of those
checks is avoiding expensive operations that are not necessary if nothing is
connected to the signal.
However, the public API using this cache meant that it also never spotted
signals being disconnected. This was not documented. Fix the behavior by only
using the cache if it is up to date. If it is not, use a slower path that gives
the correct answer.
To avoid making disconnections and QObject destructions slower, the cache is
only updated to unset disconnected signals when new signal connections are
added. No extra work is done in the common case where signals are only
removed in the end of the QObject's lifetime.
Fixes: QTBUG-32340
Change-Id: Ieb6e498060157153cec60d9c8f1c33056993fda1
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Terminating character is needed for gtk portal backend, which is not
able to contruct a string without it and thus not able to pre-select a
file or a directory in file dialog.
Change-Id: I5b40fb1ce584936fc92e93f38dc8559890852d99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Spaceship operator was disabled for QCborValue, but not the test.
Change-Id: Icb91da689f62ef6de9f4fa926346505c5e50e9eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
PCRE2 does not support JIT on winrt. This test row takes a long time
(30 seconds here) without JIT and thus might cause test timeouts in
COIN when run on winrt.
Change-Id: I79d9f6be16dbe16594ae2bf51f353acd06b3d2fe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
UWP also supports SwitchToThread. The usage of Sleep(0) was a leftover
that was forgotten when porting to desktop Window's approach of handling
threads.
Change-Id: I5e3d6fb3eefe07407b910cc6a6b45781d320e151
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This way there is only one for loop, which is more optimizer friendly
Change-Id: Iaa02026627d5259c3eea1ff5664e8f22664eef73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
"Use std::addressof for taking an address instead of operator& in moc"
(5b99f3a34f) introduced a dependency to
std memory header. That change exposed code that was including
the moc output from within a namespace. That was never supported nor
valid, but it used to compile. The problem was not detected earlier
because both other includes where already included to support QObject
itself and therefore inside the moc output their header guards were
disabling their content.
Task-number: QTBUG-68191
Task-number: QTBUG-70907
Change-Id: I18462ed17d748a114fe2e5b6bf9aeb56ee26e2db
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows others to link to QtDBus and the other libraries/tools using
doxygen.
Fixes: QTBUG-60933
Change-Id: I026895a432a328f224c40cf231ad12d109dc648f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Passing Qt::MSWindowsOwnDC along with the window flags to the QWidget
constructor results in creating a native window as part of the base
class initialization.
By deferring the window creation to later in the QGLWidget construction,
the meta object reflects the actual class.
Change-Id: I51343c767057d6841331614b93ad860fe99d65e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The opacity set on a QPainter was being ignored for drawImage()/drawPixmap()
calls when rendering to a PDF file through QPdfWriter/QPrinter. This change
fixes it for PDF files v1.4 (default version) or v1.6. For PDF/A-1b files,
opacity will remain ignored to ensure compliance with the specification.
Task-number: QTBUG-70752
Change-Id: I4280e898698e0367dfb4c6ac2cd14ca2bf98850e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
qdoc needs to know that a qdoc comment should not be part of the
documentation until a future version. In this case, some new functions
were declared to become active in Qt 6.0, but qdoc had no way of
detecting this and reported errors about them incorrectly. Adding
\since 6.0 to the qdoc comments for these functions allows qdoc to
ignore them without printing the errors.
It is also not allowed to document static functions declared in .cpp
files, because these functions are not in the public API. The qdoc
comment marker was removed from the comments for a few such static
functions.
Change-Id: I55ce0e8fb823b1dcf498d5a2436ddb20ad0a7527
Reviewed-by: Martin Smith <martin.smith@qt.io>
This update removes the requirement for dtls to be present when qdoc
runs so that qdoc can parse qdtls.h.
_#ifndef Q_CLANG_QDOC
QT_REQUIRE_CONFIG(dtls);
_#endif
Change-Id: I69ba5e378bebe86f93830d14e3956eb0d677508e
Reviewed-by: Martin Smith <martin.smith@qt.io>
The overload that takes a maxtime (now duration) was buggy, but we can't
change its behavior, so instead we clarify what it actually does.
Change-Id: I8a04fbaea5847c95b6ec6e73396304ab4debd35b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We need to to explicitly unhide popup windows that were previously
explicitly hidden by applicationWillHide, so that their visibility will
be effectively restored when the application is unhidden (otherwise the
windows are gone forever even though their internal visibility is set to
true).
Change-Id: I4dbd209b07f769cc815851b40c41db0739ca2dc9
Task-number: QTBUG-71014
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since Qt 5.10, qTo/FromBig/LittleEndian<float/double> stopped working.
It may be confusing, but big endian floats do exist, so not to break old
code, we should support them.
Change-Id: I21cdbc7f48ec030ce3d82f1cd1aad212f0fe5dd0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds the QPainter::LosslessImageRendering flag to
QPainter::RenderHints and allows QPdfEngine to recognize it and encode
images using a lossless data compression algorithm provided by zlib
instead of using lossy JPEG compression, which can produce artifacts
with some images.
Task-number: QTBUG-54809
Change-Id: If9e2bc64da3bf3afcd5d6c74f0ee82336ef05a19
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the test is stable in Qt 5.12.
Task-number: QTBUG-60993
Change-Id: I0c366567121688d9518e90b5e8f9ec1b4006b7b9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
on macOS, the test seems to be stable nowadays.
Task-number: QTBUG-39986
Change-Id: I18430c3feb27a5bee5474e1eb95f7d89b25f00a9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
on macOS, where it was skipped but where it now seems to be stable/work.
Task-number: QTBUG-39983
Change-Id: I100a57f23b43074ebacc012be247d92acc6ae336
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This patch amends d67214302f.
The issue was caused by mistakenly interchanging
m_hasXRender <-> m_hasXRandr. Also renamed
selectXRandrEvents() -> xrandrSelectEvents() to be more
consistent with xi2Select*() API. And moved the xrandrSelectEvents()
to QXcbConnection ctor for the same reason.
Fixes: QTBUG-71305
Change-Id: I26f9bac3ae1f997f53134eb97f3569fb6d3c13fe
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It seems some touchpads only send legacy WM_MOUSEWHEEL/WM_MOUSEHWHEEL
messages for 2-finger scrolling, instead of WM_POINTERWHEEL/
WM_POINTERHWHEEL, even after EnableMouseInPointer(TRUE), in spite of
sending the expected pointer messages for normal pointer movement/taps.
This change adds a workaround to handle legacy wheel messages even when
in pointer mode.
Task-number: QTBUG-71257
Change-Id: Ib360051147c4521751a5b91d90fa7657496777fa
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Task-number: QTBUG-71112
Change-Id: If1b81589f295657597a9dfa3671128a927cbe488
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Calling rowCount inside another auto test function yields unexpected
results, if rowCount fails. Without a check for QTest::currentTestFailed
the failure will not stop the calling function and other functions like
rowsInserted and rowsRemoved might happily continue even though their
requirements are not met. That caused a crash on winrt under certain
circumstances.
In addition to that TRY_WAIT now does not only wait for the given
amount of time, but also gives feedback about its result. Before
this change TRY_WAIT was basically useless, as it gave no indication
about its success/failure.
Fixes: QTBUG-71121
Change-Id: Ibd3f233a0b913db799814be97c4274d510643c74
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QTimer contains a template member function callOnTimeout(), which accepts
a variable number of arguments. Because it is difficult to document such
a general function, several specific declarations were added under the
guard Q_CLANG_QDOC that represent the typical ways this function is used.
They are easier to document because they have specific signatures.
Unfortunately, the clang parser recognizes two of them as being the same,
so this change removes one of the two. It also adjusts the documentation
of the remaining one so that it indicates both uses.
Change-Id: Ifa7bed9093bd1491b7bfe154990864454885c003
Reviewed-by: Martin Smith <martin.smith@qt.io>
The expression "m_context.view = view" always evaluates to the view,
so the check was flawed.
Change-Id: Icef4ba5244975ccd78a151c7d40c53b2364c6148
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Before reading the configuration of a docker machine, the machine shall
be created and started. Otherwise, the docker command will complain
about "cannot connect to the Docker daemon".
If the docker machine has not been created, the make check will be
immediately terminated, and then print the error message. If its status
is not running, the machine will be turned on by a start command.
Change-Id: I7f4c322e7bdf29e4e4203e0e1bbc2e5c8cf677be
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
The Qt QPA does not handle native double clicks as such; change the plugin
not to send them.
For Ink, remove the doubleclick detection. For the old code path,
map them to Press.
Fixes: QTBUG-70999
Change-Id: I54b858f9e146bf325a861554d5ef74143db7d2b7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This change simplifies memory management as long as it doesn't requires
manuall calls to qDeleteAll and manual deleting/nulling pointers.
Change-Id: Id0dc563d0b1e74ae33939d90d4b39999020cd7ce
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
There is no sense in testing the 'm_array' pointer against null, as the
memory was allocated using the 'new' operator. The exception will be
generated in the case of memory allocation error.
Task-number: QTBUG-71156
Change-Id: Ib76d16d38d2b0b0c4c9fae3d8d5bdd86af0d08ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt's PDF engine previously supported only the PDF v1.4 standard, which
only allows pages of up to 200x200in (about 5x5m). This patch optionally
enables the generation of PDF v1.6-compliant files that allow the
redefinition of user space units, so that pages of up to 381x381km are
now possible. By default, generated files are compliant to v1.4 spec.
v1.6 compliance must be enabled by, e.g., calling QPrinter::setPdfVersion()
with QPrinter::PdfVersion_1_6. PDF v1.6-compliant files require Adobe
Reader 7.0 or newer (also worked with the built-in viewers in current
versions of Chrome, Firefox and Edge).
Task-number: QTBUG-69386
Change-Id: I21708e0d465d5d7d9e46ff06dd04acfe1dfb0858
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The state was forgotten from the translation layer, this is important for tree views.
Fixes: QTBUG-71223
Change-Id: Ief4004fe455889f9d5a7eb018bf34d37c36a6bd9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>