The remaining time will be fetched again after checking the predicate, so the
read value was never used.
Change-Id: I627152116ea579577e490ecefbaee02fec4aabdc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add a main window, based on the observation that the original bug
report was about a typical main window.
The mainwindow typically has the mouse grabbed when clicking to open
a menu and all mouse events go to it. Mimick that in the test
by sending the mouse events to it.
Remove the code using QCursor::setPos().
Task-number: QTBUG-63031
Change-Id: I9117c9633f81aba8bdff235ce64884c489fdc9f7
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Windows sends a mouse move with no buttons pressed to signal "Enter"
when a window is shown over the cursor. Discard the event and only
use it for generating QEvent::Enter as not to confuse tests.
This is preparing for the use of the new QPA API for mouse events.
Change-Id: I3eb7f3dad82d27d0b425c7eaf34b1eee11592074
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
It is flaky on Ubuntu 16.04 and openSUSE 42.3.
Task-number: QTBUG-66345
Task-number: QTBUG-66216
Change-Id: I06fb88ee65113136309a0faa0336dd11672bfe59
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Assuming this is someone's first contact with testlib, we want to
mention QCOMPARE. Make the whole thing a bit more readable instead of
squeezing everything into single lines and add a bit more code.
Change-Id: I76908003427277670d1199774083a3ee01b8747c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Removed duplicate "for the".
Function list was sorted except for sprintf; so sorted it. Also, minor
grammatical improvement.
Task-number: QTBUG-64362
Task-number: QTBUG-64363
Change-Id: Ia47c5195011a0e578e916897b3a5ddb1d78170ad
Reviewed-by: Frederik Schwarzer <schwarzerf@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Links to width(QChar) are incorrectly linking to QChar rather than to
the intended QFontMetrics::width method.
Task-number: QTBUG-65141
Change-Id: I1647885c735011ec3d99c535fdb8b7fc1bf57f99
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Right now we are using the C++ compiler here, which relies on
the compilers automatically switching mode. This behavior is also
deprecated in newer clang versions and block clang developer
builds.
Task-number: QTBUG-64822
Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I4d3c00ac528a45934c85777f42d243d0fe367c92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
If the OS supports it, we will now log to the Apple unified logging
system in addition to the normal stderr output. These logs can be
inspected via the Console application, or the 'log' command line
tool.
See https://developer.apple.com/documentation/os/logging
[ChangeLog][QtCore] Apple Unified Logging is now supported on Apple platforms.
Task-number: QTBUG-38156
Done-with: Jake Petroules <jake.petroules@qt.io>
Change-Id: I2ab92bd192d5b98aaf77e41501ea7b1ca6ef2425
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtWidgets][QLineEdit] The textEdited() signal is now emitted even if the
QValidator has changed the user input.
Task-number: QTBUG-44046
Change-Id: Ife287269c7dcbb644cb03a291bf96f7db384ed56
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Remove BLACKLIST files which are no longer valid because the mentioned
CI systems are no longer active:
- opensuse-13.1
- opensuse-42.1
- rhel-7.1
- rhel-7.2
- rhel-7.3
- ubuntu-14.04
or the testcases are no longer available:
- QTBUG_14292_filesystem in qactiongroup
Change-Id: I80a4397059fafba169096440fdc07d45c76a1ed8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
The possible key sequences for QKeySequence::Copy on X11 is Ctrl+C, then
Ctrl+Insert and at last F16. The order is defined in
QPlatformThemePrivate::keyBindings.
Task-number: QTBUG-46053
Change-Id: I86a0767e268088edfce98cfb07f9fb78f00d0713
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
The idea behind this code was to check, whether no
button was pressed. !isPressed only checks, whether
XButton2 was pressed though.
Change-Id: I358816fa62d230abf82116f0da7bc3a5e43fbaf6
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
With the previous implementation mouseLeave events were
broken as we did not remember, which window was initially
affected by events and naturally there was no window under
the mouse for these events.
Now we save the currently affected window and use this
information for leave events.
Change-Id: I4036ce5e6621b507232d258dbb54c7f40a345899
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
If the mouse button is released outside of a window,
we did not trigger a mouse release event.
Task-number: QTBUG-66088
Change-Id: I3ef6234cc922c8c59ac3aa6350783fae4ba36bda
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
With the previous implementation the detection of the
affected window (windowAt which uses QWindow::geometry)
only worked for the upper left quarter of the window,
when used on a High DPI screen. As QWindow does not use
native positions, the mouse cursor's position has to be
mapped before checking the window under the mouse.
Change-Id: I1a30b9669ec3e4c573cf83aed57c20d65675ff16
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The backend will do the aborting. The handler doesn't need to do it.
Task-number: QTBUG-66295
Change-Id: I3debfc11127e4516b505fffd151166d4a8e9ec53
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Extract code related to supportedImageFormats() and
supportedMimeTypes() into QImageReaderWriterHelpers
namespace.
Change-Id: If0f56682072859be1b6f07afd7737431325827fc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
[ChangeLog][QtCore][QString] Added the functions QString::isUpper
and QString::isLower to check if a string contains only uppercase
or only lowercase letters.
Change-Id: I12d3a47d4605eb4514842071e80a9ba0723d4e01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][Android] The application and dependent Qt libraries are
now loaded on the same thread as main() is run on, ensuring that global
static initializers, constructor functions, and main() are all run on the
same thread. The same applies during application shutdown, for destructors
of global objects, and destructor functions.
Change-Id: Id4bfece1ed2a0532ed2e8fb7d8ffd6e55d5a10dc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
It has been observed that sometimes the output is not captured by QEMU.
Task-number: QTBUG-65845
Change-Id: Iddf888fb3aa019209dbe71f424d87884471784e0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This means willLogToConsole does not need to consider the boostrapped
case anymore.
Change-Id: I088245362cd46c582a2a08225d22e4d2e4645c06
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Makes for a less awkward logic without any if (0) etc.
Change-Id: I3db0984c5a0bbf1615c2feb2ebef59b4ec16e9ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This was the missing counter-part to indexOf(QWidget *), which is
sometimes implemented in user code.
Not sure why the original code doesn't use a for-loop and instead accesses
an out-of-bounds element, but I'll preserve the behavior of very old working code.
Change-Id: I7d7fa56b56a4626789774c15c23fdfef41d723e7
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Likely fail is 3d29a0dd74. Is preventing
merge from dev, so blacklisted for now.
Task-number: QTBUG-66324
Change-Id: Ieb522897e93d4a1b4c0e423fadd4138dfb089093
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Conflicts:
src/corelib/tools/qvarlengtharray.qdoc
src/corelib/tools/qvector.qdoc
Resolved documentation changes in favor of 017569f702,
which keeps the move overloads along with its const-ref sibling.
Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
QCommonStylePrivate::viewItemDrawText did not handle multi-line text
correct when one of the lines must be elided. All text after the first
elided line was not drawn at all.
Task-number: QTBUG-14949
Task-number: QTBUG-57891
Change-Id: I2b7137f8f09001c1e0cdbdb10f784c4be433d0d2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
There was a typedef used for comparisons of the items which was for
VC6 according to the comment. Replaced the typedef with auto and did
a testcompile with MSVC2015 - worked fine.
Change-Id: Ibdbc2332d49d2dd533ab35180f49c9dcd143c627
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QAbstractItemModel::dataChanged() gained an optional role parameter
with Qt5 which was not filled within QTreeWidgetItem setData() function
Change-Id: Ife87e9e046621b464ad340bd9eb451355730e93c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QtTestLib has its own message handler installed via qInstallMessageHandler,
so there is no need to set QT_LOGGING_TO_CONSOLE to force stderr output,
as that's what QPlainTestLogger::outputMessage uses anyways.
And in the case of using other testlib outputs such as XML, we're not going
to hit any of the code paths that would check QT_LOGGING_TO_CONSOLE.
The only relevant exception is Windows, which checks stderrHasConsoleAttached(),
which is affected by QT_LOGGING_TO_CONSOLE, but Qt Creator actually has an
explicit inversion of this existing code, to prevent it from setting
QT_LOGGING_TO_CONSOLE, so that output ends up in OutputDebugStringA
and can be read and distinguished from the debugger's output.
See QTCREATORBUG-16161.
Change-Id: Ia8a9b00b221ec5691b52485586f172c9261bf299
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The former is the preferred way in Qt to exclude code that shouldn't
be built for bootstrap tools. For qlogging.cpp this includes the
bootstrap library, and qmake, both of which have QT_BOOTSTRAPPED
defined.
Change-Id: I94b669aae308786eded92b30b5e3f63add069756
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The missing targets are coming from NSViews that we haven't created, such
as the _NSThemeCloseWidget, and are just noise in the debug output.
Change-Id: I71ae1267460739969511bf4de946bcc7ca897e7b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It was used in Qt 4 to make applications reload Trolltech.conf,
which is not supported by Qt 5.
Change-Id: Ic75c117f22a23a8f26b3f19ce57322878613f5b0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>