Commit Graph

828 Commits

Author SHA1 Message Date
Joerg Bornemann
067fb7915a pro2cmake: Fix qmake parser's line continuation handling
The qmake parser of pro2cmake handles completely commented lines to make
assignments like this work:

    SUBDIRS = \
       foo \
    #  bar \
       bar

However, assignments like

    SUBDIRS = \
       foo \
       #bar \
       bar

were cut off at the commented line.

Fix this by allowing leading whitespace for "fully commented lines".

Change-Id: Ib5de850a02fd9b9ebb7c056c2f64f9d684334b08
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-02 23:44:15 +02:00
Lars Knoll
6778b247a8 Add a QBindingStorage class
QBindingStorage is a class that can store a set of binding objects
for the properties of a QObject. This will get used to reduce the
memory overhead of the property system when adding bindable properties
to QObject based classes.

The binding storage has a pointer to the TLS entry containing the
currently evaluating binding. Like that we avoid repeated TLS
lookups and reduce the overhead of the property system to one
pointer lookup and one compare for the case that properties
aren't being used.

Each QObject now owns one binding storage object, that can be used to
store binding data for properties that members of the QObject.

Change-Id: I27427c03c2ba281f072e074be96147bdbcaac246
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-02 22:44:28 +02:00
Giuseppe D'Angelo
c1454d07cf Take the right lock before using a connection's receiver
When a signal/slot connection is activated, a lock on the receiver
object is taken (to be sure it doesn't get destroyed).
The path for blocking queued connections however took the lock on
the sender by accident, fix that.

Pick-to: 5.15 5.12
Change-Id: I8cd938a50eca2bf71e7bfb86768ee0c8431afdfa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-01 02:48:40 +02:00
Tor Arne Vestbø
70def4341a Avoid inifinite recursion call in tst_Compiler::cxx11_noexcept
warning: all paths through this function will call itself [-Winfinite-recursion]

Change-Id: I70008710a7448ffd532bb6c3acb488fe439cb807
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-28 09:43:14 +00:00
Jonas Karlsson
3558704ed5 Use OpenType font weights
Task-number: QTBUG-42248
Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-08-28 07:26:54 +02:00
Volker Hilsheimer
fab8933d5b Don't skip QFileDialog retranslatability test on macOS
The test explicitly asks for a non-native file dialog, which works on
macOS as well.

Change-Id: I964c6d98501b4207c2b6c2ce1df39f654c801a43
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-26 03:45:30 +02:00
Volker Hilsheimer
872e37b2ff Implement QAbstractFileIconProvider to use theme and mime databases
This doesn't give useful defaults on all platforms; icon themes are not
provided on platforms other than Linux, and the mime database doesn't
always return user-friendly names based on file names.

However, both icon themes and the mime database can be customized by
application developers by shipping a data file side-by-side with the
application, without the need for reimplementing the provider class.

Change-Id: Ie4b18ac1b861e2da64f01d1f209986b27fbe6bd5
Task-number: QTBUG-66177
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-26 01:13:19 +02:00
Alex Trotsenko
556a7e7318 QIODevicePrivate: rearrange class members
As this class is a subject of the library hook data, there must be a
solid understanding of the member's alignment and padding across
different architectures. By reordering the layout, this patch provides
a clearer way of adding new members to the class.

Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.

Change-Id: Ied8b69bdeb9da50ff05aba2107bc75509674b18e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-24 14:50:56 +03:00
Lars Knoll
1697fbdf05 Deprecate the static int based API in QMetaType
And remove one of the type id to name mapping that still
existed in QMetaType. QMetaTypeInterface can provide that,
so there's no need to have a second copy of the data.

qMetaTypeTypeInternal() can still map all the names of all
builtin types to ids. That functionality is for now still
required by moc and can't be removed yet.

Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-24 00:19:05 +02:00
Lars Knoll
0daa9dbfc4 Generate less code when creating QMetaTypeInterfaces
There is no need to generate wrapper functions for equals,
lessThan or debugStream for pointer types, as those can
easily be handled by a few lines of code in QMetaType itself.

Change-Id: If79b3bc3a629249c1d17c9e592202f08b59f80ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-24 00:17:04 +02:00
Lars Knoll
ed8acbeb7c Automatically register data/debug stream operations in QMetaType
And remove the old manual registration code for those operators.

Add some special handling for long/ulong, as these types could be
streamed as a QVariant so far, but are not directly streamable
through QDataStream.

[ChangeLog][QtCore][QMetaType] The QMetaType::registerStreamOperators()
and QMetaType::registerDebugStreamOperator() methods have been
removed. The streaming operators for a type are now automatically
registered together with the type registration.  This implies that the
operators should be visible wherever the type is visible and being used.

[ChangeLog][Behavior Incompatible Changes] Because the QDataStream and
QDebug serialization operators are automatically registered with
QMetaType, the declarations of those functions must be present at any
point where the type is used with QMetaType and QVariant.

Change-Id: I4a0732651b20319af4a8397ff90b848ca4580d99
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-24 00:17:03 +02:00
Edward Welbourne
16e546e32f Properly deprecate Qt::MidButton in favor of Qt::MiddleButton
MidButton had its // ### Qt 5: remove me
upgraded to Qt 6 at 5.0; but it dates back to 4.7.0

Replace the many remaining uses of MidButton with MiddleButton in the
process.

Pick-to: 5.15
Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-22 21:47:36 +02:00
Alex Trotsenko
a41c61fb2d QIODevice: implement a "zero-copy" strategy for buffered writes
It works as follows:

  - user calls write(const QByteArray &);
  - this function keeps a pointer to the chunk and calls a regular
    write(data, len);
  - write(data, len) calls a virtual writeData();
  - subclass calls a new QIODevicePrivate::write();
  - QIODevicePrivate::write() makes a shallow copy of
    the byte array.

Proposed solution is fully compatible with existing subclasses.
By replacing a call to d->writeBuffer.append() with d->write(),
subclasses can improve their performance.

Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.

Change-Id: I24713386cc74a9f37e5223c617e4b1ba97f968dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-08-20 18:24:15 +03:00
Tor Arne Vestbø
f418a96f9b Disable warning about self-move and self-assign-overload
Change-Id: I1d20d3f424eced5cc5787934663b9d243f75d46e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-26 18:06:34 +02:00
Tor Arne Vestbø
d96193b0ec Fix warning when printing of qsizetype
warning: format specifies type 'int' but the argument has type 'qsizetype' (aka 'long long')

Change-Id: I6099b53efecea46d191d5dc019c986f99e49c1f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-26 17:39:31 +02:00
Friedemann Kleint
773a6bffd7 Tests: Use QVERIFY instead of QCOMPARE for empty lists
Pick-to: 5.15
Change-Id: I4da02fa11583eca3844bf42efcdf818b8bbd6a94
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-07-10 14:30:58 +02:00
Alexandru Croitor
db397d1113 CMake: Regenerate subdir test projects
And generate a few more test projects that were missing.

Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-07-09 09:38:39 +02:00
Alexandru Croitor
e9a328bc0e CMake: Regenerate tests with new qt_ prefixed APIs
Use pro2cmake with '--api-version 2' to force regenerate
projects to use the new prefixed qt_foo APIs.

Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-09 09:38:35 +02:00
Alexandru Croitor
5417f1e40c CMake: Regenerate tests
This is in preparation for regenerating them with the new qt_foo
prefixed APIs.

Change-Id: Iff34932d642b1c0186ee39f952adf3ad367fd602
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-09 09:38:31 +02:00
Lars Schmertmann
18cfabafa6 Remove unnecessary ; after function implementations
Task-number: QTBUG-82978
Change-Id: Iea3bcaec1ef9f4bd0f73e5dccca33354650f5bf4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-07-06 11:46:39 +02:00
Jarek Kobus
e721ec269e Use QList instead of QVector in other tests
Task-number: QTBUG-84469
Change-Id: I656c9f73bd2364be39ee67747524e7c4a25c0935
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-25 10:14:24 +02:00
Giuseppe D'Angelo
3e1d03b1ea Port Q_STATIC_ASSERT(_X) to static_assert
There is no reason for keep using our macro now that we have C++17.
The macro itself is left in for the moment being, as well as its
detection logic, because it's needed for C code (not everything
supports C11 yet).  A few more cleanups will arrive in the next few
patches.

