Commit Graph

36668 Commits

Author SHA1 Message Date
Mårten Nordheim
d5fd308d1f Android: Blacklist tst_QPainter::textOnTransparentImage
Task-number: QTBUG-69166
Change-Id: I16289801ff64b09894a5379a584270b53ad7e105
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-28 07:33:15 +00:00
Mårten Nordheim
626ab2ab89 Android: Blacklist some cases in tst_qwindow
Task-number: QTBUG-69154
Task-number: QTBUG-69155
Task-number: QTBUG-69156
Task-number: QTBUG-69157
Task-number: QTBUG-69159
Task-number: QTBUG-69160
Task-number: QTBUG-69161
Task-number: QTBUG-69162
Task-number: QTBUG-69163
Change-Id: Ie44de7fd3f4871bebcaadcc4a8735bf47692ea49
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-28 07:33:15 +00:00
Mårten Nordheim
8757e6fee1 Android: Make tst_qfile pass
By disabling the "stdinprocess"-related tests/code...

... but differently. After fixing my earlier mistakes I'm getting
segmentation faults when it executes a couple different library calls
after the QProcess object has started.

Task-number: QTBUG-68596
Change-Id: Id42a1f939c000754a187dee90c4a4cdfec816232
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-28 07:31:27 +00:00
Mårten Nordheim
d420987d54 Android: fix tst_qlogging
The "app" subfolder was already excluded in the .pro-file but Android
supports QProcess, so lets include it in the build. Unfortunately it
currently has trouble and crashes (the child process or both processes).
So we skip those tests.

Task-number: QTBUG-68596
Change-Id: I2e6d0869c408bf08b22c02145db8ce522c64c617
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-28 07:29:30 +00:00
Mårten Nordheim
568ee7da5a Android: Pass tst_qlocale
To make it run we make sure it finds the syslocaleapp, however since it
causes a crash we skip the test that uses it...

"formatTimeZone" was failing, but it is the exact same issue as in
e08ba34f26, so we solve it the exact same
way.

Change-Id: Ifd5c796735775dad94acf55210cf18c0f4d375ca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-28 07:27:22 +00:00
Mårten Nordheim
6ee26c543e Android: Pass tst_QUuid
Same issue as has been seen a few other places: path to executable being
wrong, and then a crash when the paths are fixed.

Change-Id: I77a596c6e52d2a02a69a6b9dfe91f878b3ffe07c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-28 07:12:47 +00:00
David Faure
8a73085a0d QSortFilterProxyModel unittest: add test for filtered-out-after-setData
The row names for this test were very unspecific.
After reverse-engineering what they are testing, I gave them proper
descriptive names, which allowed me to notice that there were tests
for "filtered in after sourceModel->setData" but not for
"filtered out after sourceModel->setData".

Change-Id: Ib79108db803ae77fb65d29cf0c0ef96c26655980
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-06-28 07:00:00 +00:00
Friedemann Kleint
ee8c052395 QtNetwork: Fix and streamline translations of QDtls
- Use %-placeholder formatting instead of string concatenation
  for messages of the form "XX failed: %1"
- Introduce helper functions for duplicate messages
- Introduce helper function for message reporting function failures
  to avoid duplication
- Extract helper function for reporting SSL handshake errors

Complemements ac583b686d.

Change-Id: Iaf6c158ca8086d0b17a3e3c51955707734829615
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-06-28 06:06:52 +00:00
Eskil Abrahamsen Blomfeldt
bc71946487 Don't position cursor inside complex graphemes when clicking outside line
If you clicked to the right of a text line ended with a grapheme consisting of
several characters, either because it was a unicode surrogate pair or a ligature,
we would always to the previous character in logical order, without checking
if this was a valid cursor position.

One result of this would be that hitting backspace when the cursor was positioned
in an invalid position, would cause the entire contents of the document to
become invalid.

Instead we should search backwards for the previous grapheme boundary using
QTextEngine::previousLogicalPosition().

[ChangeLog][QtGui][Text] Fixed position of text cursor set by clicking outside
the bounds of a text line that ends with a surrogate pair or ligature.

