Commit Graph

35103 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
318f728283 Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-02-14 08:31:10 +00:00
Kari Oikarinen
a344758640 Remove superfluous call from qWaitFor
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>
2018-02-14 07:20:38 +00:00
Friedemann Kleint
087f26f9da tests: Refactor cleanup tst_QMenu::QTBUG47515_widgetActionEnterLeave
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>
2018-02-14 07:13:42 +00:00
Friedemann Kleint
bb45b75f3d Windows QPA: Discard spurious mouse move events
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>
2018-02-14 07:13:39 +00:00
Qt Forward Merge Bot
9c055e8e47 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Iaec2e57d6bf33355ddfa61d25133580a8740335f
2018-02-13 22:56:03 +01:00
Tor Arne Vestbø
76010f4af8 macOS: Add more granular logging categories for window events
Change-Id: I202e2cecfb5438ba9edc82efaf80b6ecebafb835
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-02-13 18:04:56 +00:00
Tor Arne Vestbø
cf4a611115 testlib: Split out test identifier buildup into standalone function
Change-Id: I99aa106d5aab8f299e61835680709e4fd856defe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-13 16:20:28 +00:00
Jarek Kobus
c6de55a0bb Fix typos
Change-Id: Id625efea998f2b4dce9970b903830dc3b3efcd3d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-02-13 15:51:10 +00:00
Christian Ehrlicher
92fc338de0 qtbase: cleanup BLACKLIST files
Cleanup BLACKLIST files which contain entries for CI-systems
which are no longer active:
 - opensuse-13.1
 - opensuse-42.1
 - osx-10.8
 - osx-10.9
 - osx-10.10
 - rhel-7.1
 - rhel-7.2
 - rhel-7.3
 - ubuntu-14.04
 - windows msvc-2010