Note that this is a mere search/replace; some places were using
double braces to work around the presence of commas in a macro, no
attempt has been done to fix those.

tst_qglobal had just some minor changes to keep testing the macro.

Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-19 19:38:23 +02:00
Shawn Rutledge
6589f2ed0c Introduce QInputDevice hierarchy; replace QTouchDevice
We have seen during the Qt 5 series that QMouseEvent::source() does
not provide enough information: if it is synthesized, it could have
come from any device for which mouse events are synthesized, not only
from a touchscreen. By providing in every QInputEvent as complete
information about the actual source device as possible, we will enable
very fine-tuned behavior in the object that handles each event.

Further, we would like to support multiple keyboards, pointing devices,
and named groups of devices that are known as "seats" in Wayland.

In Qt 5, QPA plugins registered each touchscreen as it was discovered.
Now we extend this pattern to all input devices.  This new requirement
can be implemented gradually; for now, if a QTWSI input event is
received wtihout a device pointer, a default "core" device will be
created on-the-fly, and a warning emitted.

In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when
multiple devices were in use simultaneously. Now that each event
identifies the device it came from, this hack is no longer needed.

A stub of the new QPointerEvent is added; it will be developed further
in subsequent patches.

[ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer
to an instance of QInputDevice, or the subclass QPointingDevice in case
of mouse, touch and tablet events. Each platform plugin is expected to
create the device instances, register them, and provide valid pointers
with all input events. If this is not done, warnings are emitted and
default devices are created as necessary. When the device has accurate
information, it provides the opportunity to fine-tune behavior depending
on device type and capabilities: for example if a QMouseEvent is
synthesized from a touchscreen, the recipient can see which touchscreen
it came from. Each device also has a seatName to distinguish users on
multi-user windowing systems. Touchpoint IDs are no longer unique on
their own, but the combination of ID and device is.

Fixes: QTBUG-46412
Fixes: QTBUG-72167
Task-number: QTBUG-69433
Task-number: QTBUG-52430
Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-16 22:06:56 +02:00
Volker Hilsheimer
44fb925f50 Phase 2 of removing QDesktopWidget
Remove QDestopWidget public header, simplify the implementation that
maintains a Qt::Desktop type QWidget for each QScreen, and turn
QWidget's initial target screen into a QScreen pointer.

QApplication::desktop() now takes an optional QScreen pointer, and
returns a QWidget pointer, so that applications and widgets can get
access to the root widget for a specific screen without having to
resort to private APIs.

QDesktopWidgetPrivate implementations to look up a screen for an index,
widget, or point are now all inline functions that thinly wrap
QGuiApplication::screens/screenAt calls. We should consider adding those
as convenience APIs to QScreen instead.

Note that QWidget::screen is assumed to return a valid pointer; there is
code that handles the case that it returns nullptr (but also code that
trusts that it never is nullptr), so this needs to be defined, verified
with tests, and asserted. We can then simplify the code further.

Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-06-08 20:29:49 +02:00
Shawn Rutledge
a061a64642 Replace calls to deprecated QEvent accessor functions
Many of these were generated by clazy using the new qevent-accessors check.

Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-08 19:11:51 +02:00
Eskil Abrahamsen Blomfeldt
3279c8e7d7 Move some flaky text tests into Lancelot
There are some slight differences between normal drawText()
and QGlyphRuns/QStaticText for decoration widths in certain
fonts. We decided to accept this and tried working around it
in the test by using ForceIntegerMetrics (since the difference
is < 0.5 pixel). This enum has been deprecated, so we move
the tests into Lancelot instead, since the idea here is to
test for regressions, not to compare the two painter commands.

Note that there is something off about decorations with
drawGlyphRuns() and drawStaticText() which is exposed
(not caused) by this, perhaps related to using a matrix
for positioning, since that was untested before.

This also takes the liberty of moving the emoji test string
from text.qps, since this was not in the statictext.qps yet.

Change-Id: Ib2d697095cbd11829cdd50b3c0268c85e9607c78
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-06-08 06:45:49 +02:00
Oliver Wolff
45b0f1be68 Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.

Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-06 20:25:49 +02:00
Alexandru Croitor
0cbd307d6a CMake: Regenerate tests/auto/other project
Change-Id: I0dbcef3c918b9502528bf2fe0907a7582dcde0ea
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-04 23:21:00 +02:00
Alexandru Croitor
9b1190fd68 CMake: disable macnativeevents tests
It's disabled in qmake too, due to being almost all blacklisted
and flaky. Plus locally when i tested, i had to give accessibility
permissions manually, otherwise it failed.

Change-Id: I55ce7a81c46ac28f41c43f5c159fecc22d489966
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-04 23:20:55 +02:00
Tor Arne Vestbø
93a04332eb Move QtAccessibilitySupport into QtGui
Task-number: QTBUG-83255
Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-02 23:32:36 +02:00
Friedemann Kleint
9c31acbf47 Move windowsuiautomation API support into QtGui
Task-number: QTBUG-83255
Change-Id: Ibface71931b6384494842ba9744d76f738c5ca85
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-27 22:28:41 +02:00
Heikki Halmet
d8ea25b917 BLACKLIST test_Gestures tests for new platforms
Task-number: QTBUG-84258
Change-Id: I4722444ffd8a9b1ebc262a424778a19704881832
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-25 05:16:10 +00:00
Lars Knoll
b4fd377aa9 Make utf8_source the default for qmake builds
We now assume that source code is encoded in UTF-8 by default on
all platforms (and verify this with an auto test). Provide
a CONFIG+=no_utf8_source option for backwards compatibility.

[ChangeLog][qmake] qmake will tell the compiler that source code is
encoded in utf-8 by default. This mainly has an effect on Windows, where
MSVC still assumes source code is encoded in the current ANSI code page.
Use CONFIG+=no_utf8_source to get back the Qt 5 behavior.

Change-Id: I6dcafcaeefdea7d3907ccb723aeb7d23ccc0f04f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 19:14:51 +02:00
Andrei Golubev
b428e98052 Make qtbase compile without QT_CONFIG(timezone)
Fixes: QTBUG-83795
Pick-to: 5.15
Change-Id: I05eaaf57d87a9111d3609ebab81bc707f8af98f0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-11 14:42:00 +03:00
Marc Mutz
05a38c05f7 tst_Gestures: fix -Wdangling-else GCC warning
... and do a local code cleanup:

- add override
- port from foreach to C++11 ranged for loop
- remove dead code (`gestureEvent` (née event) was already
  dereferenced when we check it for null'ness, so it cannot be
  nullptr, so the condition is always true).

Pick-to: 5.15
Change-Id: Ica5e34fbe65c95f6573630f188582b90be15c8f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-04-29 08:10:36 +00:00
Volker Hilsheimer
0fda43cf33 Remove deprecated members from QtGui/image classes
Cleaning up those that are trivial to remove because they have direct
replacements.

Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-29 06:20:07 +02:00
Qt Forward Merge Bot
8823bb8d30 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/opengl/doc/src/cube.qdoc
	src/corelib/global/qlibraryinfo.cpp
	src/corelib/text/qbytearray_p.h
	src/corelib/text/qlocale_data_p.h
	src/corelib/time/qhijricalendar_data_p.h
	src/corelib/time/qjalalicalendar_data_p.h
	src/corelib/time/qromancalendar_data_p.h
	src/network/ssl/qsslcertificate.h
	src/widgets/doc/src/graphicsview.qdoc
	src/widgets/widgets/qcombobox.cpp
	src/widgets/widgets/qcombobox.h
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
	tests/manual/diaglib/debugproxystyle.cpp
	tests/manual/diaglib/qwidgetdump.cpp
	tests/manual/diaglib/qwindowdump.cpp
	tests/manual/diaglib/textdump.cpp
	util/locale_database/cldr2qlocalexml.py
	util/locale_database/qlocalexml.py
	util/locale_database/qlocalexml2cpp.py

Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.

Updated CMakeLists.txt in each of
	tests/auto/corelib/serialization/qcborstreamreader/
	tests/auto/corelib/serialization/qcborvalue/
	tests/auto/gui/kernel/
and generated new ones in each of
	tests/auto/gui/kernel/qaddpostroutine/
	tests/auto/gui/kernel/qhighdpiscaling/
	tests/libfuzzer/corelib/text/qregularexpression/optimize/
	tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
	tests/libfuzzer/gui/text/qtextdocument/sethtml/
	tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
	tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.

Changed target name in
	tests/auto/gui/kernel/qaction/qaction.pro
	tests/auto/gui/kernel/qaction/qactiongroup.pro
	tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake

Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.

Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
2020-04-08 20:11:39 +02:00
Mårten Nordheim
d8b49e6b51 QtNetwork: Delete bearer management
All remaining pieces are gone, configuration included.

Relevant CMakeLists and configure.cmake were regenerated.

Fixes: QTBUG-76502
Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-05 16:41:08 +02:00
Eirik Aavitsland
533f7d7ca3 Raster painting: fix dashing for separate lines
When drawing multiple distinct (unconnected) lines (e.g. from
QPainter::drawLines() or a QPainterPath with alternating
movetos/linetos), the dash pattern should not continue from one to the
next, as it should when drawing a connected line (e.g. polyline).
Both the cosmetic stroker and the full stroker does it right, but the
fast rasterizing codepath got it wrong.

Fixes: QTBUG-83048
Change-Id: I3d090f7121726755a0e53cb66b99a5563ac0e1c0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-03-27 12:31:01 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00
Qt Forward Merge Bot
865afac250 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
2020-03-11 15:34:21 +01:00
Jarek Kobus
50d2acdc93 Add default arguments to QPainterPath methods using transform
Fixes: QTBUG-82602
Change-Id: Id82f145ffb33e6d4ef9b81282ad14657b1c8fbd0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-06 21:09:48 +01:00
Qt Forward Merge Bot
63312fe2ec Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
2020-03-03 14:13:02 +01:00
Edward Welbourne
305ddbeb5b Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-28 15:37:11 +01:00
Lars Knoll
7ef6ddaf7a Remove useless autotest
qtokenautomaton is something from xmlpatterns. The fact that this
didn't fail with xml patterns not part of qtbase anymore shows that
the test doesn't do anything :)

Change-Id: Ibb1705fe57dac148f0283fba1193126d4d924868
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-28 10:07:05 +01:00
Lars Knoll
a450cce6b6 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
2020-02-28 09:48:30 +01:00
Alexander Akulich
6d18e4a2b8 Revert "QAbstractSocket: deprecate 'error' member-function"
This reverts commit 94b3dd77f2.

The patch fixes ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commit to keep the getter as is and change the signal name instead.

Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-26 23:07:52 +03:00
Alexandru Croitor
0d177053b9 Regenerate projects one last time before merge
Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-12 17:30:49 +00:00
Alexandru Croitor
43d2b60a29 Post-merge fixes
Change-Id: I6acd29103f6cc550544e7422328d97ea0e2dcafb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-30 20:45:08 +00:00
Alexandru Croitor
a1dbdcbd6e Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
        src/corelib/Qt5CoreConfigExtras.cmake.in
        src/corelib/Qt5CoreMacros.cmake
        src/dbus/Qt5DBusConfigExtras.cmake.in
        src/widgets/Qt5WidgetsConfigExtras.cmake.in

Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
2020-01-29 16:57:27 +01:00
Simon Hausmann
a4ea0d9eac Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia5727ce68001bcaab467f5fae3a4933d1217015f
2020-01-28 18:27:28 +01:00
Qt Forward Merge Bot
082faeff9c Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/gui/image/qpnghandler.cpp

Change-Id: I8630f363457bb613d8fb88470a71d95d97cdb301
2020-01-28 08:09:51 +01:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Tor Arne Vestbø
92918e567a Flatten version-specific blacklisting on macOS to all macOS versions
We don't know which versions these blacklistings actually apply on
unless we actually get macOS 10.14 and 10.15 into the CI and running
tests, so let's start with that, and then granularize the blacklists
after that.

Task-number: QTBUG-75786
Change-Id: Id79642afa50cb20efa2cd209286b6933918d3a4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-22 17:58:31 +01:00
Johan Klokkhammer Helsing
f3ecda32e0 Move QOpenGLPaintEngine and related classes from QtGui to QtOpenGL
Also moves the openglwindow test to the opengl folder, as it makes use of these
classes.

Task-number: QTBUG-74409
Change-Id: Id9f0013cedcc8bd1e87122c005641d7298525045
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-01-22 09:40:59 +01:00
Leander Beernaert
7c6f763d85 Regenerate Tests
Change-Id: I78f1efbec809610bcf6a8224392fa0dc8dbf3b3b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-16 08:16:17 +00:00
Leander Beernaert
ba96b0cbd9 Disable qaccessibilitylinux test
The qaccessibilitylinux does not work properly and is also disabled in
qmake.

Change-Id: I8d047c86c792751f28f296b00421babeb42db778
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 13:16:57 +00:00
Qt Forward Merge Bot
cccc9d0b95 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
2020-01-13 10:13:01 +01:00
Timur Pocheptsov
94b3dd77f2 QAbstractSocket: deprecate 'error' member-function
The one that is a getter for the last error found. This is to disambiguate
the expression '&QAbstractSocket::error'. Introduce a new member-function
socketError as a replacement.

[ChangeLog][Deprecation Notice] QAbstractSocket::error() (the getter) is deprecated; superseded by socketError().

Task-number: QTBUG-80369
Change-Id: Ia2e3d108657aaa7929ab0810babe2ede309740ba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-10 12:54:53 +01:00
Jean-Michaël Celerier
ea81b69cde Implement qtbase fixes for superbuilds
Change-Id: I0d3445cf0740e3925fa9342dac4d07892518afe5
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-08 10:42:21 +00:00
Liang Qi
a503bf5470 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qvector.h
		Make QVector(DataPointer dd) public to be able to properly merge
		5b4b437b30 from 5.15 into dev.
	src/widgets/kernel/qapplication.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
2020-01-04 15:32:34 +01:00
Qt Forward Merge Bot
4054c0d6ed Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	src/plugins/platforms/xcb/qxcbscreen.cpp
	src/widgets/accessible/qaccessiblewidget.cpp

Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
2019-12-27 09:29:30 +01:00
Peter Varga
a132e02540 Fix QAccessibleWidget::focusChild() to return focused descendant
This method should not ignore accessibility objects without
corresponding widget. The widget may have parts with their own
QAccessibilityInterface and these can be also focused.

VoiceOver ignores them if they are not returned by focusChild().

QAccessibleTabBar::focusChild() has been implemented to demonstrate
the concept and make tab titles of QTabBar readable by VoiceOver.

Task-number: QTBUG-78284
Change-Id: Id7c62d86154bbd5d47d6bbee8cb7d05268c2e151
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-12-19 08:39:10 +01:00
Thiago Macieira
746ab4bbd6 Inline the size and data pointer members in QString
I'd have preferred to use QArrayDataPointer<ushort> for QString, but
that option wasn't the best one. QArrayDataPointer try to do some
operations using QArrayDataOps and that would expand to unnecessary
code. What's more, the existing code expected to be able to modify and
access the d pointer.

Instead, this commit introduces QStringPrivate (named differently from
QStringData to catch potential users), which contains the three
members. This POD class is also used in QJsonValue to store the
"inlined" QString. QHashedString in qtdeclarative will need a similar
solution.

Change-Id: I33f072158e6e2cd031d4d2ffc81f4a8dbaf4e616
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-12-08 18:19:50 +01:00
Thiago Macieira
b42a2b3c33 Inline the size and begin pointer in QVector
Add QGenericArray to simplify operations. This class can be shared by
other tool classes. If there is nothing else to share it, we can move
the code onto qvector.h. The one candidate is QList.

All tests pass and valgrind is good.

Change-Id: Ieaa80709caf5f50520aa97312ab726396f5475eb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-12-08 18:19:38 +01:00
Qt Forward Merge Bot
0c29ebe374 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
2019-12-04 01:00:23 +01:00
Samuel Gaist
f81f21151d Session management for macOS
This patch aims to implement the session management available on macOS.
Currently applicationShouldTerminate is just a go through that closes
everything and ends the application. The new implementation calls
first appCommitData and cancels the termination properly if required.
This means that if a user wishes to logout, Qt applications can now
cancel that like e.g. answering to Safari asking whether it is ok to
close because of a number of opened tab/window.

Fixes: QTBUG-33034
Change-Id: Id5d7416cb74c762c5424a77c9c7664f0749da7f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-12-02 18:18:22 +01:00
Qt Forward Merge Bot
4c89005ebe Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Icbb60f8c1891ec2779575276495199ace9d3d6c3
2019-11-30 01:00:58 +01:00
Allan Sandfeld Jensen
00c869a5c6 Fix lancelot PaintCommands for reuse
Some structures needed to be cleaned for the reuse to be safe.
Reusing it cuts down on the overhead in lancebench.

Also uniqueness of block names are now enforced, and the common pattern
of "end_block blockName" could now be parsed if not always commented
out by begin_block handling.

Change-Id: I0daf6445292383aaab9392550d0842e0a654ad27
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-11-28 19:52:16 +00:00
Friedemann Kleint
d3814e51bb Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I5bdfe94f7eec1ba328c4a4b54d12dbc0da7fc3ac
2019-11-27 08:41:33 +01:00
Friedemann Kleint
d556d7a6b8 Avoid initializing QFlags with 0 or nullptr in tests
Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99.

Change-Id: Ib5d17611e43e7ab2c63c7f0587f549377f262e32
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-11-26 09:08:51 +01:00
Qt Forward Merge Bot
58c69df4d3 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qhash.h
	src/gui/kernel/qevent.h
	src/widgets/kernel/qshortcut.cpp
	src/widgets/kernel/qshortcut.h

Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
2019-11-25 11:30:04 +01:00
Allan Sandfeld Jensen
af2daafde7 Deprecate constructing QFlags from a pointer
This was used to support QFlags f = 0 initialization, but with 0 used
as a pointer literal now considered bad form, it had been changed many
places to QFlags f = nullptr, which is meaningless and confusing.

Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-20 19:43:38 +01:00
Leander Beernaert
26e8769124 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
2019-11-19 13:53:21 +01:00
Alexandru Croitor
6d29435568 Regenerate tests/auto/other
Change-Id: Ib1753d1869f5af1900fbeaf2e95d3160cf979ca8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 10:12:04 +00:00
Qt Forward Merge Bot
4b0af2cdbf Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I68a6ed3184e62fa89c47c564bb01002c0918d0fd
2019-11-01 01:01:02 +01:00
Qt Forward Merge Bot
a317bff298 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib4df563fc7b1f7c40f425e0e71180d9517a672be
2019-10-30 01:00:14 +01:00
Volker Hilsheimer
226a60baf5 Replace Q_ALIGNOF usage in qtbase with C++11 alignof keyword
The macro is not documented, so not part of the public Qt API. It is
made obsolete by the alignof keyword in C++11.

Remove the usage of the macro across qtbase, in particular the
workarounds for compilers that didn't support alignof, and that will
not be supported in Qt 6.

The macro definition is left in place, no need to break existing
code.

Task-number: QTBUG-76414
Change-Id: I1cfedcd4dd748128696cdfb546d97aae4f98c3da
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-29 10:37:02 +01:00
Leander Beernaert
0cab837fd7 Convert tests/auto/other
Change-Id: I79ba4f6bbbbede8ddab278dd987d9ad98277a229
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-28 12:19:50 +00:00
Qt Forward Merge Bot
08f90adffd Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/serialization/qjson_p.h

Change-Id: I83cea141a4de8b3998478bfded84ca9029f7a2a9
2019-10-28 10:50:03 +01:00
Friedemann Kleint
dff3843d98 QShortcut: Properly port to the new configure system
Move the feature to corelib so that the QMetaType enumeration
values can be properly excluded and there is no need for a
dummy class.

Use QT_REQUIRE_CONFIG in the headers of classes to be disabled.
Add headers/source files in the .pro file depending on the configure
feature in libraries and tests.
Add the necessary exclusions and use QT_CONFIG.

Task-number: QTBUG-76493
Change-Id: I02499ebee1a3d6d9a1e5afd02517beed5f4536b7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-10-25 12:12:39 +02:00
Edward Welbourne
59ca056a79 Exclude tests that need GUI when GUI isn't available
Thanks to Dmitriy Purgin for pointing out the serialization one.

Task-number: QTBUG-79353
Change-Id: Ia3d750b17ddd8fbb7a83a55df7e4546ca78c358b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-25 11:42:09 +02:00
Qt Forward Merge Bot
dce8849037 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4fbbf100b673ab100997dbf2f42bf195dc3c050f
2019-10-18 01:00:35 +02:00
Eirik Aavitsland
ea377c5a2f Add testing of fillRect() to QPainter lancelot test
Change-Id: I3be230d3fafa178a37cf7387f79f372c8d8aeb05
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-16 06:31:59 +00:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Alexandru Croitor
f4b4c4f79b Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
2019-10-11 16:23:19 +02:00
Frederik Gladhorn
5e421957de Fix strange qmake syntax
It seems like qmake is happy with the comment, followed by a
continuation and then another comment, but having the continuation at
the end of the line makes more sense.
This will make it easier to port to CMake.

Change-Id: I20c964e8c3b6fea4745095783503045b191b000b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-10 16:57:37 +02:00
Tor Arne Vestbø
0768a28fbf Remove CFBundleGetInfoString from Info.plist templates
Is't been deprecated since Mac OS X 10.5.

Task-number: QTBUG-74872
Change-Id: I8b1ad7aca6448883cb164fd0c4b329592ca60548
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-04 13:09:34 +00:00
Friedemann Kleint
1d53b6d9f2 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp

Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
2019-09-09 07:51:49 +00:00
Qt Forward Merge Bot
1f35c8caa0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
2019-09-08 11:33:28 +02:00
Eirik Aavitsland
6bb51e0f08 QPainter lancelot test: improve drawImage testing
In QPainter, there is a shortcut code path for the drawImage(point,
image) call, relative to the full drawImage(targetRect, img,
srcRect). The lance script interpreter would only use the latter, so
the former was not covered by the tests.

As a driveby, remove the pointless usage of non-default dithering
flags in drawImage(), since it is more important to test the default.

Change-Id: Id373fd528a0c4c40b6bd8eea37b960fd7cdb2cc7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-09-02 12:08:40 +02:00
Liang Qi
0f1f7fb97f Merge remote-tracking branch 'origin/dev' into 5.14
Conflicts:
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	src/widgets/kernel/qwidgetrepaintmanager.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
2019-08-27 09:45:52 +02:00
Tor Arne Vestbø
ce73b4db62 Remove dead code from Qt 4 times
The benefit of keeping this code around was to inspire or inform
changes in the areas to take into account possibly missing features
in Qt 5, but at this point that benefit is questionable. We can
always use the history to learn about missing pieces if needed.

Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 22:27:46 +00:00
Daniel Smith
662fec6f0d Update for failures only on dev branch. Use general platform names
This patch was generated with tooling from patchset 31 of
https://codereview.qt-project.org/c/qt/qtqa/+/267034 in interactive
mode. General platform names were chosen if greater than 60% of the
currently active platforms of a given type in COIN recently failed.

Change-Id: Ia4bde7f0ec422bbb727dc9d7151295159094f146
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-19 18:22:11 +02:00
Alexandru Croitor
c7ec7cd2a1 Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
2019-08-15 16:53:19 +02:00
Qt Forward Merge Bot
425d34b70e Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Icc80dacbca8613f2996be75553ff15d0ad242b7e
2019-08-15 01:00:51 +02:00
Allan Sandfeld Jensen
8bd48a1c33 Fix crash in optimized solid fills on RGBA64PM
Was expecting destStore64 to be non-null.

Change-Id: I4fc827256630a35e0669d405c04f9b5b7e71580e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-08-14 10:57:13 +02:00
Lars Knoll
00076a2695 Don't insert items into the wrong row
This happened to work by chance, as QList::insert() would
gracefully handle out of bounds insertions.

Change-Id: I7ee1e645ed9a538946a509957ce5155641ffea1d
Reviewed-by: David Faure <david.faure@kdab.com>
2019-08-13 07:34:00 +01:00
Marc Mutz
5f1f0fe0b7 QDateTimePrivate: inherit QSharedData and other cleanups
Don't manage the ref-count yourself, as this requires the code to use
the QAtomic copy ctor, which we want to remove going forward. Using
QSharedData, we can let the compiler write the code for us.

Since 'ref' this way moves to the first spot in the list of effective
members, creating a 4B hole between itself and 'msecs', swap 'status'
and 'msecs' to fill the hole:

  offset:   0       8      16      24
            |       |       |       |
  without   v       v       v       v
  adj.mnt: |*R*|   | msecs | S | U | TZ....
  before:  | msecs | S | U |*R*|   | TZ...
  after:   |*R*| S | msecs | U |   | TZ....

This keeps the padding out of the critical first word, which improves
latency. That said, for accessing the members the old layout surely was
optimal. This layout optimizes copies and pessimizes access to 'msecs'
on 32-bit platforms without the Critical Word First optimization.

Requires adjustments to tst_toolsupport and the qhooks version.

Also default members using NSDMI, consequently drop the manual default
ctor.

Change-Id: I3c48e68694ad29b28a13aa47ea0f283fae52edd7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-07 20:09:13 +00:00
Sona Kurazyan
2f33e030b8 Remove usages of deprecated APIs of qtbase/gui
- Replaced the usages of deprecated APIs by corresponding
  alternatives in the library code and documentation.

- Modified the tests to make them build when deprecated APIs disabled:
    * Made the the parts of the tests testing the deprecated APIs to
      be compiled conditionally, only when the corresponding methods are
      enabled.
    * If the test-case tests only the deprecated API, but not the
      corresponding replacement, added tests for the replacement.

Change-Id: Ic38245015377fc0c8127eb5458c184ffd4b450f1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-13 10:43:15 +02:00
Alexandru Croitor
4dac45c9ee Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
2019-07-11 17:17:51 +02:00
Daniel Smith
6c136973fd unblacklist passing tests
These tests have not failed on the removed platforms for at least 60 days

Task-number: QTBUG-76608
Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-08 11:01:42 +00:00
Liang Qi
bd9959bde2 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/network/ssl/qsslsocket_openssl.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
2019-06-20 07:50:44 +02:00
Liang Qi
ef37ab9970 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/network/ssl/qsslsocket_openssl.cpp
	src/plugins/platforms/android/qandroidinputcontext.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
2019-06-25 13:04:27 +02:00
Alexandru Croitor
e4079eca49 Merge remote-tracking branch 'origin/dev' into wip/cmake
Take 5.

Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
2019-06-03 15:14:42 +02:00
Giuseppe D'Angelo
34fe9232db Port from QAtomic::load() to loadRelaxed()
Semi-automated, just needed ~20 manual fixes:

$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} +
$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} +

