These functions have lived in tests/shared/util.h for a long time, but
they really belong in qtestlib.
Change-Id: I60d569d002dea220b51563931d8b7aa77a20b98b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This macro is no longer used in Qt's tests and encourages writing tests
in a way that makes test reporting less accurate -- remove it to prevent
further misuse. If a test can be determined at compile-time to be
inapplicable, it should be omitted from the build via .pro file logic.
If that is not possible (e.g. there is no suitable qmake variable), the
test's initTestCase() function should call QSKIP to skip the entire test
with a meaningful explanation.
Task-number: QTBUG-21851
Change-Id: Icacc8c5567a700191b6ef3fa94ee52ede94c5b34
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that this test won't be testing anything until it gets fixed
for Qt5.
Change-Id: I4fa73883f58d8d4a533a7c21ecd4dd5b3c55b174
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This reduces interdependencies between QtCore and other modules.
Individual modules handle this by themselves.
Change-Id: I82cb96326b8ccb0b6acb88d899ed811f80f47ec1
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that this test isn't testing anything when not built for X11.
Change-Id: I9e9ef8fe738c06eb86f2ce398f6a515bf17e220a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
See qcocoaaccessiblity.h for details.
For now only the first level of the hierarchy is
made accessible.
Also add tools/accessibilityinspector which is an
utility for inspecting and debugging the Qt
accessibility tree.
Change-Id: Iff520bec26b3761feb0c2e00471feb379daaa735
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
There is no way for a .pro file to know if QProcess is in the Qt build,
so the QProcess autotest cannot be omitted from the build if QProcess is
not available. Because of this limitation, the test was using
QTEST_NOOP_MAIN when QProcess was not available, making the test appear
to pass. This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user
receives a clear indication that the test isn't testing anything when
QProcess is not available.
Change-Id: I79f667b17ff98dfc47eb61fb977365abef8883fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Pass on version to ARB.
- Query obtained ARB format more fine-grained depending on version,
indicate failures
- Fix GDI contexts and introduce gl=gdi to activate the GDI
functionality
- Adapt window flags after setParent if top level state changes
- Remove unused OpenGL flag from integration/context
Change-Id: I59ca74ee1fa727bd2bcfd605b3907bc82cca18fa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
- Maemo/Symbian are no longer supported and QWidget-based examples
are no longer supposed to run on mobile platforms, so, remove any
Maemo/Symbian or mobile-specific code from source files and
profiles.
- Remove Maemo/Symbian vibration examples.
- Change Q_WS_MAC/WIN to Q_OS_MAC/WIN where appropriate.
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Change-Id: I488a0adadb98934567aa6416206a80465c9c3a81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
because we may have the size of wchar_t varying,
we need to know which is the correct encoding: UTF-16 or UCS-4
Merge-request: 49
Change-Id: Ib5a1e7dea51d0cd8394e686634a36aae984fa072
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
QShortcut stays in QtWidgets, what we need in QtGui
is only the basic functionality of the shortcut map.
QML can integrate directly with the map where required.
Change-Id: Ie39e9242f24cbebf824e5c3d2926880325ea4187
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
qshortcut.cpp now has the honour of hosting the code that
detects whether the a given shortcutcontext is actually
valid.
Change-Id: I59d299bbd2fd62fca074a51d96e85b81a50ae73c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Calling swapBuffers with the surfaceHandle of 0 returned by QWindow
during application exit causes a crash when using GLX. The patch
avoids swapBuffer calls to platformGLContext when there is no surface
handle anymore.
Change-Id: I09c5bbafd4e7af6648ca54a58ed0267d0a2f343d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that these tests aren't testing anything when the required
defines are not defined.
Change-Id: I977e24205a1bb7787ecddbdb1ebbeda1f2ded321
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that these tests aren't testing anything when the required
defines are not defined.
Change-Id: I8508f50c6264fafa836090c5d6ffa6ce02dda102
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The addition of testing for multiple loggers greatly increased the total
runtime of this test, in fact making it the slowest testcase in Qt.
Fortunately this is only due to a couple of slow subtests whose behavior
is unlikely to be affected by the loggers. Change it to run these slow
subtests just for a couple of loggers, instead of all the combinations.
Change-Id: Ie90f6c0ca29470ed6a7c4e2e185f852602a2d162
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
TouchEnd is sent when all the touch points have a TouchPointReleased state,
and we would clear all touch points on finger release before sending them
up the stack.
Change-Id: I14e7347090ce9a1865743202f6926ae2fc035bd3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Proper multipoint touch support was only introduced in XInput2.1, but Harmattan uses
a tweaked version of XInput2.0 that transfers touch data through mouse events.
This patch applies on the xcb plugin a subset of the changes that were applied on the
Qt 4.7 that was shipped to Harmattan to get similar multipoint touch support.
Change-Id: Ifda7ad40de29d7ded1443d4f78b3ec3807303a9f
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
lastPos is copied from the last point's position, and the position has
to be resolved according the the receiving item's transformation.
However, if a QTouchEvent contains only stationary points, it won't be
delivered, it's pos()/rect() will still be uninitialized, and the
touch point of the next event will be delivered with the uninitialized
pos() as it's lastPos().
This patch makes sure that the lastPos() won't be filled with a
previous incomplete stationary point state even if the platform is
sending us stationary-point-only touch events.
Change-Id: Ia7d10423c8fbe78348edbb0a89fbfa66d1b8b5d1
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Before commit 070d9c00c4, the raster paint engine used
to call loadGlyphs() on the FT engine, which ensures that the glyphs are loaded
and (more importantly) that the correct transformation matrix is applied on the
freetype face. After commit 070d9c0 lockedAlphaMapForGlyph is called for each glyph,
which unfortunately doesn't respect the provided transformation matrix. Therefore
when drawing scaled text, it was never actually scaled.
This patch applies the combination of the fontengine transform and the requested
transform on the freetype face actually used, similarly to loadGlyphs.
Change-Id: I0956a9e71784582db6bb90475a001a63800773f4
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
qdoc does not understand the void (*) syntax, there is a typedef to
QFunctionPointer that does work.
Change-Id: Idbe9d43d00f8676304d088d72795b6ddb7e4ee72
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
There is no way for a .pro file to know if exceptions are supported in
the Qt build, so these tests cannot be omitted from the build if
exceptions are not supported. Because of this limitation, these tests
were using QTEST_NOOP_MAIN when exceptions were not available, making
the tests appear to pass. This commit changes QTEST_NOOP_MAIN to QSKIP,
so that the user receives a clear indication that the test isn't testing
anything when exceptions are not available.
Change-Id: I2facf08ba69e6f985e2da50dd36ad2658246b22e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
There was no value returned previously when none of GLX, EGL, DRI was
enabled. Now we show a warning message and return null (resulting in a
crash). Previously not returning a value resulted in obscure crashes
with strange-looking call stacks, now it will be clear what the
problem is.
This is particularly important because not having libx11-xcb-dev
installed results in silently disabled xlib support which in turn
disallows the usage of glx too. The result is an obscure crash in any
GL (e.g. QML2) app. Now there will be a proper warning message at
least.
Change-Id: I15cf3a6c16ca373d4ada7abb6d3c8f7e30c1e03d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
QXcbWindow::updateNetWmUserTime() creates a new window using the
actual window as its parent. This operation was failing when Xlib
usage and GLX (or EGL) was enabled because in these cases the real
window was created with a different visual using XCreateWindow.
For the user time window however we were passing the xcb_screen's
root_visual always, and this cannot work when Xlib+GLX/EGL is in use,
resulting in a BAD_MATCH (followed by some annoying flicker on the
screen on Ubuntu at least, or a full log off (X crash?) on Fedora).
The patch saves the visual id used to create the actual window and
passes that when creating the user time window. This way the creation
of the user time window succeeds with Xlib+GLX too.
Change-Id: If3925d9ac1670d385dcc7c2b475c196908569f06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
The QCopChannel class was removed during Qt5 refactoring.
Change-Id: I62914eca1db65c680d90233ce9dad5d891890c4a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The qgraphicswidget and qgraphicsproxywidget tests are empty if Qt is
built without the cleanlooks style, so don't build the tests in that
case.
Change-Id: I2308e723a9b0abcc3e95b32a562fcb02afe0444d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The test appears to be applicable only if building with g++, and even
then the test is broken.
Change-Id: I9eefb13325a10ec295a59c2bd1111e3c324ff94f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test was empty, the logic having been recently removed because it
only applied to the Carbon UI, which will not be supported by Qt5.
Change-Id: I2b5d6aba6be4a51eadbac3ca9d19d1a68c4fc1ab
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test is only valid with obsolete Qt Solutions packages. Any Qt
Solutions that are still of value need to be rewritten as Qt5 addons and
will be delivered with their own unit tests.
Change-Id: I099ef816655cc7de13715f5a4e5f4a06099df2d5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Make the parent .pro files follow the pattern of listing all tests in
one place and then removing inapplicable tests as needed.
Change-Id: Ide1ae98d50dd63cd8c1b4d6fd53135cdff801bc3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test is only useful on Windows, so avoid building it elsewhere
rather than building an empty test.
Change-Id: I01d91266bcb2dd242e02e70741ad5b81a13c33f0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The tools tests are not built for cross-compiled Qt builds, so the logic
to make those tests empty when cross-compiled is redundant.
Change-Id: Ia3a3a680d7ade2cee78aa633b41c9ef5be6f2f15
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Rather than building the test with all the logic #ifdef'd out, just
avoid building the test at all.
Change-Id: I394f48b2dacb40325d03de719096da36fcb7312a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
All but one of these tests was already excluded from the build on
non-Mac platforms, but still had #ifdef's to make the test empty if
compiled on a non-Mac platform.
Change-Id: I1a3677c1cdb7bd467cf4317ed4cfbac89e934e76
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
If the glyph run is generated based on characters which split a
ligature glyph, it needs to include the ligature glyph in the run,
and when painting, we need to clip the painter to the reported
bounding rect of the run in order to avoid painting too much of
the ligature. To make it possible to reduce clipping to a
minimum, we need a flag to inform of whether the glyph run contains
a split ligature or not.
Change-Id: Id787e0bec6d6e8e06cc818700ae0fca22cf81e98
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
It's not a good idea to look at the host's /bin/ls when cross-compiling
Change-Id: I1fe67b17abd92f01c1d89146227c5419eaa3242f
Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
When the platform plugin does not reimplement QPlatformWindow::winId()
to return a non-zero value, the default implementation provides a WId
of 0. This breaks various scenarios with QWidgets which, for example
in nativeParentWidget(), rely on internalWinId() being non-zero for
TLWs.
As a result, apps like collidingmice will crash with the 'minimal'
platform plugin when they try to do markDirtyOnScreen for the graphics
view's viewport widget because viewport()->nativeParentWidget()
unexpectedly returns null, even though it should return the
QGraphicsView.
The patch makes the default value WId(1) in order to to avoid this.
Change-Id: Iafef2e510e32b5610b8cef742313e9119ed64963
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Without a call to QWindowSystemInterface::handleWindowActivated() or
QPlatformWindow::requestWindowActivated() QGuiApplication's
activeWindow() and focusWindow() will return 0 all the time, and this
breaks key event delivery when key events are received not from a
windowing system but directly from e.g. evdev. In such cases the only
choice is to send the event to the active window but if there isn't
one the event will be lost.
These platforms will have one fullscreen window at a time so marking
it the active one should be a safe assumption.
Change-Id: Ia6f0e9f021fbd61bbd368ddc46f8a13fccda1c2f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>