Change-Id: I25590b0807a4454f9dc92aa4ea61300f7c9af56b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-02-13 15:20:33 +00:00
Kari Oikarinen
93a1d7ce27 Blacklist tst_qwidget_window::tst_resize_count
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>
2018-02-13 15:08:26 +00:00
Frederik Gladhorn
d08e0e861a Improve testlib example a bit
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>
2018-02-13 14:52:01 +00:00
Aaron Linville
cdf4261c8f Doc: Fix typos in qmake function reference
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>
2018-02-13 03:00:19 +00:00
Aaron Linville
64b8ddb755 Doc: Fix links to QFontMetrics::width() overloads
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>
2018-02-13 02:59:44 +00:00
Allan Sandfeld Jensen
0b300c9409 simd.prf: Add support for compiling .c sources with the C compiler
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>
2018-02-12 23:46:48 +00:00
Tor Arne Vestbø
211791d01c Add support for Apple Unified Logging
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>
2018-02-12 23:35:13 +00:00
Benjamin Terrier
357822818d Ensure textEdited() is emitted if the input is changed by a validator
[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>
2018-02-12 21:52:07 +00:00
Christian Ehrlicher
b2b32682a9 qtbase: Remove BLACKLIST files which are no longer active
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>
2018-02-12 17:40:12 +00:00
Christian Ehrlicher
383d2eaab4 Fix autotest tst_QAction::setStandardKeys()
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>
2018-02-12 17:39:57 +00:00
Liang Qi
3d31afe1e4 Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-02-12 11:15:20 +00:00
Oliver Wolff
c168838f7d winrt: Correctly check if mouse button was clicked
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>
2018-02-12 07:39:58 +00:00
Oliver Wolff
c4f0908f78 winrt: Keep track of affected window for mouse events
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>
2018-02-12 07:39:57 +00:00
Oliver Wolff
4ea4279875 winrt: Fix mouse releases that happen outside a window
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>
2018-02-12 07:39:56 +00:00
Oliver Wolff
675603a853 winrt: mouse handling: Fix detection of affected window
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>
2018-02-12 07:39:56 +00:00
Alexander Volkov
9d293e24a0 Windows QPA: Implement QPlatformWindow::startSystemMove()
Task-number: QTBUG-58044
Change-Id: I15639d505683159b4cc31d762cb0bebbfc57e594
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-11 19:53:14 +00:00
Thiago Macieira
fcad1c762b QVariant: Add missing conversion from QJsonValue to double & float
Change-Id: I56b444f9d6274221a3b7fffd150d2ff1df5228bc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-11 17:59:28 +00:00
Thiago Macieira
abc891ee7c Documentation: don't suggest abort() in qInstallMessageHandler()
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>
2018-02-11 17:59:20 +00:00
Morten Johan Sørvig
be73b00bc2 macOS: Bump deployment target to 10.11
Qt 5.11 requires macOS 10.11.

Change-Id: Iebbde845805a5ca382c34d0fe9176e8a9f7a2783
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-02-11 17:02:31 +00:00
Jake Petroules
138a65e0cf Remove code paths for macOS < 10.11
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>
2018-02-11 17:02:26 +00:00
Alexander Volkov
f104d52737 Avoid code duplication in QImage{Reader,Writer}
Extract code related to supportedImageFormats() and
supportedMimeTypes() into QImageReaderWriterHelpers
namespace.

Change-Id: If0f56682072859be1b6f07afd7737431325827fc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-02-11 13:26:15 +00:00
Andre Hartmann
bcd6de15ac QString: Add functions isUpper and isLower
[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>
2018-02-11 13:06:43 +00:00
BogDan Vatra
2c9dcfa004 Load Qt libs from Qt thread
[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>
2018-02-11 12:35:29 +00:00
Friedemann Kleint
8692f12e89 QTestlib/selftests: Add expected_crashes_4.txt for boot2qt
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>
2018-02-11 09:41:24 +00:00
Liang Qi
8dd22d9255 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ia443f6eb1c854c99c68127a376b78c1986675a9d
2018-02-11 09:13:21 +01:00
Tor Arne Vestbø
9b800b55c1 logging: Break out stderr logging sink into separate function
Change-Id: I4bc476376d2b84297c1798b016017db496532d27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-11 03:32:25 +00:00
Tor Arne Vestbø
a29e1fc708 logging: Don't build alternate logging sinks for QT_BOOTSTRAPPED
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>
2018-02-11 03:32:25 +00:00
Tor Arne Vestbø
3cee4308dc logging: Break out QMessagePattern error reporting into standalone function
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>
2018-02-11 03:32:25 +00:00
Sergio Martins
7a342372bb Introduce QLayout::indexOf(QLayoutItem *)
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>
2018-02-10 21:14:55 +00:00
Tor Arne Vestbø
c94ef51f0c macOS: Blacklist tst_QStyleSheetStyle::task232085_spinBoxLineEditBg
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>
2018-02-10 20:39:11 +00:00
Jani Heikkinen
095dbc494c Merge "Merge remote-tracking branch 'origin/dev' into 5.11" into refs/staging/5.11 2018-02-10 20:39:02 +00:00
Liang Qi
32b506d1db Merge remote-tracking branch 'origin/dev' into 5.11
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
2018-02-10 15:55:52 +01:00
Christian Ehrlicher
dc9ce275be QStyledItemDelegate: fix drawing elided multi-line texts
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>
2018-02-10 13:19:06 +00:00
Christian Ehrlicher
7ab7f97881 QList/Table/TreeWidget: remove vc6 workaround
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>
2018-02-10 13:19:03 +00:00
Christian Ehrlicher
85f6dd8325 QTreeWidgetItem: pass role to dataChanged() signal
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>
2018-02-10 13:18:57 +00:00
Tor Arne Vestbø
0b48fcee70 testlib: Don't set QT_LOGGING_TO_CONSOLE
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>
2018-02-10 12:54:52 +00:00
Anton Kudryavtsev
f9fa3e2553 QImage: use rvalue overloads more
Change-Id: I4e5e1199d1bf460c58a75fbc06b91ec5a71c49f9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-10 10:45:20 +00:00
Tor Arne Vestbø
24a93798b8 logging: Use !QT_BOOTSTRAPPED instead of QT_BUILD_CORE_LIB
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>
2018-02-10 02:49:30 +00:00
Gabriel de Dietrich
bd80f00f84 QMacStyle: Fix crash when using Freetype font engine
This amends cf7a4016a1.

Change-Id: I8bb3e934d10b2f522539b73ceaa80a9a4608ef12
Task-number: QTBUG-66248
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-02-09 19:49:44 +00:00
Tor Arne Vestbø
ad8a3e3530 logging: Group alternate logging sink implementations
Change-Id: Iac703559658edf16c56f4c54cf71cd6188d1db4e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-09 19:45:46 +00:00
Tor Arne Vestbø
4962b0bee9 macOS: Don't log missing forwarding target during notification forwarding
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>
2018-02-09 13:30:17 +00:00
Alexander Volkov
5a868fe0bb xcb: Drop _QT_SETTINGS_TIMESTAMP_ atom
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>
2018-02-08 21:35:39 +00:00