Task-number: QTBUG-69085
Change-Id: I7224c065f332f398bdfbb3f42b2b3ec8280c76a4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-28 05:20:14 +00:00
Christian Ehrlicher
451fcee8a8 QTableView: update editor geometries directly after scrollbars are adjusted
QTableView::doItemsLayout() updated the scroll offset for the vertical
header after layouting was done. Since the scroll offset affects the
viewport of the editors, the adjustment was done too late.
Therefore we update the scroll offset right after the scrollbars are
set inside QTableView::updateGeometries()

[ChangeLog][QtWidgets][QTableView] Fixed calculating geometries
for editors

Task-number: QTBUG-48244
Task-number: QTBUG-49548
Change-Id: I3b057764cf99d42d861928a1c73277d34b440f9a
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-28 04:23:46 +00:00
Timur Pocheptsov
5ba5a7b5bc DTLS cookie auto-test - do not check the exact UDP socket errors
It was observed on OpenSUSE VM in CI - apparently, even after succesfull
read from UDP socket error was not UnknownSocketError. While it's under
investigation, the DTLS auto-test should limit itself by DTLS things and
barely test IO success (socket-wise) when needed.

Change-Id: I0773a02c591432b0d6c894f4131f70e41dc7ed72
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-06-28 03:28:50 +00:00
Timur Pocheptsov
73b9242d7e tst_QSslSocket::qtbug18498_peek() - fix several problems
It all started from the compiler's warnings about 'this' captured but
not used in lambdas. While fixing this it was noticed that 'client' socket
has a lifetime longer than the test case itself (the socket has a parent,
which is tst_QSslSocket object). The 'server' socket was simply leaked.
So there is no guarantee that some of them (or both) later, after the
test failed in one of QVERIFY, for example, does not emit 'encrypted'
upon receiving more data; this will result: in reading/writing from/to
invalid memory location (captured local 'encryptedCount') and/or probably
exiting event loop when it's not expected to do so.

Change-Id: I51de0493d989a5ba36de2cef58d35526c0e26cda
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-06-28 03:28:38 +00:00
Andre de la Rocha
92666ff521 Fix minor stuff in Windows UI Automation support
Adding missing "override" keywords in overridden interfaces, using
"#if QT_CONFIG(accessibility)" instead of "#ifndef QT_NO_ACCESSIBILITY",
and other minor bits. No change in behavior expected.

Change-Id: Ief0e23cb7b577dd3e4af21750b6beccc80d6a2f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-06-27 23:31:26 +00:00
Paul Olav Tvete
9f1568d18c Fix QtWayland non-toplevel in-source builds
Tell qtwaylandscanner to export the symbols when we're building a
module. This is done by specifying the include directory on the
qtwaylandscanner command line.

Task-number: QTBUG-68773
Change-Id: Ib575222261831ab01eb43e6c7caefb07e314492b
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-06-27 18:58:41 +00:00
Giuseppe D'Angelo
aaf60da01c QRegularExpression: fix compiler warning in test
QTest::addRow expects a format specifier; this usage makes GCC complain
with -Wformat-security. Use the "old" newRow call instead.

Change-Id: Ieed8e4f64ff5e3d0d4e87325629d20ed6839ff9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-27 17:52:45 +00:00
Mårten Nordheim
7995540292 tst_qthreadpool: Skip "stackSize" if unsupported
If you're on a Unix platform which don't have the necessary defines then
the thread will never be launched due to an error. Skip the test
instead.

Change-Id: I83159988b8f330a750c7aa328a8805e4fa478070
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-27 17:40:28 +00:00
Timur Pocheptsov
b78342f553 QAbstractSocket - protect against the broken invariant
It's possible to use QAbstractSocket (more precisely QUdpSocket) in
a quite unusual way: connect to its stateChanged() signal and call
close() in the slot (thus invalidating socketEngine pointer). For
QAbstractSocket::bind() this results in a null-pointer
dereference.

Task-number: QTBUG-69063
Change-Id: Ife2c778ff59ccc7b99a96caa5ba67f877aaefe42
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-06-27 17:40:25 +00:00
Oswald Buddenhagen
d550ba4e96 qmake: make access to raw data temporaries safe
make sure the access is properly scoped and does not recurse.