It can be easily improved (e.g. for store check that there are no commas
after the opening parens). The most common offender is QLibrary::load,
and some code using std::atomic directly.

Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-06-20 20:48:59 +02:00
Edward Welbourne
84e89c1e9e Convert uses of QTime as a timer to QElapsedTimer
Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-06-14 10:42:33 +02:00
Samuel Gaist
2d72bf6019 Remove unused QRegExp include
There's no use of QRegExp here therefore remove the include

Task-number: QTBUG-72587
Change-Id: If281c34d202c9fae4e548c8293443cc0dc283de0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-10 19:25:12 +00:00
Tobias Hunger
6630937e63 Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
2019-04-16 16:32:08 +02:00
Qt Forward Merge Bot
e56d3b03ed Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale_data_p.h
        (Regenerated by running the scripts in util/local_database/)
	src/gui/opengl/qopengltextureuploader.cpp

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
2019-05-09 13:06:11 +00:00
Frederik Gladhorn
490ee4c5e6 Fix compilation of tst_qaccessibilitylinux
Note that the test is still disabled, but this is needed in any case.

Change-Id: Ib7523ba800b94c32690c1bd09b23fc2078c71d4e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-07 10:07:59 +00:00
Frederik Gladhorn
eba3b567d6 Accessibility: Improve handling of read-only state
We have been rather sloppy in how read-only versus editable is handled.
According to the definition, editable signifies that in principle a
widget allows the user to change its text. Read-only means that this
ability is (currently) disabled.

