This uses the same logic as the config.test, so we will return the same
string as the $$QT_ARCH variable in qmake for cpuArchitecture().
fullCpuArchitecture() is meant to be used in upgrade mechanisms, when
combined with the OS type.
Change-Id: If0dfee9eff75a07fa4c0778d204e0e768bf43074
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QEXPECT_FAIL followed by QTRY_COMPARE considerably slows down
tests due to the check timing out.
Task-number: QTBUG-38890
Change-Id: I7f90f2627fc6ce149d159a6d13355ca1a8181d54
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Remove highlighting for examples with known problems, and
examples that don't work on all platforms. Add highlighting
for improved ones and prominent examples that demonstrate
new features.
Task-number: QTBUG-37203
Change-Id: Ida7fd28573dfebe6e4e3320ef83782654632219e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Otherwise widgets will not be shown on some embedded systems.
Task-number: QTBUG-38866
Change-Id: Id16408dc7eb657c052bbe3bdb86e35ab2f062632
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
For exaple Qt Creator would crash when started and a screen reader (eg
NVDA) is running. This is due to updateAccessibility being called during
the ctor of the TextEdit and on Windows the AT can access properties in
the same call resulting in accessing the text control before it's fully
constructed.
Also make sure to not send accessibility updates for non-widget type edits
since we don't support any accessibility in Qt Quick 1.
Backported from Qt 5.3.1 since it also crashes Qt Creator on startup on
Mac (as soon as accessibility is enabled which may be for various
reasons, and basically any app that uses a QTextEdit).
Task-number: QTBUG-38659
Task-number: QTBUG-38738
Change-Id: I6e5c0dc47bd75e63fe013a9edadbabccd52c20ee
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Add also a manual test application. For GLX there is an autotest since
that is likely to be run on one of the CIs. For EGL and especially
eglfs this is likely not the case so a manual test is better.
Task-number: QTBUG-37552
Change-Id: Ib09db5d909befb68d16f69abd401a56abe55f28a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Return the native display which, with the x11 hooks, is the X11 Display*.
This gives compatibility with xcb and allows QtWebEngine to run on eglfs
in regular desktop builds without ozone. (this requires eglfs built with the
x11 hooks of course)
Change-Id: I8d25e2835c41a7e78f063a57a7d6c6b5e53a19b4
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
As the mipmaps levels aren't being generated on level 9, they shouldn't
be used. Fall back to multisampled textures instead (which is the
behavior for non-power-of-two textures anyway). This fixes an issue in
which textured polygons (e.g. QML Images) turn black when scaled down.
Change-Id: I648b8be473dc38f4e1b26724cbaff610e586fdbd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Using Q(Open)GLFunctions concurrently on multiple threads had some issues
due to incorrect synchronization: The m_groups list in the
QOpenGLMultiGroupSharedResource, in which the Q(Open)GLFunctions instance
is stored, became corrupted under certain scenarios, for example in the
tst_qglthreads autotest and any two threads that happen to enter an
initializeOpenGLFunctions() or QOpenGLContext::functions() call concurrently.
Locking in value() has been introduced in 666c25c089
to fix such issues, however using the context group's mutex is not enough: that still
allows two threads using two contexts with a different context group to concurrently
enter insert(). Instead, the MultiGroupSharedResource has to have its own mutex
to protect its own member variables.
Task-number: QTBUG-38771
Change-Id: If01c44c2084b95e487bc9146576ca180ed8044da
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Call ::ensurePolished from QMenu::exec before the native window gets
created. This ensures that the style handles the menu before its too
late. E.g. a style which wants to create RGBA menus needs to add the
appropriate flag before the native window gets created. Without this
change the style cannot change to RGBA as the native window has already
been created and changing the format used by QWindow is not possible
after QWindow::create was called.
Change-Id: Ic861037a438b4cb74c59a00be0ef2d633db538ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This involves exposing a new function in the QPlatformNativeInterface
which gets a public function for QGuiApplication
Proof of concept is done through implementing _NET_WM_WINDOW_TYPE
setters for xcb
Change-Id: Ic9544e775fb71cc9b30273595ec41b1cdb1c9d64
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Previously we have rejected this issue as you can work around it
by setting Qt::WA_LayoutUsesWidgetRect per widget. However there
is no reason to apply the negative mac style layout margins on any
custom style so I think we should completely bypass it unless the
native border is used.
Task-number: QTBUG-13050
Change-Id: I8923e07d868c51a13587993c9b2ce79c51beaeee
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
That long call chain is screaming "here, I'm dereferencing dangling
pointers! Valgrind me!" but 2006 Thiago didn't see them...
Change-Id: I44de5aea113d05edec2227e9db6be8cec9303be9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The main test won't find them if they are.
Change-Id: Iae3ffe4c0289a0c88d46c1bd2e414c20def89ab4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Previously, this produced wrong results, for example -3:30
became -3:-30.
Change-Id: I10efdfb48e5542b917c86b29cf8a99bfc26f7fe0
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The tests for toString/fromString previously didn't run tests
for timezones with hh:mm where mm != 00.
Change-Id: I74da99c5b6890f46ce06446084a8129b4cbc7a02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: John Layt <jlayt@kde.org>
This fixes a warning when loading qmake.pro in Qt Creator on OS X.
Change-Id: Iabd70f2b5b9615d0fb1563081f485e6a4c828823
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The list of returned modes is scanned for the first one marked as
preferred, and that is used. If no preferred mode was found then the
builtin default mode of 1024x768 is used. Use that builtin mode only if
no modes were returned at all, pick the first one if any were returned.
Change-Id: Ib355cc92219ced093c605f49dae4e34ff244b639
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
QKmsDevice already requested the drmModeRes and drmModeConnector
information. Simply pass them to the QKmsScreen constructor instead of
requesting and freeing them there again.
Change-Id: I4897d76d7b13d83297c928b6e10e17ccdfdbd242
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Increase the chunk size of the server and remove hard-coded
interval when waiting for the server to listen.
Unmodified, the test takes 170s on Windows.
Change-Id: I65bdc93ff78e1b4fb429fcafd0fdc5e80bb281f9
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Do as QGLWidget::updateGL does and avoid calling paintGL in updateGL
when we we don't have a valid QSurface to draw on.
We currently end up calling makeCurrent on the context with a null
QSurface in that case, which is the equivalend of doneCurrent, and
causes QOpenGLContext::currentContext to return null later when paintGL
is called on the subclass.
Change-Id: I712ee59274855457b0e4de3757754f56b3528955
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The Android input method protocol specifies that finishComposingText()
should not move the cursor. Since Qt likes to move the cursor to the
end of the newly committed text, we have to explicitly move the cursor
to where the preedit cursor used to be. Fortunately we already keep
track of that.
Also implement support for the newCursorPosition argument to commitText()
since the function needed to be rewritten anyway. (It was calling
finishComposingText().)
Task-number: QTBUG-38794
Change-Id: Iff2c43bdbd3dda812ccdc71da63f3fa730474eef
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
When applying the five-finger pinch gesture, we get a touchesCancelled
callback with all five touch points, but the pinch gesture ends when
the second to last finger is released from the screen. The last finger
will not emit any more touch events, _but_, will contribute to starting
another pinch gesture. That second pinch gesture will _not_ trigger a
touchesCancelled event when starting, but as each finger is released,
and we may get touchesMoved events for the remaining fingers.
The event property 'allTouches' contains one less touch point than it
should, so this behavior is likely a bug in the iOS system gesture
recognizer, but have to take it into account when maintaining the Qt
touch state.
We do this by assuming that there are no cases where a sub-set of the
active touch events are intentionally cancelled, and always clear the
list of active touches.
Task-number: QTBUG-37304
Change-Id: Icee79978508ecbc6854c0fb55d2da48b99d92f96
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Use the correct palette and enforce Fusion style to prevent
the Vista style from clobbering the tooltip palette in polish().
Task-number: QTBUG-38183
Change-Id: Id19d548f818d801c4914a343e08207195c343888
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The intent is to provide compile time validation of signals and to help
detect signal overloading in the future.
Change-Id: I9d5d46ed4b70c5d0cd407deb5928b1e76d37e007
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Since we require a relatively recent system, check the version of the
direct2d dll on disk and report an error to the user if it is too old.
Previously only a cryptic runtime error resulted from a direct2d version
that was too old.
Change-Id: I6c3955e1a98326fca6bcdc871b0a25291391ba88
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
After analysing text drawing performance two things seem to take up most
of the time. The first is font lookup, the second is QVector
initialization.
To address the first point a per paint engine instance font cache is
introduced. At the moment no mechanism exists to clear this cache and
it is unbounded.
To address the second point, we simply switch to using QVarLengthArray
instead of QVector.
In an artificial benchmark that draws text in a tight loop, the first
change raised fps from ~70 to ~100. The second change further raised this
number to ~115 fps.
Change-Id: Iafa25c3e35bc42bd7c1582b0636e721c5193b494
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When the start point is not on the curve, the end point will be
used as starting point for the QPainterPath, if it is on the curve -
if it is not on the curve, the mid point between start and end point
will be used. The origianl start point will still be used as a control
point for the first bezier curve.
Task-number: QTBUG-38601
Change-Id: I90e07f1141288873263f1f12fa51e6a248d0804f
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
1) toString does not track the string it returns, thus it has to be
deleted by the caller
2) on some platforms vsnprintf crashes if a null string is in the
va_list
Change-Id: Iecf94e93d3a2ddf4186ee20de1f495f2f92dcc60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Matches the compiler capabilities better and will catch all GCC-like
compilers (including Clang, LLVM and Intel CC on Unix).
Task-number: QTBUG-38544
Change-Id: I102966d307a4e167b6dcf3da08359e656f3af45e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
GetGlyphOutline fails for ttf fonts with embedded bitmaps. This results in
distancefield rendering not rendering glyphs (for the failed paths). We
need to fall back to texture rendering if this is the case.
Change-Id: Ibdf7dc5c1d34f513c436f88fabbdcc4089bb6fef
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Determine the visual index by looking up the column of the QModelIndex
in the logicalIndices array instead of looping.
Task-number: QTBUG-37813
Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d
Reviewed-by: David Faure <david.faure@kdab.com>
Some calls pass len=32, so garbage was shown when maxlen (readBytes) is smaller.
Change-Id: I97e61dcdf5a0db032317c57afb4bfb406437d8d5
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
The collected data doesn't reveal any obvious correlation between sleep
times and test failures but the many warnings are a hassle for anyone
reading the test results.
Change-Id: I71bd0c90c20c730573693f23f4435e538b635d44
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>