Change-Id: Iaa345cd2771811281b9ed6f634c70235a78c3c33
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-27 17:24:09 +00:00
Oswald Buddenhagen
d68016c739 qmake: centralize resolution of file name arguments to qmake functions
Change-Id: Id867e4653b0ec506332174ae67c9ee21e722c1e3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-27 17:24:03 +00:00
Oswald Buddenhagen
811d8b82b5 qmake: make argument validation of built-ins data driven
at the time this patch was conceived, it was meant as an exercise in
getting rid of usages of ProString::toQString(m_tmp). however, this was
meanwhile superseded by use of toQStringView().
but the change itself should have been done a long time ago already, and
there is no harm in going through with it.

on the way, this also unifies and fixes some of the error messages.

Change-Id: I337aff994c508df783df4794c3fa0762d83a691b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-27 17:23:57 +00:00
Oswald Buddenhagen
9fde782695 configure: permit digits in variable assignments on the cmdline
Change-Id: I21e4f93b119d28fe30cb2436c76a03b67c78fe7a
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-06-27 17:22:02 +00:00
Thiago Macieira
10e5ec2557 QByteArray: implement qstricmp with SSE 4.1
Using SSE 4.1 because of the need for PMINUB.

Change-Id: Ib48364abee9f464c96c6fffd152ebd3f8ea7fe94
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-06-27 16:29:14 +00:00
Tor Arne Vestbø
9050ce4ff5 macOS: Guard non-reentrant uses of NSOpenGLContext
NSOpenGLContext should be re-entrant, but is not in practice, resulting
in deadlocks when there are two render threads, eg:

 thread #23, name = 'QSGRenderThread'
    frame #0: 0x00007fff5c6dda4e libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x00007fff5c8a5b9d libsystem_pthread.dylib`_pthread_mutex_lock_wait + 83
    frame #2: 0x00007fff5c8a34c8 libsystem_pthread.dylib`_pthread_mutex_lock_slow + 253
    frame #3: 0x00007fff31ebb52e AppKit`flush_notify + 110
    frame #4: 0x00007fff3e75ee2a GLEngine`glSwap_Exec + 186
    frame #5: 0x00007fff3e740797 OpenGL`CGLFlushDrawable + 59
    frame #6: 0x00007fff31ad43ac AppKit`-[NSOpenGLContext flushBuffer] + 27
    ...

Task-number: QTBUG-69040
Change-Id: I6f28b4cc5faf61ae93f66353ce2abdf8c223d994
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-27 16:25:18 +00:00
Simon Hausmann
cd64a96b31 Fix QString::localeAwareCompare with composed/decomposed strings on Windows
With ICU and on macOS it appears that the comparison is done on a
canonical form, while CompareString(Ex) does not do that, as the added
test verifies. Explicit normalization fixes that.

As a bonus, this also unifies the code path between regular Windows
and UWP by unconditionally using CompareStringEx (which requires
Vista or later).

This issue surfaced while running the ECMASCript 6 Conformance Test
Suite in QtQml.

This re-uses the existing test for localeAwareCompare, which was
disabled on Windows, macOS and Linux with ICU (the common case).

Change-Id: I52440fce60b54745ead1eff005ec51e98e2a79ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-06-27 16:21:22 +00:00
Oliver Wolff
00d9ade6e6 tst_qlogging: Fix execution for WinRT
Not putting executables into debug/release subdirectories leads to the
WinRT AppxManifest being overwritten by the wrong configuration. When Qt
is configured with -release for example, it was possible that the debug
manifest (Manifest files are always created next to the target) is
written last and thus contains debug VCLibs as a dependency.

Additionally the test was changed in that way, that the resulting file
system structure (having helper and test application in a "top level"
debug and release folder) is the same structure as in tst_qobject.

Change-Id: I034752b4e5d22b98f6def95fb53c2b1947dded03
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-06-27 16:06:01 +00:00
Tor Arne Vestbø
465098088e Harden logic for converting from CSS gradients to QGradient
Some of the gradients from https://webgradients.com/ are not minified
completely, so we need to be a bit more lenient when converting them
to the internal format used by QGradient.