Task-number: QTBUG-75002
Change-Id: I5d71843abcdaac52f4a60a1abcac2604341f6c96
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-07 10:05:30 +00:00
Eirik Aavitsland
ecfda0d523 Fix manual lance test: avoid using deprecated api
...and other slight modernizations and minor fixes.

Change-Id: Ide587d9fe59ca9113ae775882c99a50debaf9000
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-26 07:47:12 +00:00
Qt Forward Merge Bot
0dff40adf8 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I6ecf7074eda57ef4954fb3fdc7a6d1e8cd229340
2019-04-26 01:00:13 +02:00
Eirik Aavitsland
d6c3fa6e0c Fix aliased painting with non-uniform scaling
The full stroker does not produce good results for aliased lines
thinner than 1 pixel. Avoid it by making sure that such thin lines
are painted by the cosmetic stroker, even when they have
non-uniform transformation.

Fixes: QTBUG-73866
Change-Id: I7b5f0fa555903246e0c3fd92cd435cc8c0b15a24
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-25 06:07:00 +00:00
Lars Knoll
4a470101e4 Stabilize auto test
Don't just wait for 300ms for the thread to finish, this can
lead to faling tests esp. on slow hardware.

Also fix a mem leak.

Change-Id: Ifa90da5507fc6d65ef77e368d7c238271623ff53
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-27 09:38:20 +00:00
Friedemann Kleint
7f635d9777 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I38389a69411f4549fed432f1181dbe23398b34a2
2019-03-26 08:24:59 +01:00
Tony Sarajärvi
58a87609a6 Extend blacklisting of tst_gestures from RHEL 7.4 to 7.6
Task-number: QTBUG-52523
Change-Id: I726a17e30b47781c1a5385e6220cce88c5a6fe2d
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-03-21 13:17:02 +00:00
Eirik Aavitsland
1640973a82 Fix raster paint error in path joins of tightly bending bezier curves
The code for generating round line joins is optimized with a shortcut
for the inner, normally invisible joins.  For certain joins of a
tightly turning bezier, this optimization would lead to visible
painting error. Fix by avoiding the optimization if the next control
point is so close as to allow such tight turns.

