This option is listed when displaying the help of Quick tests,
but was never actively supported as it had been removed before
Qt5.0 was finally released.
Change-Id: I4cdf8d86471ab72e289f27a07a5f04c0338bfdbd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This gives the user a much clearer understanding of which part of the
test caused the warning.
Old warning:
WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event occurs outside of target window.
New warning:
WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event at 501, 179 occurs outside of target window (450x450).
Change-Id: I2943d79bab5a808e9b5b721758db216b91a07bbd
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Conflicts:
examples/examples.pro
qmake/library/qmakebuiltins.cpp
src/corelib/global/qglobal.cpp
Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
src/corelib/global/qnamespace.qdoc
src/corelib/global/qrandom.cpp
src/gui/kernel/qwindow.cpp
Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
src/network/ssl/qsslkey_openssl.cpp
src/plugins/platforms/android/androidjniinput.cpp
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/widgets/widgets/qmenu.cpp
tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
It is currently impossible to get output from autotests in Visual Studio
or Qt Creator when running under the debugger. Qt Creator's cdb
integration cannot distinguish between the inferior's console output and
cdb's console output. If the inferior's output came from
OutputDebugString we'd be able to catch and display it.
Pave a way to force QTestLib's logging facility use OutputDebugString.
Task-number: QTCREATORBUG-16161
Change-Id: Iccd69c283626266ee4384a6163a8b72bb0e7df27
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
App Nap may cause stalls or timer delays during test runs.
Change-Id: I828282d12127918439a9a2a4f7d7be6cac457b42
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Conflicts:
src/widgets/kernel/qwidget.cpp
This merge also extends the expected output of the pairdiagnostics
teamcity output (added in dev in commit
c608ffc56a) after the recent addition of
the flowId attribute to the teamcity output (commit
8f03656211 in 5.9).
Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
Added flowId='name' to each message when using TeamCity logging format.
This is necessary to distinguish separate processes running in parallel.
[ChangeLog][QtTest] Added flowId to messages when logging in TeamCity
format. FlowId is used to distinguish logging from multiple processes
running in parallel.
Change-Id: I7f5046c1058ff02770404caa2c9b3a5398f97f6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move two functions that are using toString(const QString &str) from
qtestcase.h to qtest.h. This fixes compilation on INTEGRITY platform.
Task-number: QTBUG-61702
Change-Id: I5a433126741c7a52621616c5b98203e7d642b330
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Task-number: QTBUG-61987
Change-Id: I27219a6d06d7a81514e3f7b2ad5469676f724e04
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Document that "visible"-but-obscured windows may not
get expose events for various audiences: QTestLib
users, platform plugin authors and on the QExposeEvent
itself. QWindow::exposeEvent() already has this documented
and is not changed.
Task-number: QTBUG-50414
Change-Id: I91042e8b1c70e48f10e692b2e80367d242a8ccbe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Some users don't want to download the full Xcode installation which can
weigh upwards of 5 GB download and 20 GB installed.
[ChangeLog][macOS / iOS] Qt can now be built using just the Xcode
Command Line Tools, without needing to install the full Xcode IDE.
Task-number: QTBUG-35928
Task-number: QTBUG-41908
Change-Id: I6d13c9a03ab9087b3ab56e8547f53f0cc2806c7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Split into (internal) QTest::qInit(), qRun(), and qCleanup(), that
allow qtquickcontrols2 to initialize the test framework once, repeat
the tests for all built-in styles (Default, Material, Universal), and
finally cleanup things:
$ ./tst_qquickbutton text
********* Start testing of tst_QQuickButton *********
Config: Using QtTest library 5.10.0, Qt 5.10.0 (...)
PASS : tst_QQuickButton::Default::initTestCase()
PASS : tst_QQuickButton::Default::text()
PASS : tst_QQuickButton::Default::cleanupTestCase()
PASS : tst_QQuickButton::Material::initTestCase()
PASS : tst_QQuickButton::Material::text()
PASS : tst_QQuickButton::Material::cleanupTestCase()
PASS : tst_QQuickButton::Universal::initTestCase()
PASS : tst_QQuickButton::Universal::text()
PASS : tst_QQuickButton::Universal::cleanupTestCase()
Totals: 9 passed, 0 failed, 0 skipped, 0 blacklisted, 2215ms
********* Finished testing of tst_QQuickButton *********
Notice that QTest::qExec() cannot be called multiple times, because
it would print the headers/footers/results separately for each round.
Change-Id: Ibb24b694491d4e790db32e40837c3a5c6d9d2840
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Rearranged existing top-level example to let the ci example make some
kind of sense.
Change-Id: I0a5dd6270aef419c8a33d390c801460f23e10667
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][QtTest][QCOMPARE] Now supports printing QStringViews in
case of test failures.
Change-Id: I4dc2542cd1013fd63c094c249e721d7102387bde
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There's no reason to restrict the LHS and the RHS to the same type
like it was done before. That just leads to lots of casting. or use
of QVERIFY(. == .) instead of QCOMPARE, with all the disadvantages
like no printing of the LHS and RHS values.
The rationale given in the documentation for this behavior is
incorrect. Ensuring that RHS and LHS have the same type by no means
ensures that no implicit conversions take place when calling
operator==. Proof:
QCOMPARE(QLatin1Char('a'), QLatin1Char('a'));
// instantiates
qCompare<QLatin1Char, QLatin1Char>
// but calls
operator==(QChar, QChar)
If the intent is to disable implicit conversions of the argument
types, then some serious metaprogramming magic would be needed, along
the following lines:
1. find out which op== overload is actually chosen
2. find that overload's RHS parameter type, assert it's the same as
(possibly cv-qualified) T1.
3. ditto for the LHS parameter type and T2
This is not attempted here.
Fix the inconvenience this restriction caused by simply allowing
two types.
This cannot break existing code, since we didn't actually change
anything in the qCompare() overload set. All we do is implement the
existing qCompare<T1, T2>() overload.
[ChangeLog][QtTest] QCOMPARE can now be used for mixed-type
comparisons.
Change-Id: I0413dbd3689809852413eaca22827257f1527720
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
[ChangeLog][QtCore][QDate/QTime/QDateTime] Added toString() overloads
taking the format as a QStringView.
Change-Id: I322fa22e6b13fe8ba4badf0a3133425bd067ef32
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
[ChangeLog][QtTest] QUuids are now printed on failure.
Change-Id: I39a7b9169aef8ab6ef5ce0790920547af23bd1b9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Currently when doing comparison with pair-like classes the fallback
toString method is called which returns a Q_NULLPTR thus not allowing
proper diagnostic of the values that triggered an error. This patch
adds support for QPair and std::pair to improve the tests output
readability.
[ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and
std::pair on failure.
Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-Werror is now disabled for that compiler, but it doesn't hurt to fix.
io/qstandardpaths_unix.cpp:149:32: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
qtestcase.cpp:2330:31: error: narrowing conversion of '(ms / 1000)' from 'int' to '_Timet {aka unsigned int}' inside { } [-Werror=narrowing]
Change-Id: Id92f4a61915b49ddaee6fffd14aea2c1e686e8f2
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Can be used by CI system to set QTEST_ENVIRONMENT="ci", allowing test to
be blacklisted only for the CI.
Task-number: QTBUG-59564
Change-Id: I7088abb888c179bafc621f11191efbc45c37b179
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Some were 5s, others 1s. Pick one (the higher).
Change-Id: I81929d4f49c2e41b4d4b75c3e2bf8ff75af868ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in
qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess
headers, exclude the sources from compilation when switched off, guard
header inclusions in places where compilation without QProcess seems
supported, drop some unused includes, and fix some tests that were
apparently designed to work with QT_NO_PROCESS but failed to.
Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This reverts commit 3b38392844.
The change caused test compile failures with MSVC2015 in qqmlsettings;
a variable was not captured in the lambda expression. This appears
to be a compiler bug of MSVC.
Task-number: QTBUG-59096
Change-Id: I3bf5288eb005b2e1661819bb33bc54fb944d0150
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reduces duplication of logic and allows other primitives to be
built on top.
Change-Id: Ia100014cfb0c09ac2f47c3a156d0c76f0fddafa8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The "accessibility" feature was defined globally for qtbase, but also
in src/gui. The definitions could end up with different values.
Change-Id: I1a932c3c04a5fc26b9f67eb4f5ff02e524f380e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QDeadlineTimer will eventually support CLOCK_MONOTONIC_COARSE on Linux,
so let's be safe before that change appears.
Change-Id: I9b423f1b71194205b27afffd14a383a7e9f66a9d
Reviewed-by: Stéphane Fabry, Cutesoft <stephane.fabry@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It's included by qglobal.h, so we get it for free in other headers.
Change-Id: I90072156e313271a5354a39cbf78a83a6885c431
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Do not wait up to the timeout ms after already having waited several
times. At the same time upgrade to using the QDeadlineTimer which
is designed for this purpose.
Change-Id: Iaf5e4f4655605d5143ce91040c6eb6706752e504
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... instead of sequential .arg(const QString &) callings.
It saves memory allocations and prevents unexpected results
if replacing strings contain place markers.
Found with clazy's qstring-arg check.
Change-Id: I3912275a6e11c6fb7559ff5623f2e8cde9b7f07a
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This new function does the same as newRow(), except that it has a less confusing
name (in line with _add_Column()), and accepts printf-style arguments to avoid
the need to newRow(qPrintable(QString::asprintf())), a common pattern in client
code. It uses qvsnprintf() under the hoods, avoiding the need for the QString
const char* round-trip.
Port all in-tree users of newRow(qPrintable(QString::asnprintf())) to the new
function.
Change-Id: Icd5de9b7ea4f6759d98080ec30f5aecadb8bec39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Julian Seward is the author mentioned in valgrind_p.h.
Also call the whole thing valgrind, since callgrind
is part of valgrind.
Change-Id: Iaf5958c520b919c1acf93ce368b0839bd06ccd46
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
A child widget without a native handle would previously not be treated as
exposed or active, even if the closest QWindow actually was, resulting
in qWaitFor returning false and QVERIFY failing.
Change-Id: I9df41cbac7aeab63bfa59d8ac77880591393c085
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Timestamp is necessary for testing custom mouse event handlers e.g. what
Qt WebEngine uses for handling triple and quadruple mouse clicks.
Based on commit 181ee8f9ff
Task-number: QTBUG-56223
Change-Id: I2bf840f326255333eec83ca8c42f087cb7deb1fb
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This is the only warning we disable in a lot of places in Qt 5.8 source
code. If other warnings become common, we can add macros for them too.
Change-Id: Iaeecaffe26af4535b416fffd1489d1968e29c52a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This is now documented in the qt_attribution.json file added in commit
41a7d74385 .
Change-Id: I4f13397a14de7d9f98ba146cabf64dafac5dada4
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Remove most type traits from qtypetraits.h, but keep the custom
implementation of is_signed/is_unsigned. This gets rid of
BSD-3 licensed code from Google in a public header (hugh!).
The custom implementations for is_signed/is_unsigned are kept
because the implementations in gcc's standard headers do not
work as we expect for enums - both is_signed and is_unsigned
always returns false there - see also
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027
[ChangeLog][QtCore][General] Qt now relies on type traits from
the C++ standard library.
Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QBenchmarkTimeMeasurer uses the 3rd party header cycle_p.h which may
include windows.h on Windows (32bit). This can cause clashes in qmltest,
which uses QBenchmarkMeasurerBase. Move the derived classes to a separate
header to prevent this.
Change-Id: I943a11c32a575594e6e79e722e8809b42de35092
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... and move toString() implementations there which were repeated in
network tests, or #ifdef'ed in qtest.h.
Since the functions moved from network tests are now in a public header,
had to massage them a bit to pass headersclean:
- replace Q_FOREACH with C++11 range-for
- avoid implicit conversion from QByteArray -> const char* (done by
re-using toString(QByteArray) instead of calling strdup() manually)
Also made the functions overloads instead of specializations. This
allows to pass the enum by value instead of by const-&.
Like the existing QHostAddress, the newly-added toString() overloads are
marked as \internal. We can decide later whether to turn them into
public API.
Change-Id: I8c23db7a0a6575273567017d42d7b2a957acece8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Identifiers that match _[A-Z_]* are reserved for use by std
implementations. Qt is not an implementation of the standard,
so it mustn't use such identifiers.
Use plain names for macro arguments and the qt_test_ prefix
for C++ variables declared in expansions of those macros.
Change-Id: I22be167e36676199a5b084df3f4c5ef86c89f000
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Which, in Mach speak, is an exception handler for the process. Also
check if the crash reporter is in a mode that will show a dialog for
any crashed process. If so, leave it to that crash reporter to do stack
traces.
This patch has the nice side-effect that a crashing test won't have both
a debugger and CrashReporter generate stack traces.
You can check the settings for CrashReporter on macOS with the command:
defaults read com.apple.CrashReporter DialogType
If it is set to 'basic' or 'developer' or 'crashreport', CrashReporter
will show the dialog. If set to 'server' it won't. Any unattended system
should have it set to 'server' (which will have QTest invoke lldb to
generate stack traces):
defaults write com.apple.CrashReporter DialogType server
Change-Id: I39153e44cff15c00341857f178b1dcfab154f8ee
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
While there are similarities, we want to keep control over those tests
which affect only one platform.
Change-Id: Id1f6eb9954169148d70cea14969f34f21d1e6690
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QLatin1Literal is just alias of QLatin1String
for Qt4 compatibility.
So it's style cleanup patch.
Change-Id: Ia3b3e5dc3169f13a1ef819d69be576b8a8bfb258
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
cf53aa21bf and 3aaa5d6b32
were reverted because of reconstruction in 5.7.
defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1260.
DirectWrite: Fix advances being scaled to 0
Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.
Conflicts:
configure
mkspecs/features/uikit/device_destinations.sh
mkspecs/features/uikit/xcodebuild.mk
src/corelib/global/qglobal.cpp
src/corelib/global/qnamespace.qdoc
src/plugins/platforms/cocoa/qcocoamenuitem.h
src/plugins/platforms/windows/qwindowsservices.cpp
src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
src/widgets/kernel/qapplication.cpp
tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
The platform is not supported since Qt 5.7
Task-number: QTBUG-55331
Change-Id: If6202b347efdfb38eba4c4c3a65dde515d066112
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Replaces our mix of comments for annotating intended absence of break
in switches with the C++17 attribute [[fallthrough]], or its earlier
a clang extension counterpart.
Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For test runs we want to start with a clean slate
and ignore previously saved window state.
This also prevents the “previous restore failed” dialog
from from showing and blocking the test run.
Change-Id: I8e5b87a903cf1d937d628c2b062f917c4c37f176
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
In any code (such as QtQuick Flickable) which calculates velocity as
distance / time, it's unrealistic to simulate instantaneous touchpoint
movements. So, force a slight delay before each event, so that
the touchpoint can only move very fast, but not infinitely fast.
We use qSleep() rather than qWait() because qWait() has a minimum
qSleep(10), and also processes events. commit() also conditionally
calls processEvents(), and we don't want to make that unconditional.
Change-Id: I3cee890f8951d7ecb8837a6abe216c5a8e0a6e34
Reviewed-by: Liang Qi <liang.qi@qt.io>
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change the occurrences where the Mac platform
is discussed to use a macro \macos, which expands to 'macOS'. This
helps with adapting to future renaming.
Update the instructions on mac-specific Q_OS_* macro usage.
Add a \target for the old 'Qt for OS X' topic to keep links working
for other documentation modules that try to link with the old name.
Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
When running under callgrind, do not bother with the use of the watchdog. The
constructor waits for the thread to start, which adds an overall run-time cost
that depends on the OS scheduling.
Change-Id: I162e2e311c43a6892ebc67dea39899e40babb61d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Conflicts:
configure
5.7 now supports clang on android; but dev re-worked configure
src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line. Applied the rename to both
for consistency.
tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.
.qmake.conf
Ignored 5.7's change to MODULE_VERSION.
configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.
Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
Conflicts:
src/corelib/io/qtemporarydir.cpp
One side encapsulated a repeated piece of #if-ery in a local define;
the other added to the #if-ery. Made its addition to the other's.
src/corelib/kernel/qeventdispatcher_unix_p.h
One side moved some members into a struct; this collided with a #undef
check that neither side now has. Discarded the #undef part.
src/gui/opengl/qopengltexturehelper_p.h
5.7 deleted a bunch of methods; not clear why merge got confused.
src/tools/moc/moc.cpp
One added a name to the copyright header; another changed its URL.
Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
It's not clear why an assertion triggered while running a test can't be
debugged, while the same assertion triggered while running an
application can.
Even though this documentation might still not be the place people will
look, hopefully having the terms "debugging crashes" here will make
it more visible in search results.
Task-number: QTBUG-54779
Change-Id: I151b04380df57126259d3d7797957a548eb6cd55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Conflicts:
qmake/library/qmakeevaluator.cpp
One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line. Trivial resolution.
Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
Replace it with QL1S in QStringBuilder expressions
and in overloaded functions.
Replace patterns 'QString::number() + QStringLiteral'
and 'QStringLiteral + QString::number()' with
QString::asprintf.
Saves some text size.
Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Formatting of values needs to be fast since QTestlib always
pessimistically formats the values passed to QCOMPARE even if
they match.
Speeds up tst_qrect by factor 1.5..2.
Task-number: QTBUG-38890
Change-Id: I3627db77a305a46c1d51a14c04b88db8018faa60
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Output regions as a compact list of rectangles:
QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)
Change-Id: I62e42bd30897a1d31b28e0cbd6afe7fa8ecf2664
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This enables creation of autotests which use touch events, without using
private API.
Task-number: QTBUG-44030
Change-Id: If8fe89f8423aaafd9e6501e231c33580b9365eb8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The example directory name for Qt Test module is qtestlib.
Without this change, Qt Creator cannot find the tutorial
files and tags them "broken" in the Welcome mode.
Change-Id: Ib2de0cd2263aa1651abb697f9f03ecd8eb871ca2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Noticed by Coverity (CID 161673). If the file being read contains
enough to fill the buffer, read() shall do that and return the nbytes
it was passed; as this was the size of the buffer, subsequently
writing a '\0' at this index in buffer is out of bounds. Fortunately,
/proc/self/status is typically < 1k so fits well inside the 2k buffer.
All the same, we can safely pass sizeof(buffer) - 1 as nbytes and *be
sure* of not getting a buffer over-run.
Change-Id: Ib620a330fbc94f0579c953737f7c4417ca449968
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
In particular, make sure the word BLACKLIST appears in it so it can
actually be *found*. Mention the comment format, mention version
suffixes, mention negation; expand and clarify the description.
Break it up into paragraphs for ease of reading.
Corrected the example to use osx, not its old platform name. Gave it
a comment that I wish I'd found in the BLACKLIST file that obliged me
to come looking for this in the first place. Illustrated the use of
comments to document reasons for ignoring tests.
Change-Id: I78d49b4706c0f70b714f7a410f850fb42ebb77c0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Also check the version is non-empty.
Probably makes no difference, but it's obviously more correct.
Change-Id: I05eee5623ac432d2ea02f7aad874513beeb2ceeb
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
We were looking up distro and version, in order to conditionally add
them to keywords if missing, on every keyword line of each BLACKLIST
that we parsed. In particular, this meant the static holding the list
of keywords couldn't be const. Move the distro-handling to an
intemediary function that adds to the raw keywords and supplies
one-off initialization for the list of conditions to match.
Change-Id: Ia383ec060e24b7f72d2c8fd6ae65816318daafd0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
A cast is not a conversion. If the value is not already a string type
we are just getting an empty string for all metatypes that can be
converted to string.
Change-Id: I4643cc9fd509c21568fdc2133403c3ed8cb38a10
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Just leave it to the attached debugger to do it.
Change-Id: I65f2676cccec2a074ea31cb8739e1b3fb626a5da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Pass -xplatform macx-tvos-clang to configure to build.
Builds device and simulator by default.
Added ‘uikit’ platform with the common setup.
Also added QT_PLATFORM_UIKIT define (undocumented).
qmake config defines tvos (but not ios).
tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be
embedded in the binary. A new ‘bitcode’ configuration was added.
For ReleaseDevice builds (which get archived and push to the store),
bitcode is actually embedded (-fembed-bitcode passed to clang). For all
other configurations, only using bitcode markers to keep file size
down (-fembed-bitcode-marker).
Build disables Widgets in qtbase, and qtscript (unsupported,
would require fixes to JavaScriptCore source code).
Qpa same as on iOS but disables device orientation, status bar, clipboard,
menus, dialogs which are not supported on tvOS.
Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Mark these libraries as what they are: Q_FOREACH-free,
using QT_NO_FOREACH.
Change-Id: I2a567d9fe67e15e9b6f0784525810b553dc50e1f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Examples in binary packages now directly match the install path.
Change-Id: Ic1487bc766cfd3b0a0a340cc4ae4ba49d953eaa6
Task-number: QTBUG-52953
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
QMetaEnum::key(n) returns the n-th key, which is not necessarily the one
of value n. For the key of value n, we want QMetaEnum::valueToKey(n).
Change-Id: Ic90fe6b1cbe84978a02fffff141bf4a06074917a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
[ChangeLog][QTestLib] It is now possible to use variables of
types with an explicit operator bool in the QVERIFY macro.
Change-Id: I2685df164a616f6a065d689867daa9ea1de78e08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This is a regression with 5.5, it causes some customer test functions
crash. d3d10cf2 introduced the 5 minutes timeout. The timeout could be
changed after this.
Task-number: QTBUG-52402
Change-Id: I8940bbde5004b4d888732b551274f079ddf20563
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
qtbase/src/corelib/global/qnamespace.qdoc:101: warning: Undocumented enum item 'AA_SynthesizeMouseForUnhandledTabletEvents' in Qt::ApplicationAttribute
qtbase/src/corelib/global/qnamespace.qdoc:2554: warning: Undocumented enum item 'ImAnchorRectangle' in Qt::InputMethodQuery
qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: Can't link to 'Q_COMPILER_DELEGATING_CONSTRUCTORS'
qtbase/src/gui/image/qiconloader.cpp:160: warning: Cannot find 'QIconCacheGtkReader' specified with '\class' in any header file
qtbase/src/gui/painting/qpaintengine_raster.cpp:1382: warning: No documentation for 'QRasterPaintEngine::fillPath(const QPainterPath &path, QSpanData *fillData)'
qtbase/src/testlib/qtest.h:176: warning: No documentation for 'QTest::toString(const QHostAddress &addr)'
qtbase/src/testlib/qtest_gui.h:77: warning: No documentation for 'QTest::toString(const QColor &color)'
Change-Id: If9ac0807accf2530ec7fc2ca7db71a110f9f79bb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Long backtraces would get cut off in the terminal, this is especially
bothersome when having lots of threads.
Make sure that the output is complet by setting height=0 for gdb.
The gdb manual states:
"If you specify a height of either unlimited or zero lines, gdb does not
pause during output no matter how long the output is. This is useful if
output is to a file or to an editor buffer."
Change-Id: I282054bc9e205d67d3076e37d5c928475803b22d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library
and tests.
Task-number: QTBUG-51673
Change-Id: I552b3fe8d6e0eb7c8c7b3a3d41558e5e21904dd2
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Update files using old header.LGPL3 to header.LGPL
Update files using old FDL template to use new one
Update files using old BSD template to use new one
Change-Id: I36a78272516f9953d02956522f285b40adfc8915
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The Qt CI does not have ninja, but the autotest can be used for manual
regression finding.
cd qtbase/tests/auto/cmake
qmake
make check
cd build
cmake . -DHAVE_NINJA=ON
ctest -R FINDTESTDATA
Change-Id: Ic3f3748f6ab04e37fa5287c59486e5cd46dcabb4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
When a QCOMPARE of values of type QColor fails, their
name will now be printed.
Task-number: QTBUG-51124
Change-Id: I76565daa338f038ea4f452e47705e638d94eaeee
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.
This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.
Conflicts:
mkspecs/features/default_post.prf
src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
src/3rdparty/sqlite/sqlite3.c
src/corelib/tools/qsimd_p.h
src/gui/kernel/qevent.cpp
src/gui/kernel/qwindowsysteminterface.cpp
src/gui/kernel/qwindowsysteminterface_p.h
src/plugins/bearer/blackberry/blackberry.pro
src/plugins/platforms/cocoa/qcocoasystemsettings.mm
src/plugins/platformthemes/gtk2/gtk2.pro
src/plugins/styles/bb10style/bb10style.pro
src/sql/drivers/sqlite2/qsql_sqlite2.cpp
tools/configure/configureapp.cpp
Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
Found by UBSan:
src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc33019650 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc33019650: note: object is of type 'QMouseEvent'
83 2b 00 00 98 e8 fa 8e 83 2b 00 00 00 00 00 00 00 00 00 00 02 00 04 00 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QMouseEvent'
src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc330196e0 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc330196e0: note: object is of type 'QKeyEvent'
00 00 00 00 f8 e8 fa 8e 83 2b 00 00 00 00 00 00 00 00 00 00 07 00 04 00 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QKeyEvent'
Fix by providing setSpontaneous() on QEvent as a private function and
befriending QSpontaneKeyEvent. Make setSpontaneous() always-inline to
avoid BiC between 5.6.0 and 5.6.1.
Change-Id: Ic60d82ed6a858f4f13f41fa3d2d1db6e808896b7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This is required for a follow-up commit which adds support for reporting
multiple results in a single benchmark interation.
Change-Id: I8dd7f37ce046cc0f9556be5d0df76f84b82ec1a7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The ref-cycles counter corresponds to the monotonic timestamp counter
that can be read using the RDTSC assembler instruction. Using it
instead of the default cycles counter is useful as it removes the
effect of dynamic frequency scaling on the measurement.
[ChangeLog][QtTest] The ref-cycles perf counter can now be used.
Change-Id: Id7d56576db362706c20f9a399e5acea35ee799f2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... by replacing them with C++11 ramge-for loops.
In one case, I took the liberty to remove a useless
if(isEmpty()) check around a for loop. Now that we
don't use Q_FOREACH anymore, we don't incur the copy
for empty containers anymore. Left the indention of
the loop level to avoid code churn.
Saves 1.8KiB in text size on optimized GCC 5.3 Linux
AMD64 builds.
Change-Id: I1b1fb34847f6a631f0d580fd5261c7f5fed8475c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Make actual and expected values of char tests more useful by using
C syntax. This means we can actually read non-printable characters.
Task-number: QTBUG-51294
Change-Id: I031e15916a2882c0499b6217ae1649d4eea09eb4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This also reverts commit 018e670a26.
The change was introduced in 5.6. After the refactoring, 14960f52,
in 5.7 branch and a merge, it is not needed any more.
Conflicts:
.qmake.conf
src/corelib/io/qstandardpaths_mac.mm
src/corelib/tools/qsharedpointer_impl.h
tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
In recent Xcode versions it doesn't work as expected, and caused build
failures in downstream modules, so we disable it until the cause can
be investigated further.
Change-Id: Ie54c7256a10d73610ec7e481b9d665b75e396365
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>