Change-Id: I47466b6a77abd6d2fefc1326fbf6ba5713dd74cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-27 15:40:03 +00:00
Tor Arne Vestbø
fc926985a1 doc: Mark QGradient::Preset enum as internal until we can ignore its values
Change-Id: I0637ee765053a30ac3666f33c4d8f59c5ae9aa84
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-06-27 15:40:03 +00:00
Alexander Volkov
4d73ab73c8 Return a correct filter from QFileDialog::selectedMimeTypeFilter()
QFileDialog::selectedMimeTypeFilter() returns either an empty
filter in the case when a platform file dialog doesn't implement
mime type filters, or initiallySelectedMimeTypeFilter() in the
case of Qt's file dialog. In both cases the result is incorrect.

Make it return a mime type filter corresponding to a selected
name filter. As a result, tst_QFiledialog::setMimeTypeFilters()
has to be fixed: QFileDialog::selectMimeTypeFilter() can't select
a name filter for an invalid mime type, and "application/json"
is not supported by RHEL 6.6, so replace it by "application/pdf".

Change-Id: I58d3be860a9b5e8a72cba86d74b520178115a812
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-27 12:14:44 +00:00
David Faure
4af292fe51 QAbstractItemModelTester: don't call match(QModelIndex(), ...)
The documentation for match() indicates that the index has to be valid
since it determines which column to search in (in addition to "from
which row"). So call match with a valid index, if the model isn't empty.

Change-Id: I5f3754cf14d053bf04d207cefe7dcc938e0f4a5a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-06-27 10:12:01 +00:00
David Faure
27ea5a65dd QAbstractItemModelTester: fix out-of-bounds index() calls
When removing rows, the tester is looking at the data of the row
"just before" and the row "just after" the removed rows, to see if
they are still the same at the end of the removal operation.
Guard this with bounds check, in case there is no row just before
or just after.

This is the opportunity to use modeltester in tst_qidentityproxymodel,
which was already a testcase for removing the only row in a given parent.

Change-Id: Iec8228c16b9c670b794e2665356d153679178494
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-06-27 10:11:35 +00:00
Erik Verbruggen
74be42ca59 ItemModels: Cache last-known child index
Instead of caching the last index of a search for a child item, cache
the index of the child in the child item. When the item model is not
changed, the index is valid. Otherwise, the index can only change when
items get inserted or removed before the child. So in that case, start
searching in the vicinity of the previously known index.

As an example: a selectAll() on the view will always hit the cached
index, so no search is performed for any item in the model/view.

Task-number: QTBUG-61368
Change-Id: I85d085299987237fae23451d9e8bbb6060464ef2
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-27 10:01:07 +00:00
Erik Verbruggen
e3a1b18bc3 ItemModels: search for the child index in 2 directions
Previously, the search for the index of a child was done by searching
forwards (minus 2) from the last search, and subsequently backwards when
it wasn't found. This would cause quite some searching in models with
lots of items, and where the child lay before the last search.

We still assume that subsequent searches for children are "nearby" the
previous search, but instead of first searching forwards and then
backwards, do the search in both directions.

Task-number: QTBUG-61368
Change-Id: Idb549c2d02840632cd658f906816ce911f3ff8bc
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-27 10:01:02 +00:00
David Faure
528a16b00e QAbstractItemModelTester: add missing includes
The code (in macros) uses these classes, so the header should ensure
they are defined.

Change-Id: Ic68fa5559b7c0481927b47775b9cb7da12be7979
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-27 08:19:40 +00:00
Mårten Nordheim
3079b3433d Android: tst_qtimezone: Blacklist a bunch
Task-number: QTBUG-69122
Task-number: QTBUG-69128
Task-number: QTBUG-69129
Task-number: QTBUG-69131
Change-Id: Ida626a6675764e9554785b5e56cfba3ab7206f17
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-27 07:52:26 +00:00
Mårten Nordheim
da82bfd823 Android: tst_QTimeZone::transitionEachZone: skip 2 zones
When testing zones "America/Mazatlan" and "Mexico/BajaSur" the test
crashes from an assert. Skip testing the zones for now.

Task-number: QTBUG-69132
Change-Id: I595089647792e9a2c094d63cb837584b8cdc9cb9
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-27 07:52:10 +00:00
Friedemann Kleint
a8a0dffd1f Windows QPA/GL: Fix build with MinGW/g++ 8.1 x64
Fix warnings about invalid function type casts (return types
conflicting with the PROC returned by wglGetProcAddress()) like:

qwindowsglcontext.cpp:1250:138: error: cast between incompatible function types from 'PROC' {aka 'long long int (*)()'} to 'GLenum (*)()' {aka 'unsigned int (*)()'} [-Werror=cast-function-type]
         m_getGraphicsResetStatus = (GLenum (APIENTRY *)()) QOpenGLStaticContext::opengl32.wglGetProcAddress("glGetGraphicsResetStatusARB");

by introducing nested casts.

Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I7c51836f2b9f7e2a6fa17c5108d59b23c42fb99d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2018-06-26 18:10:42 +00:00
Paul Wicking
6f53c2bc96 Doc: Fix typo
Task-number: QTBUG-69093
Change-Id: Ica63482251b2a614a17a996fac9bcc16b96c200f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-26 12:56:04 +00:00
Johan Klokkhammer Helsing
a7730793be wayland-scanner.prf: Remove special-casing for generated headers
Generated headers can now be installed using inject_headers and private_headers
instead.

Change-Id: I51d98e2e05d12aa9f6ab09f8ccb12b81a0c0cd6f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-06-26 12:30:43 +00:00
Oliver Wolff
4d7137c4a0 tst_qobject: Fix execution in debug&release shadow builds
The previous approach of having the signalbug helper in a subdirectory did
not work for shadow builds, as QFINDTESTDATA would not find that dir. By
putting both test and helper into the same directory, the helper will be
found in the test's current working directory.

The second problem was that not putting executables into debug/release
subdirectories might have lead to the WinRT AppxManifest being overwritten
by the wrong configuration. When Qt is configured with -release for
example, it was possible that the debug manifest (Manifest files are
always created next to the target) is written last and thus contains
debug VCLibs as a dependency.

Change-Id: Ia39315432860405642542449296c16dd2ae9fa9f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-06-26 10:56:31 +00:00
Oliver Wolff
680038e2c1 winrt: tst_qdoublespinbox: Remove QEXPECT_FAIL for editingFinished
Behavior has been fixed.

Task-number: QTBUG-68297
Change-Id: I217fffc3c9a189d48e673356b1123f9eda8af94a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-26 10:56:28 +00:00
Mårten Nordheim
6934be03fe Android: Blacklist various cases in tst_QLineEdit
Task-number: QTBUG-69111
Task-number: QTBUG-69112
Task-number: QTBUG-69113
Task-number: QTBUG-69114
Task-number: QTBUG-69115
Task-number: QTBUG-69116
Task-number: QTBUG-69118
Task-number: QTBUG-69119
Change-Id: I424cb472e97bd427e800ee230e0e57d763d1b8a6
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-26 08:06:10 +00:00
Mårten Nordheim
531f950226 Android: Blacklist a few cases in tst_qgroupbox
Task-number: QTBUG-69084
Task-number: QTBUG-69083
Change-Id: Icf218795f81f01a559094cf2088f53a9fd597c24
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-26 08:06:04 +00:00
Mårten Nordheim
afa2d38a89 Android: Blacklist tst_qframe::testPainting
It causes most of the fails seen on Android.

Task-number: QTBUG-69064
Change-Id: I2f97fea41ee78e7962b8c34ed996bbe4bcb88732
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-26 08:06:03 +00:00
Edward Welbourne
cffa010d42 Kludge round Android's ignorance of some esoteric time-zone transitions
Skip a few tests that Android's time-zone information doesn't suffice
to get right.

Task-number: QTBUG-68835
Change-Id: Ibf8d213c96b29d74fc478a0ede686ae52b5200fb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-26 08:05:17 +00:00
Paul Wicking
4d326555ab Doc: Add Hello GLES3 example
Task-number: QTBUG-67109
Change-Id: I55135264a63b78502b300de723a25b3f363af58b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-26 07:58:39 +00:00
Gatis Paeglis
4050ee6ac7 xcb: rely on WM_SIZE_HINTS gravity to handle x,y positioning
The original code was added by b316c3ac5e
(in 2012). This patch changes two things:

1) We now rely on WM to position a window based on the set gravity. It
should not be necessary to calculate coordinates manually as was done
in windowToWmGeometry(). We don't even know the decoration size before
the window is mapped.