As a driveby, make the angle > 90 test cheaper, since absolute
precision is not required in the optimization choice.

Fixes: QTBUG-75008
Change-Id: I293e0776003310dc36fa7f43fbcd9c25f1f8fa5d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-06-14 11:02:35 +02:00
Marc Mutz
d2ed1074d0 tests: remove the last uses of Java-style iterators
... except where they are actually the component under test.

Java-style iterators are scheduled for deprecation.

Change-Id: If4399f7f74c5ffc0f7e65205e422edfa1d908ee8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-06-13 09:40:26 +02:00
Qt Forward Merge Bot
261c0dedac Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I056b658ffe9390dfcbe2787e2bddc7f4e9b389dd
2019-03-09 01:00:55 +01:00
Liang Qi
2add2dbdaa Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/network/access/http2/hpacktable_p.h

Change-Id: Ie0c296667dfdebba84f4858056a1ac80c24ee7df
2019-03-06 12:31:50 +01:00
Alex Richardson
47bb74fd15 Fix build with -no-gui on macOS
Some directories that depend on QtGui were being included without the
appropriate check for qtHaveModule(gui).

Change-Id: I7c348c74464d44cbd35a027f188f8a23bb2021d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-04 12:25:53 +00:00
Qt Forward Merge Bot
84e15d6f48 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ic0037eac1d85a0e60e7b1a590d49b5ee6205bfc8
2019-03-03 01:00:25 +01:00
Gatis Paeglis
2065bc070d platforminputcontexts: use libxkbcommon compose key API
Our implementation of compose table parser was added on Mar, 2013.
libxkbcommon added APIs for the same thing in Oct, 2014 (ver: 0.5.0).
After removing RHEL 6.6 from the list of supported platforms we were
able to move the minimal required libxkbcommon version to 0.5.0. Now
we can use the xkbcommon-compose APIs on all supported platforms.