2) We now update gravity whenever needed instead of hardcoding based
on what Qt APIs (setGeometry vs setFramePosition) where used to set
the initial window position.

The patch from b316c3a says:

"Determine gravity from initial position. Do not change later as
it will cause the window to move uncontrollably"

Since it did not elaborate on the situation, we can only assume
that it was caused by another bug in Qt at the time or perhaps
a broken WM. From [1]:

"Applications are free to change their win_gravity setting at any
time. If an Application changes its win_gravity then the Window Manager
should adjust the reference point, so that the client window will
not move as the result."

Tested on Ubuntu/Unity, KDE/KWin, Gnome-shell/Mutter, Lubuntu/OpenBox.
Works as expected everywhere expect Unity. Unity seems to ignore
XCB_GRAVITY_STATIC and treats it as XCB_GRAVITY_NORTH_WEST, which means
that setGeometry/setFramePosition produce the same placement on this WM
(the behavior was the same also before this patch).

P.S. Also renamed xRect -> rect, which was a leftover from
ae5f2a6672

With this change we can un-blacklist QWidget save/restore geometry
auto tests.

[1] https://specifications.freedesktop.org/wm-spec/latest/ar01s09.html

Task-number: QTBUG-66708
Change-Id: I381eef5d34dddb04de16a897ce5540b9c430b216
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-06-26 07:11:34 +00:00
Kari Oikarinen
1049d3f9db tst_QTimer: Replace unconditional qWait()s with QSignalSpy
Where possible. Sometimes the replacement is QTRY_COMPARE instead.