With this patch we can drop nearly 1000 lines of maintenance burden.
This patch fixes user reported issues with our implementation.

Known issues:

- Testing revealed that xkbcommon-compose does not support non-utf8 locales,
and that is by design - https://github.com/xkbcommon/libxkbcommon/issues/76
Our implementation did work for those locales too, but it is unclear
if anyone actually uses non-utf8 locales. It is a corner case (work-arounds
existing) and likely a configuration error on the users' system.

- Looking at the release notes for versions above 0.6.1, only one issue
that stands out. Compose input does not work on system with tr_TR.UTF-8
locale, fixed in 0.7.1. Compose input works fine when using e.g. en_US.UTF-8
locale with Turkish keyboard layout.

Note:

With Qt 5.13 we have removed Ubuntu 16.04 and openSUSE 42.3 from CI:

Ubuntu 16.04  - 0.5.0
openSUSE 42.3 - 0.6.1

CI for Qt 5.13 has:

Ubuntu 18.04  - 0.8.0
RHEL-7.4      - 0.7.1
openSUSE 15.0 - 0.8.1

Currently the minimal required libxkbcommon version in src/gui/configure.json
is set to 0.5.0, but we could bump it to 0.7.1 to avoid known issues from above,
but that is a decision for a separate patch.

[ChangeLog][plugins][platforminputcontexts] Now using libxkbcommon-compose
APIs for compose key input, instead of Qt's own implementation.

Fixes: QTBUG-42181
Fixes: QTBUG-53663
Fixes: QTBUG-48657
Change-Id: I79aafe2bc601293844066e7e5f5eddd3719c6bba
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-03-01 14:31:37 +00:00
Frederik Gladhorn
ac4cf6e2b2 Handle missing enum value in test
Change-Id: I39ad53686b45a79105ccfd9938d79518e26dd5d5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-13 16:39:44 +00:00
Liang Qi
388fe97f2a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/tools/qstring.cpp

Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
2019-05-13 08:04:58 +02:00
Joerg Bornemann
ce1830fd21 Migrate Windows system libs to external dependencies
Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-08 08:30:02 +00:00
Qt Forward Merge Bot
03f7d0a005 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I1c9449ab064deed1367a7e5dbedfcb489f28140e
2019-04-27 01:00:11 +02:00
Samuel Gaist
e2906ea5c4 QRegExp include cleanup
QRegExp includes can be found in several files where there's not even a
use of the class. This patch aims to avoid needless includes as well as
follow the "include only what you use" moto.

This patch removes a QRegExp include from the QStringList header which
means that there is likely going to be code breaking since QStringList
is used in many places and would get QRegExp in.

[ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no
longer includes qregexp.h.

Change-Id: I32847532f16e419d4cb735ddc11a26551127e923
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-19 21:21:17 +00:00
Qt Forward Merge Bot
035f934d7a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp

Added tests/auto/testlib/selftests/expected_crashes_5.txt to work
round the output of the crashes test (which exercises UB, see
QTBUG-73903) being truncated on one test platform.

Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
2019-02-20 09:51:12 +01:00
Joerg Bornemann
8fe3680193 Add cmdline feature to qmake
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".

Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-02-18 07:12:14 +00:00
Lars Knoll
035d80407b Fix two smaller bugs in the BiDi engine
Remove wrong code changing the Bido level of line separators. This
lead to wrong ordering of the string in case the line separator was
meant to be ignored and the string should be rendered in one line. Line
breaks are anyways already reset to the paragraph level by the algorithm
and reordering is done on a line by line basis, so this will work
correctly when doing proper line breaking.

Secondly fix a small bug found while testing the above change, where
we wouldn't set the correct levels for boundary neutrals and explicit
embedding chars because we did that processing before we were fully
done with the BiDi algorithm.

Change-Id: Id88f91cd58d2ab29be864aef34ca1727c1586611
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:26 +00:00
Lars Knoll
79f2a9e666 Fix an assertion in the BiDi algorithm
The algorithm has been treating DirB inconsistently so far.
initScriptAnalysisAndIsolatePairs was treating it differently
than generateDireationalRuns leading to assertions.
It wasn't visible in our test data, as DirB is in almost all cases the
paragraph separator, where we split strings anyway.

Change-Id: I7dc0e7bbcf30ee84d8781ea06097da023e371f05
Fixes: QTBUG-73238
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:16 +00:00
Lars Knoll
5cc6f90910 Move all connection related data into one data structure
Adn create that data structure on demand on the heap.

This reduces the size of QObjectPrivate if there are no
connections. If we have connections, it'll use the same
amount of allocations and memory as before.

Change-Id: I900f6980a2cd8a5f72c3ad18697b5dd49100217d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-08 21:55:29 +00:00
Lars Knoll
a5a859e721 Get rid of the connectedSignals bitflags
Measurements show that it's just almost as fast to simply query
the connectionlist directly and avoid both the memory
overhead of the bitfield and the associated bookkeeping.

For connected signals, the difference is not relevant at all.
With a signal that was never connected, removing the bitfield will
cause signal emission to be ~2.5% faster. And if you ever disconnect
from a signal, the bitfields might not be accurate and this can
cause a major slowdown.

Here are some numbers to validate this. All times are measured
in ms for 100M signal emissions:

                       without change    with change
string based connect:  3817              3836
pointer based connect: 4552              4571
not connected:          493               479
disconnected:          2113               559

Change-Id: Ia2c85036afaa7f991b883c8ff812f69cf4580f7e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: hjk <hjk@qt.io>
2019-02-08 21:55:10 +00:00
Eirik Aavitsland
66c3a71e91 Painter path stroking: fix capping of beziers ending in tight turns
For some overly tight beziers where the start or end point and the
next control point are closer than the pen width, the stroker's
shifting algorithm will produce a start/end tangent pointing in the
opposite direction from what is expected, for one of the sides. This
would break the square and round capping logic. Fix by detecting the
situation in the capping function and reversing the tangent when
necessary.

Change-Id: I48f4f017403d7b289b0483dd2b3a7ff1bbd0cf2a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-05 22:47:16 +00:00
Liang Qi
6666201a02 tests: require widgets explicitly
Task-number: QTQAINFRA-1975
Change-Id: I5ba4e230322dc0dbd063b48cadf9e4f96e0dc140
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2019-02-01 21:45:50 +00:00
Lars Knoll
86aabb500c Add lancelot tests to verify vertical alignment of inline images
Adds a test case for 199f9c5448.

Task-number: QTBUG-59310
Change-Id: Iee26f8bc21884da36471935f64524b62c3f79ff4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-03 07:52:55 +00:00
Qt Forward Merge Bot
1b5bbacdb0 Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I12bcee17e349edd0dd4fd08da76361d1ffb1a727
2018-11-27 01:00:09 +01:00
Sami Nurmenniemi
71bd06d516 Make developer build tests pass for boot2qt
Some tests were fixed and others were skipped/blacklisted.

Task-number: QTBUG-63152
Change-Id: Ica7df555f8d152ee589865911130525101d4b941
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-11-26 07:06:59 +00:00
Tor Arne Vestbø
27fb51fa52 macOS: Remove blacklist entries for no longer supported OS versions
Change-Id: Iae6552f1fdcf1dea07a03d3788d378af9140d1a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-12 07:16:30 +00:00
Frederik Gladhorn
daf9ba91ae Stabilize tst_QAccessibilityLinux::testFocus
The tests would rely on the window manager giving it focus a bit too much.

Change-Id: I1b28def2c95a4f0a9665a7cf6e0c14db03df98d5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-11-02 13:45:49 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00
Frederik Gladhorn
a87f85dbf9 Linux Accessibility: Fix expandable state
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>
2018-10-22 10:27:06 +00:00
Frederik Gladhorn
1c614d07fb tst_QAccessibilityLinux make state checking more convenient
Change-Id: I96274ab0a0f5d942746de0166df47936e2390c65
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-10-22 10:27:01 +00:00
Jüri Valdmann
cea2b5510c Fix building tests with -no-gui
Change-Id: I37307080e5adc334fcfcdd2fee650d675228a746
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-20 20:38:59 +00:00
Tony Sarajärvi
fd6370d89f Extend opensuse blacklistings to opensuse-leap
In openSUSE 15.0 /etc/os-release the ID of the OS was
changed from "opensuse" to "opensuse-leap". So every blacklisting
we did for opensuse, didn't cover opensuse-leap. This one adds
opensuse-leap as a blacklisted platform whenever opensuse
was blacklisted.

Task-number: QTBUG-70463
Task-number: QTBUG-51399
Change-Id: I5879eb34926757163973d8b9442eae58f47d2f11
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-09-11 12:11:45 +00:00
Tor Arne Vestbø
917c2de203 Disable tst_macnativeevents
It's almost completely blacklisted anyways, and the parts that are
not are flakey.

Change-Id: I4601d751a2963c94c62ec439dd78b874034069a0
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-31 12:35:45 +00:00