Also don't use QTestEventLoop directly when it can also be replaced with
QSignalSpy use.

Remove the TimerHelper class, since its uses can be done with QSignalSpy (and a
lambda when remainingTime is checked). Although checking static single-shot
timers still needs a target object, so use a stripped down version in those
tests.

remainingTimeDuringActivation() was not actually testing the repeating case, but
single-shot case twice, so fix that. In the repeating case the remaining time is
exactly 20 ms on my machine, but QEMU emulation seems to be slow enough for time
to advance before the lambda is executed, so relax the conditions.

Task-number: QTBUG-63992
Change-Id: Iae92ff7862a13d36e695eec63b54403ec872f2b4
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-06-26 05:51:15 +00:00
Christian Ehrlicher
0e2dae902b QTreeView: speedup expanding items via keyPressEvent/asterisk
Expanding items with asterisk is done with expand(QModelIndex) which in
the end calls layout() which is very slow and useless until all items
are expanded. Therefore delay the relayouting until all items are
expanded.

[ChangeLog][QtWidgets][QTreeView] Speedup expanding items when
pressing asterisk

Task-number: QTBUG-39486
Change-Id: Ieb798fc22e9fa0dcac4bb92de7e3ed3ebb9d1c38
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-25 18:58:10 +00:00
Christian Ehrlicher
5712c62d1c QCommonStyle: properly elide last visible line
Rewrite QCommonStylePrivate::viewItemDrawText() to be able to elide
lines which are too long and the last visible line. The painting is now
done in one pass instead of two and lines which are not visible due to
a size constraint are not painted at all.

[ChangeLog][QtWidgets][Itemviews] Fixed eliding of multi-line items

Task-number: QTBUG-12129
Task-number: QTBUG-14949
Task-number: QTBUG-57891
Change-Id: I3a41938e442663ecd7e5ca56bf6bbd857edafb7d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-06-25 18:58:07 +00:00
Thiago Macieira
2cf5c5a602 SIMD: Remove unused (and unlikely to be ever used) AVX-512 profiles
"AVX512MIC" (Many Integrated Cores) is the set of AVX-512 features found
on the Intel Xeon Phi coprocessors (codename "Knights Landing"), which
is an unlikely architecture for Qt to run on.

The two profiles with VL came from study of early GCC code and are no
longer applicable. GCC source code now shows both VBMI and IFMA as part
of the -march=cannonlake feature set.

Change-Id: Iff4151c519c144d580c4fffd153a0f268919fe2c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-06-25 18:49:33 +00:00